Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Beatnik (493)

Beatnik
  (email not shown publicly)
http://www.ldl48.org/

A 29 year old belgian who likes Mountain Dew, Girl Scout Cookies, Tim Hortons French Vanilla Flavoured Cappucinno, Belgian beer, Belgian chocolate, Belgian women, Magners Cider, chocolate chipped cookies and Perl. Likes snowboarding, snorkling, sailing and silence. Bach can really cheer him up! He still misses his dog.

Project Daddy of Spine [sf.net], a mod_perl based CMS.

In his superhero time (8.30 AM to 5.30 PM), he works on world peace.

Journal of Beatnik (493)

Thursday November 08, 2007
06:46 PM

Leopard: Perl [3] : no suitable image found for mod_perl2

[ #34862 ]
Leopard doesn't come with mod_perl 2 (but it does come with apache2). The instructions on this page returned me the same error as on the page:

no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_perl.so: no matching architecture in universal wrapper

I checked which architectures were being built for mod_perl.so with:

file /usr/libexec/apache2/mod_perl.so

and I got:

./src/modules/perl/mod_perl.so: Mach-O universal binary with 2 architectures
./src/modules/perl/mod_perl.so (for architecture i386):    Mach-O bundle i386
./src/modules/perl/mod_perl.so (for architecture ppc7400):    Mach-O bundle ppc

It didn't list x86_64. A quick google revealed that people have had similar problems and that adding the actual architecture was the fix. I couldn't find a quick fix for Makefile.PL but updating all Makefiles by adding -arch x86_64 seemed to fix it:

lenore:mod_perl-2.0.3 root# file ./src/modules/perl/mod_perl.so
./src/modules/perl/mod_perl.so: Mach-O universal binary with 3 architectures
./src/modules/perl/mod_perl.so (for architecture i386):    Mach-O bundle i386
./src/modules/perl/mod_perl.so (for architecture x86_64):    Mach-O 64-bit bundle x86_64
./src/modules/perl/mod_perl.so (for architecture ppc7400):    Mach-O bundle ppc

httpd -t does not return any errors.

I seem to have similar problems with Apache::Request and DBI:

Can't load '/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/APR/Request/Request.bundle' for module APR::Request: dlopen(/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/APR/Request/Request.b undle, 1): no suitable image found.  Did find:\n\t/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/APR/Request/Request .bundle: no matching architecture in universal wrapper at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/DynaLoader.pm line 230.\n at /Library/Perl/5.8.8/darwin-thread-multi-2level/APR/Request/Param.pm line 27\nCompilation failed in require at /Library/Perl/5.8.8/darwin-thread-multi-2level/APR/Request/Param.pm line 27.\nBEGIN failed--compilation aborted at /Library/Perl/5.8.8/darwin-thread-multi-2level/APR/Request/Param.pm line 27.\nCompilation failed in require at /Library/Perl/5.8.8/darwin-thread-multi-2level/Apache2/Request.pm line 2.\nBEGIN failed--compilation aborted at /Library/Perl/5.8.8/darwin-thread-multi-2level/Apache2/Request.pm line 2.\n

and

Can't load '/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI/DBI.bundle' for module DBI: dlopen(/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI/DBI.bundle, 1): no suitable image found.  Did find:\n\t/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI/DBI.bundle: no matching architecture in universal wrapper at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/DynaLoader.pm line 230.\n at /Library/Perl/5.8.8/darwin-thread-multi-2level/DBI.pm line 266\nBEGIN failed--compilation aborted at /Library/Perl/5.8.8/darwin-thread-multi-2level/DBI.pm line 266.\n

.. Architecture output:

lenore:hendrik root# file /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI/DBI.bundle
/Library/Per l/5.8.8/darwin-thread-multi-2level/auto/DBI/DBI.bundle: Mach-O universal binary with 2 architectures
/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI/DBI.bundl e (for architecture i386):    Mach-O bundle i386
/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBI/DBI.bundle (for architecture ppc7400):    Mach-O bundle ppc
lenore:hendrik root# file /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/APR/Request/Request.bundle
/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/APR/Request/Request.bundle: Mach-O universal binary with 2 architectures
/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/APR/Request/R equest.bundle (for architecture i386):    Mach-O bundle i386
/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/APR/Request/Request.bu ndle (for architecture ppc7400):    Mach-O bundle ppc
lenore:hendrik root#

I'll investigate further, before I get my foot stuck in my mouth again.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I found your thread back and forth with pudge about the problem with dbd::mysql and thought I had finally found the conclusion to my problem, but couldn't find what you did after the point where your server logs were reporting:

    dyld: lazy symbol binding failed: Symbol not found: _mysql_server_init
    Referenced from: /Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
    Expected in: dynamic lookup

    dyld: Symbol not found: _mysql_server_init
    Referenced from: /Library/Perl/5.8.8/darwin

    • I bumped into some other people that had similar problems and recompiling mod_perl worked for them. Recompiling mod_perl (and also DBI, mysql and DBD::mysql) didn't work for me. I still had the same errors. Any results on your side so far?
      • Never did figure it out, in fact I gave up on building RT and went with bugzilla, which uses the mod_cgi that comes bundled with leopard.

        MikesMacBook:~ mike$ file /usr/libexec/apache2/mod_cgi.so
        /usr/libexec/apache2/mod_cgi.so: Mach-O universal binary with 4 architectures
        /usr/libexec/apache2/mod_cgi.so (for architecture ppc7400): Mach-O bundle ppc
        /usr/libexec/apache2/mod_cgi.so (for architecture ppc64): Mach-O 64-bit bundle ppc64
        /usr/libexec/apache2/mod_cgi.so (for architecture i386): Mach-O bundle i38

  • If you add this to your ~/.profile

    export ARCHFLAGS='-arch i386 -arch x86_64 -arch ppc -arch ppc64'

    credit goes to: http://forums.devshed.com/perl-programming-6/issue-compiling-libapreq2-on-mac-os x-10-5-leopard-ppc-501979.html [devshed.com]