Chetan Sarva wrote:
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 -
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 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.