So, I am trying to install mod_python on my Mac. Seems easy right?
Macintosh:bin brad$ sudo port install mod_python25
---> Fetching mod_python25
---> Verifying checksum(s) for mod_python25
---> Extracting mod_python25
---> Configuring mod_python25
---> Building mod_python25 with target all
Error: Target org.macports.build returned: shell command " cd
[snip] && make all " returned error 2
Command output:
Compiling for DSO.
/opt/local/apache2/bin/apxs
[snip]
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
apxs:Error: Command failed with rc=65536
.
make[1]: *** [mod_python.so] Error 1
make: *** [do_dso] Error 2
Error: Status 1 encountered during processing.
ahem, ok.
The best I can tell, this is due to Leopard and my choice of upgrading to XCode 3.0. The same error haunted me on Apache 2.2.6, and I found this page to solve it. Look for the patch by juho@sooey.com on 1/6/2008. But I couldn't figure out how to fix this for mod_python25. So, I went looking for libtool and apxs. I found it in /opt/local/apache2/bin/apxs and edited it to change:
$ltflags or $ltflags = "--silent";
to
$ltflags or $ltflags = "--silent --tag=CC";
And voila... 'sudo port install mod_python25' works like a charm.
Hope this helps you.