Skip Menu |

This queue is for tickets about the Mac-FSEvents CPAN distribution.

Report information
The Basics
Id: 63688
Status: resolved
Priority: 0/
Queue: Mac-FSEvents

People
Owner: Nobody in particular
Requestors: andreas.marienborg [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.04
Fixed in: (no value)



Subject: Error builder using perlbrew perl
The auto-detection for 64-bit fails if I use a perlbrew built perl. Not sure what the correct fix is, but I just did export ARCHFLAGS, and made the top most check of the if in hints/darwin.pl check for that, and use that in case it existed
From: rob [...] hoelz.ro
I've attached a patch to fix the hints file and the test suite for perlbrew perls. -Rob On Mon Dec 06 21:28:56 2010, ANDREMAR wrote: Show quoted text
> The auto-detection for 64-bit fails if I use a perlbrew built perl. > > Not sure what the correct fix is, but I just did export ARCHFLAGS, and > made the top most check of the if in hints/darwin.pl check for that, and > use that in case it existed
Subject: mac-fsevents-fix.patch
diff -Naur Mac-FSEvents-0.04/hints/darwin.pl Mac-FSEvents-0.04-rhoelz/hints/darwin.pl --- Mac-FSEvents-0.04/hints/darwin.pl 2009-10-22 08:56:00.000000000 -0500 +++ Mac-FSEvents-0.04-rhoelz/hints/darwin.pl 2011-05-29 15:43:47.000000000 -0500 @@ -3,15 +3,15 @@ use Config; if ( $Config{myarchname} =~ /i386/ ) { - if ( $Config{version} =~ /^5\.10/ ) { - # 5.10, build as 10.5+ with Snow Leopard 64-bit support - $arch = "-arch x86_64 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5"; + my $os_version = qx(system_profiler SPSoftwareDataType); + if($os_version =~ /System Version: Mac OS X 10\.(\d+)/) { + if($1 >= 5) { # Leopard and up + $arch = "-arch x86_64 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5"; + } else { + $arch = "-arch i386 -arch ppc"; + } } - else { - # 5.8.x, build for 10.3+ 32-bit universal - $arch = "-arch i386 -arch ppc"; - } - + print "Adding $arch\n"; my $ccflags = $Config{ccflags}; diff -Naur Mac-FSEvents-0.04/t/05event.t Mac-FSEvents-0.04-rhoelz/t/05event.t --- Mac-FSEvents-0.04/t/05event.t 2009-02-28 13:48:58.000000000 -0600 +++ Mac-FSEvents-0.04-rhoelz/t/05event.t 2011-05-29 15:36:04.000000000 -0500 @@ -8,7 +8,7 @@ use IO::Select; use Mac::FSEvents; -use Test::More tests => 4; +use Test::More tests => 7; my $tmpdir = "$FindBin::Bin/tmp"; @@ -35,25 +35,27 @@ local $SIG{ALRM} = sub { die "alarm\n" }; alarm 3; + my $seen_event; READ: while ( my @events = $fs->read_events ) { for my $event ( @events ) { my $path = $event->path; $since = $event->id; if ( $tmp->filename =~ /^$path/ ) { - ok( 1, 'event received (poll interface)' ); + $seen_event = 1; last READ; } } } + ok( $seen_event, 'event received (poll interface)' ); alarm 0; }; if ( $@ ) { die $@ unless $@ eq "alarm\n"; - ok( 0, 'event received (poll interface)' ); } + ok( ! $@, 'event received (poll interface)' ); $fs->stop; } @@ -78,24 +80,26 @@ my $sel = IO::Select->new($fh); + my $seen_event; READ: while ( $sel->can_read ) { for my $event ( $fs->read_events ) { my $path = $event->path; if ( $tmp->filename =~ /^$path/ ) { - ok( 1, 'event received (select interface)' ); + $seen_event = 1; last READ; } } } + ok( $seen_event, 'event received (select interface)' ); alarm 0; }; if ( $@ ) { die $@ unless $@ eq "alarm\n"; - ok( 0, 'event received (select interface)' ); } + ok( ! $@, 'event received (select interface)' ); $fs->stop; } @@ -114,26 +118,28 @@ local $SIG{ALRM} = sub { die "alarm\n" }; alarm 3; + my $seen_event; READ: while ( my @events = $fs->read_events ) { for my $event ( @events ) { if ( $event->history_done ) { - ok( 1, 'history event received' ); + $seen_event = 1; last READ; } } } + ok( $seen_event, 'history event received' ); alarm 0; }; if ( $@ ) { die $@ unless $@ eq "alarm\n"; - ok( 0, 'history event received' ); } + ok( ! $@, 'history event received' ); $fs->stop; } # clean up -rmtree $tmpdir if -d $tmpdir; \ No newline at end of file +rmtree $tmpdir if -d $tmpdir;
On Sun May 29 16:44:54 2011, hoelzro wrote: Show quoted text
> I've attached a patch to fix the hints file and the test suite for > perlbrew perls.
This doesn't help if you only have the 10.6 development tools installed (i.e. you bought a brand new Mac as of 2011-06-13 and installed XCode4 from the App Store) I've attached the more basic patch file that I used.
Subject: example.patch
diff -u Mac-FSEvents-0.04/hints/darwin.pl Mac-FSEvents-0.04.patched/hints/darwin.pl --- Mac-FSEvents-0.04/hints/darwin.pl 2009-10-22 14:56:00.000000000 +0100 +++ Mac-FSEvents-0.04.patched/hints/darwin.pl 2011-06-13 11:18:20.000000000 +0100 @@ -3,9 +3,9 @@ use Config; if ( $Config{myarchname} =~ /i386/ ) { - if ( $Config{version} =~ /^5\.10/ ) { + if ( $Config{version} =~ /^5\.1./ ) { # 5.10, build as 10.5+ with Snow Leopard 64-bit support - $arch = "-arch x86_64 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5"; + $arch = "-arch x86_64 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6"; } else { # 5.8.x, build for 10.3+ 32-bit universal
From: rob [...] hoelz.ro
I don't know if matching against the Perl version is the best way to go about enabling compiler flags. For example, I could install perl-5.8.8 via perlbrew, and I think that installing Mac::FSEvents into that perlbrew environment using this patch would still fail. Also, wouldn't -mmacosx-version-min=10.6 mean that Mac::FSEvents could only be built on 10.6, and no prior versions? This would also mean that my patch is incorrect as well. On Mon Jun 13 07:37:25 2011, MARKF wrote: Show quoted text
> On Sun May 29 16:44:54 2011, hoelzro wrote: >
> > I've attached a patch to fix the hints file and the test suite for > > perlbrew perls.
> > This doesn't help if you only have the 10.6 development tools > installed (i.e. you bought a brand > new Mac as of 2011-06-13 and installed XCode4 from the App Store) > > I've attached the more basic patch file that I used.
Should be solved in Mac::FSEvents 0.05.