Discussion:
64-bit mod_perl 2 on Mac OSX 10.5 (Leopard)
(too old to reply)
Chetan Sarva
2008-10-09 22:31:40 UTC
Permalink
Hi,

I'm trying to compile mod_perl 2 on a Xeon (x86_64) box. I'm unclear
as to the dependencies I need to compile it correctly. Everything is
default as shipped by Apple. A bit of investigation reveals the
following potential mismatch -

geonosis:~ chetan$ which perl
/usr/bin/perl
geonosis:~ chetan$ file `which perl`
/usr/bin/perl: Mach-O universal binary with 2 architectures
/usr/bin/perl (for architecture ppc7400): Mach-O executable ppc
/usr/bin/perl (for architecture i386): Mach-O executable i386

geonosis:~ chetan$ which httpd
/usr/sbin/httpd
geonosis:~ chetan$ file `which httpd`
/usr/sbin/httpd: Mach-O universal binary with 4 architectures
/usr/sbin/httpd (for architecture ppc7400): Mach-O executable ppc
/usr/sbin/httpd (for architecture ppc64): Mach-O 64-bit executable ppc64
/usr/sbin/httpd (for architecture i386): Mach-O executable i386
/usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable
x86_64


resulting in -

httpd: Syntax error on line 117 of /private/etc/apache2/httpd.conf:
Cannot load /usr/libexec/apache2/mod_perl.so into server: dlopen(/usr/
libexec/apache2/mod_perl.so, 10): no suitable image found. Did find:\n
\t/usr/libexec/apache2/mod_perl.so: no matching architecture in
universal wrapper


Which is what leads me to believe that I need to build x86_64 perl and
mod_perl to make it work. Are my assumptions correct?

I ask because I'm having trouble building perl..


chetan
Fred Moyer
2008-10-09 23:08:08 UTC
Permalink
Hi,
I'm trying to compile mod_perl 2 on a Xeon (x86_64) box. I'm unclear as
to the dependencies I need to compile it correctly. Everything is
default as shipped by Apple. A bit of investigation reveals the
following potential mismatch -
...
geonosis:~ chetan$ which httpd
/usr/sbin/httpd
geonosis:~ chetan$ file `which httpd`
/usr/sbin/httpd: Mach-O universal binary with 4 architectures
/usr/sbin/httpd (for architecture ppc7400): Mach-O executable ppc
/usr/sbin/httpd (for architecture ppc64): Mach-O 64-bit executable ppc64
/usr/sbin/httpd (for architecture i386): Mach-O executable i386
/usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable
x86_64
resulting in -
dlopen(/usr/libexec/apache2/mod_perl.so, 10): no suitable image found.
Did find:\n\t/usr/libexec/apache2/mod_perl.so: no matching architecture
in universal wrapper
Which is what leads me to believe that I need to build x86_64 perl and
mod_perl to make it work. Are my assumptions correct?
I have found Leopard's default builds to not be that developer friendly
(perhaps a good indicator is that you have to install XCode tools to get
gcc and do anything). I build perl, mod_perl, and httpd from source on
my Leopard platforms. Maybe I don't need to do this, but I've suffered
at the hands of Apple's system upgrades enough times that I have found
it is worth my while.
I ask because I'm having trouble building perl..
When you go through the perl configure process and it asks if you want
to specify any additional CFLAGS, type '-fPIC' - this is needed for 64
bit mod_perl. I always build perl with the prefix option, and then add
the bin location to my PATH variable, and use that to build mod_perl.
Chetan Sarva
2008-10-13 18:30:43 UTC
Permalink
Post by Fred Moyer
Post by Chetan Sarva
Which is what leads me to believe that I need to build x86_64 perl
and mod_perl to make it work. Are my assumptions correct?
I have found Leopard's default builds to not be that developer
friendly (perhaps a good indicator is that you have to install XCode
tools to get gcc and do anything). I build perl, mod_perl, and
httpd from source on my Leopard platforms. Maybe I don't need to do
this, but I've suffered at the hands of Apple's system upgrades
enough times that I have found it is worth my while.
Post by Chetan Sarva
I ask because I'm having trouble building perl..
When you go through the perl configure process and it asks if you
want to specify any additional CFLAGS, type '-fPIC' - this is needed
for 64 bit mod_perl. I always build perl with the prefix option,
and then add the bin location to my PATH variable, and use that to
build mod_perl.
Thanks, I figured as much. Perl compilation broke with the following:

/perl installperl --destdir=
Can't load 'lib/auto/File/Glob/Glob.bundle' for module File::Glob:
dlopen(lib/auto/File/Glob/Glob.bundle, 1): no suitable image found.
Did find:
lib/auto/File/Glob/Glob.bundle: mach-o, but wrong architecture at lib/
XSLoader.pm line 70.
at lib/File/Glob.pm line 96
Compilation failed in require at installperl line 132.
BEGIN failed--compilation aborted at installperl line 132.
make[1]: *** [install.perl] Error 2
make: *** [install] Error 2

Going to configure it and try again. Not sure if I screwed up one of
the thousand options or not...

chetan
Srinivas Gadde
2008-10-13 19:59:15 UTC
Permalink
45% commission is offered.
see below

--------------
My team can work for you and for your projects.
http://www.gecpvt.com/NoIpResume.pdf
http://gecpvt.com/future_patents/
http://www.gecpvt.com/Jobs
http://www.gecpvt.com/Sales

srinivas
--------------
Subject: Re: 64-bit mod_perl 2 on Mac OSX 10.5 (Leopard)
Date: Mon, 13 Oct 2008 14:30:43 -0400
Post by Fred Moyer
Post by Chetan Sarva
Which is what leads me to believe that I need to build x86_64 perl
and mod_perl to make it work. Are my assumptions correct?
I have found Leopard's default builds to not be that developer
friendly (perhaps a good indicator is that you have to install XCode
tools to get gcc and do anything). I build perl, mod_perl, and
httpd from source on my Leopard platforms. Maybe I don't need to do
this, but I've suffered at the hands of Apple's system upgrades
enough times that I have found it is worth my while.
Post by Chetan Sarva
I ask because I'm having trouble building perl..
When you go through the perl configure process and it asks if you
want to specify any additional CFLAGS, type '-fPIC' - this is needed
for 64 bit mod_perl. I always build perl with the prefix option,
and then add the bin location to my PATH variable, and use that to
build mod_perl.
/perl installperl --destdir=
dlopen(lib/auto/File/Glob/Glob.bundle, 1): no suitable image found.
lib/auto/File/Glob/Glob.bundle: mach-o, but wrong architecture at lib/
XSLoader.pm line 70.
at lib/File/Glob.pm line 96
Compilation failed in require at installperl line 132.
BEGIN failed--compilation aborted at installperl line 132.
make[1]: *** [install.perl] Error 2
make: *** [install] Error 2
Going to configure it and try again. Not sure if I screwed up one of
the thousand options or not...
chetan
_________________________________________________________________
Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
Loading...