Porcari Giovanni
giovanni.porcari at gmail.com
Fri Sep 14 05:26:39 EDT 2007
Il giorno 14/set/07, alle ore 10:33, Graham Dumpleton ha scritto: > On 14/09/2007, Porcari Giovanni <giovanni.porcari at gmail.com> wrote: >> >> Il giorno 14/set/07, alle ore 08:49, Graham Dumpleton ha scritto: >> >>> What do you get when run: >>> >>> otool -L mod_python.so >> >> >> MacBookGP:/usr/local/apache2/modules gporcari$ otool -L mod_python.so >> mod_python.so: >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, >> current version 88.1.3) >> /System/Library/Frameworks/Python.framework/Versions/2.3/ >> Python (compatibility version 2.3.0, current version 2.3.5) > > This means mod_python was never correctly compiled against Python 2.5 > in the first place. > > The basic issue is that your Python 2.5 doesn't appear to be installed > in standard Apple frameworks directory, but somewhere else, eg, > /usr/local. What this means is that you have to modify the mod_python > src/Makefile after having run configure, and modify LDFLAGS, inserting > at the start something like: > > -Wl,-F/some/path/lib > > where /some/path/lib is where your Python 2.5 framework library is > installed. > > This way it will find the correct version of the framework library > when linking and therefore at runtime hopefully also find the correct > one. Hi Ghraham I am not sure about the path I should set in -Wl,-F/some/path/lib. for example site-packages path is: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- packages so Python 2.5 framework library is just /Library/Frameworks/ Python.framework or /Library/Frameworks/Python.framework/Versions/2.5 or /Library/Frameworks/Python.framework/Versions/2.5/lib/python2 ? however i attach the make output. Thank you G ------------------------------------------------- MacBookGP:~/Desktop/Installazioni/mod_python-3.3.1 gporcari$ make Compiling for DSO. /usr/local/apache2/bin/apxs -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/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 -Wl,-framework,Python -u _PyMac_Error /Versions// - arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g - lm -framework Python -ldl /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o mod_python.lo mod_python.c && touch mod_python.slo mod_python.c: In function 'python_init': mod_python.c:826: warning: initialization from incompatible pointer type /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o _apachemodule.lo _apachemodule.c && touch _apachemodule.slo /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o requestobject.lo requestobject.c && touch requestobject.slo /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o tableobject.lo tableobject.c && touch tableobject.slo tableobject.c:329: warning: initialization from incompatible pointer type tableobject.c:1092: warning: initialization from incompatible pointer type /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o util.lo util.c && touch util.slo /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o serverobject.lo serverobject.c && touch serverobject.slo serverobject.c:387: warning: initialization from incompatible pointer type /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o connobject.lo connobject.c && touch connobject.slo /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o filterobject.lo filterobject.c && touch filterobject.slo /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o hlist.lo hlist.c && touch hlist.slo /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o hlistobject.lo hlistobject.c && touch hlistobject.slo /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer- pic -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 - I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/ local/apache2/include -I/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/include -I/usr/local/apache2/include -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c -o finfoobject.lo finfoobject.c && touch finfoobject.slo finfoobject.c:278: warning: 'intargfunc' is deprecated finfoobject.c:278: warning: initialization from incompatible pointer type /usr/local/apache2/build/libtool --silent --mode=link gcc -o mod_python.la -rpath /usr/local/apache2/modules -module -avoid- version finfoobject.lo hlistobject.lo hlist.lo filterobject.lo connobject.lo serverobject.lo util.lo tableobject.lo requestobject.lo _apachemodule.lo mod_python.lo -Wl,-framework,Python -u _PyMac_Error / Versions// -arch i386 -arch ppc -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -g -lm -framework Python -ldl /usr/bin/ld: for architecture ppc /usr/bin/ld: warning .libs/finfoobject.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: warning .libs/hlistobject.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: warning .libs/hlist.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: warning .libs/filterobject.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: warning .libs/connobject.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: warning .libs/serverobject.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: warning .libs/util.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: warning .libs/tableobject.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: warning .libs/requestobject.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: warning .libs/_apachemodule.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: warning .libs/mod_python.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) ln -s ../lib/python/mod_python mod_python ln -s ../src src make[2]: `psp_parser.c' is up to date. /Library/Frameworks/Python.framework/Versions/Current/bin/python setup.py build running build running build_py creating build creating build/lib.macosx-10.3-fat-2.5 creating build/lib.macosx-10.3-fat-2.5/mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/__init__.py -> build/lib.macosx-10.3-fat-2.5/ mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/apache.py -> build/lib.macosx-10.3-fat-2.5/mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/cache.py -> build/lib.macosx-10.3-fat-2.5/mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/cgihandler.py -> build/lib.macosx-10.3-fat-2.5/ mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/Cookie.py -> build/lib.macosx-10.3-fat-2.5/mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/importer.py -> build/lib.macosx-10.3-fat-2.5/ mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/psp.py -> build/lib.macosx-10.3-fat-2.5/mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/publisher.py -> build/lib.macosx-10.3-fat-2.5/ mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/python22.py -> build/lib.macosx-10.3-fat-2.5/ mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/Session.py -> build/lib.macosx-10.3-fat-2.5/mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/testhandler.py -> build/lib.macosx-10.3-fat-2.5/ mod_python copying /Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/lib/ python/mod_python/util.py -> build/lib.macosx-10.3-fat-2.5/mod_python running build_ext building 'mod_python._psp' extension creating build/temp.macosx-10.3-fat-2.5 creating build/temp.macosx-10.3-fat-2.5/Users creating build/temp.macosx-10.3-fat-2.5/Users/gporcari creating build/temp.macosx-10.3-fat-2.5/Users/gporcari/Desktop creating build/temp.macosx-10.3-fat-2.5/Users/gporcari/Desktop/ Installazioni creating build/temp.macosx-10.3-fat-2.5/Users/gporcari/Desktop/ Installazioni/mod_python-3.3.1 creating build/temp.macosx-10.3-fat-2.5/Users/gporcari/Desktop/ Installazioni/mod_python-3.3.1/src gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -I/Users/gporcari/Desktop/ Installazioni/mod_python-3.3.1/src/include -I/Library/Frameworks/ Python.framework/Versions/2.5/include/python2.5 -c /Users/gporcari/ Desktop/Installazioni/mod_python-3.3.1/src/psp_string.c -o build/ temp.macosx-10.3-fat-2.5/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/psp_string.o gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -I/Users/gporcari/Desktop/ Installazioni/mod_python-3.3.1/src/include -I/Library/Frameworks/ Python.framework/Versions/2.5/include/python2.5 -c /Users/gporcari/ Desktop/Installazioni/mod_python-3.3.1/src/psp_parser.c -o build/ temp.macosx-10.3-fat-2.5/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/psp_parser.o gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -I/Users/gporcari/Desktop/ Installazioni/mod_python-3.3.1/src/include -I/Library/Frameworks/ Python.framework/Versions/2.5/include/python2.5 -c /Users/gporcari/ Desktop/Installazioni/mod_python-3.3.1/src/_pspmodule.c -o build/ temp.macosx-10.3-fat-2.5/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/_pspmodule.o gcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-fat-2.5/ Users/gporcari/Desktop/Installazioni/mod_python-3.3.1/src/ psp_string.o build/temp.macosx-10.3-fat-2.5/Users/gporcari/Desktop/ Installazioni/mod_python-3.3.1/src/psp_parser.o build/ temp.macosx-10.3-fat-2.5/Users/gporcari/Desktop/Installazioni/ mod_python-3.3.1/src/_pspmodule.o -o build/lib.macosx-10.3-fat-2.5/ mod_python/_psp.so Now su and make install (or, if you only want to perform a partial install, you can use make install_dso and make install_py_lib)
|