| 13 | |
| 14 | Also note that on Leopard with XCode 3.0 you might run into an error when you try to install mod_python25 using macports: |
| 15 | {{{ |
| 16 | nih$ sudo port install mod_python25 |
| 17 | ---> Fetching mod_python25 |
| 18 | ---> Verifying checksum(s) for mod_python25 |
| 19 | ---> Extracting mod_python25 |
| 20 | ---> Configuring mod_python25 |
| 21 | ---> Building mod_python25 with target all |
| 22 | Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_mod_python25/work/mod_python-3.3.1" && make all " returned error 2 |
| 23 | Command output: |
| 24 | Compiling for DSO. |
| 25 | |
| 26 | /opt/local/apache2/bin/apxs -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_mod_python25/work/mod_python-3.3.1/src/include -I/opt/local/apache2/include -I/opt/local/include/python2.5 -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c hlistobject.c finfoobject.c -L/opt/local/lib -Wl,-F/opt/local/Library/Frameworks -L/opt/local/lib/python2.5/config -u _PyMac_Error -L/opt/local/lib -lm -lpython2.5 -ldl |
| 27 | /opt/local/share/apr-1/build/libtool --silent --mode=compile /usr/bin/gcc-4.0 -prefer-pic -O2 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/opt/local/include -I/opt/local/apache2/include -I/opt/local/include/apr-1 -I/opt/local/include/apr-1 -I/opt/local/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_mod_python25/work/mod_python-3.3.1/src/include -I/opt/local/apache2/include -I/opt/local/include/python2.5 -c -o mod_python.lo mod_python.c && touch mod_python.slo |
| 28 | libtool: compile: unable to infer tagged configuration |
| 29 | libtool: compile: specify a tag with `--tag' |
| 30 | apxs:Error: Command failed with rc=65536 |
| 31 | . |
| 32 | make[1]: *** [mod_python.so] Error 1 |
| 33 | make: *** [do_dso] Error 2 |
| 34 | |
| 35 | Error: Status 1 encountered during processing. |
| 36 | }}} |
| 37 | |
| 38 | The fix (from [http://boorad.weebly.com/1/post/2008/01/wrastling-macports-mod_python25.html here]) seems to be to edit /opt/local/apache2/bin/apxs and change (near line 50): |
| 39 | {{{ |
| 40 | $ltflags or $ltflags = "--silent"; |
| 41 | }}} |
| 42 | to |
| 43 | {{{ |
| 44 | $ltflags or $ltflags = "--silent --tag=CC"; |
| 45 | }}} |
| 46 | |
| 47 | Then re-run |
| 48 | {{{ |
| 49 | sudo port install mod_python25 |
| 50 | }}} |