2010/1/15 vince <[email protected]>: > is that possible to build mod_wsgi with the python come with macport? > i need those library from macport instead of rebuild my own version of > python. > > i am only able to build with the python come with snow leopard. > > here's the error i got: > > root ~/Downloads/mod_wsgi-3.1 # make clean > rm -rf .libs > rm -f mod_wsgi.o mod_wsgi.la mod_wsgi.lo mod_wsgi.slo mod_wsgi.loT > rm -f config.log config.status > rm -rf autom4te.cache > > root ~/Downloads/mod_wsgi-3.1 # ./configure --with-python=/opt/local/ > bin/python2.5 > checking for apxs2... no > checking for apxs... /usr/sbin/apxs > checking Apache version... 2.2.13 > configure: creating ./config.status > config.status: creating Makefile > > root ~/Downloads/mod_wsgi-3.1 # make > /usr/sbin/apxs -c -I/opt/local/Library/Frameworks/Python.framework/ > Versions/2.5/include/python2.5 -DNDEBUG -Wc,'-arch x86_64' -Wc,'-arch > i386' -Wc,'-arch ppc7400' mod_wsgi.c -Wl,-F/opt/local/Library/ > Frameworks -framework Python -u _PyMac_Error /opt/local/Library/ > Frameworks/ -arch x86_64 -arch i386 -arch ppc7400 -ldl > /usr/share/apr-1/build-1/libtool --silent --mode=compile gcc - > DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/local/include -I/usr/ > include/apache2 -I/usr/include/apr-1 -I/usr/include/apr-1 -arch > x86_64 -arch i386 -arch ppc7400 -I/opt/local/Library/Frameworks/ > Python.framework/Versions/2.5/include/python2.5 -DNDEBUG -c -o > mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo > In file included from /opt/local/Library/Frameworks/Python.framework/ > Versions/2.5/include/python2.5/Python.h:57, > from mod_wsgi.c:135: > /opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/ > python2.5/pyport.h:761:2: error: #error "LONG_BIT definition appears > wrong for platform (bad gcc/glibc config?)." > In file included from /opt/local/Library/Frameworks/Python.framework/ > Versions/2.5/include/python2.5/Python.h:57, > from mod_wsgi.c:135: > /opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/ > python2.5/pyport.h:761:2: error: #error "LONG_BIT definition appears > wrong for platform (bad gcc/glibc config?)." > lipo: can't figure out the architecture type of: /var/tmp// > ccKY9Jvo.out > apxs:Error: Command failed with rc=65536 > . > make: *** [mod_wsgi.la] Error 1 > > root ~/Downloads/mod_wsgi-3.1 # make clean > rm -rf .libs > rm -f mod_wsgi.o mod_wsgi.la mod_wsgi.lo mod_wsgi.slo mod_wsgi.loT > rm -f config.log config.status > rm -rf autom4te.cache > > root ~/Downloads/mod_wsgi-3.1 # ./configure --with-python=/opt/local/ > bin/python2.5 --disable-framework > checking for apxs2... no > checking for apxs... /usr/sbin/apxs > checking Apache version... 2.2.13 > configure: creating ./config.status > config.status: creating Makefile > > root ~/Downloads/mod_wsgi-3.1 # make > /usr/sbin/apxs -c -I/opt/local/Library/Frameworks/Python.framework/ > Versions/2.5/include/python2.5 -DNDEBUG -Wc,'-arch x86_64' -Wc,'-arch > i386' -Wc,'-arch ppc7400' mod_wsgi.c -L/opt/local/Library/Frameworks/ > Python.framework/Versions/2.5/lib -L/opt/local/Library/Frameworks/ > Python.framework/Versions/2.5/lib/python2.5/config -arch x86_64 -arch > i386 -arch ppc7400 -lpython2.5 -ldl > /usr/share/apr-1/build-1/libtool --silent --mode=compile gcc - > DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/local/include -I/usr/ > include/apache2 -I/usr/include/apr-1 -I/usr/include/apr-1 -arch > x86_64 -arch i386 -arch ppc7400 -I/opt/local/Library/Frameworks/ > Python.framework/Versions/2.5/include/python2.5 -DNDEBUG -c -o > mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo > In file included from /opt/local/Library/Frameworks/Python.framework/ > Versions/2.5/include/python2.5/Python.h:57, > from mod_wsgi.c:135: > /opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/ > python2.5/pyport.h:761:2: error: #error "LONG_BIT definition appears > wrong for platform (bad gcc/glibc config?)." > In file included from /opt/local/Library/Frameworks/Python.framework/ > Versions/2.5/include/python2.5/Python.h:57, > from mod_wsgi.c:135: > /opt/local/Library/Frameworks/Python.framework/Versions/2.5/include/ > python2.5/pyport.h:761:2: error: #error "LONG_BIT definition appears > wrong for platform (bad gcc/glibc config?)." > lipo: can't figure out the architecture type of: /var/tmp// > ccDMjNIY.out > apxs:Error: Command failed with rc=65536
You can find information about this in: http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX Short answer is that MacPorts Python doesn't provide all architectures that Apache httpd being used supplies. This is an issue where MacPoerts Python is 32bit only as Apache by default runs as 64bit. What you need to do is modify mod_wsgi Makefile after running configure to change compiler flags to only compile mod_wsgi for 32 bit. You will then need to either thin Apache httpd executable or modify its plist file to force it to run as 32bit. Graham
-- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
