Batland



Home
GeneralNewsPerlProFTPd
Archives

Batland's Code
Batland's Photos

Login
Nov
23
Mac OS X 10.6's perl horrible broken

I am back with a short tail about Mac OS 10.6 and how apple broke perl. Sorry, but 10.6 shipped with such a mess! Yesterday I intended to write a perl script which should interact with iPhoto via Mac::Glue. But guess what the following command will output:

perl -e "use Mac::Glue;"

I guess nobody thinks that it will not err, so watch (read) the show:

Can't load '/System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level/auto/MacPerl/MacPerl.bundle' for module MacPerl: /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level/auto/MacPerl/MacPerl.bundle: no appropriate 64-bit architecture (see "man perl" for running in 32-bit mode) at /System/Library/Perl/5.10.0/darwin-thread-multi-2level/DynaLoader.pm line 207.
at /System/Library/Perl/Extras/5.10.0/Mac/Glue/Common.pm line 21
Compilation failed in require at /System/Library/Perl/Extras/5.10.0/Mac/Glue/Common.pm line 21.
BEGIN failed--compilation aborted at /System/Library/Perl/Extras/5.10.0/Mac/Glue/Common.pm line 21.
Compilation failed in require at /System/Library/Perl/Extras/5.10.0/Mac/Glue.pm line 7.
BEGIN failed--compilation aborted at /System/Library/Perl/Extras/5.10.0/Mac/Glue.pm line 7.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

Great, isn't it. So perl -V reveals that apple ships a 32bit perl with OS 10.6. So at least the error message tells us where to look (man perl). That will tell us that perl can be convinced to load 32 Bit libraries by setting the variable VERSIONER_PERL_PREFER_32_BIT to yes via

export VERSIONER_PERL_PREFER_32_BIT

Now, it works like it should. So edit your ~/.bashrc to automatically set the variable at startup of bash and you'll be happy.

Bye

Dennis

Posted by: DP

Comments No comments yet Add Comment  


« Newer items | Older items »
Impressum | RSS | Powered by NucleusCMS | Ported by VinhBoy | Designed by DemusDesign