This is getting to be a pain in the neck. Some installations will not work when -F/-framework is used, showing the symptom you see instead, and require linking to libpython2.6.a to work. As far as I can tell it isn't related to the specific Python version but some other oddity which may even differ where people run same MacOS X version. :-(
I'll have to yet more experimentation. Maybe I need to go back to -F/-framework if it is Snow Leopard. The current rule was if Python 2.3, 2.4 or 2.5 use -F/-framework and if later use -L/-l. Thanks. Graham 2009/9/1 sachin <[email protected]>: > > The modification of the makefile worked! The correct Python version > 2.6.2 is loaded without any compile\runtime mismatch warning. > > In case you were still interested in the "ls -las" output, here it is: > > total 240 > 0 drwxr-xr-x 12 root wheel 408 Aug 6 23:51 . > 0 drwxr-xr-x 632 root wheel 21488 Aug 6 23:51 .. > 88 -rw-r--r-- 1 root wheel 43388 Aug 6 23:51 Makefile > 40 -rw-r--r--@ 1 root wheel 18265 Aug 6 23:51 Setup > 8 -rw-r--r-- 1 root wheel 368 Aug 6 23:51 Setup.config > 8 -rw-r--r-- 1 root wheel 41 Aug 6 23:51 Setup.local > 8 -rw-r--r-- 1 root wheel 2077 Aug 6 23:51 config.c > 8 -rw-r--r--@ 1 root wheel 1457 Aug 6 23:51 config.c.in > 16 -rwxr-xr-x@ 1 root wheel 7122 Aug 6 23:51 install-sh > 8 lrwxr-xr-x 1 root wheel 15 Aug 6 23:51 libpython2.6.a - >> ../../../Python > 16 -rwxr-xr-x@ 1 root wheel 7431 Aug 6 23:51 makesetup > 40 -rw-r--r-- 1 root wheel 20076 Aug 6 23:51 python.o > > Thanks for your help! > Sachin > > On Sep 1, 12:16 am, Graham Dumpleton <[email protected]> > wrote: >> 2009/9/1 sachin <[email protected]>: >> >> >> >> > Here is the output from make: >> >> > /usr/sbin/apxs -c -I/usr/local/python-2.6.2/frameworks/ >> > Python.framework/Versions/2.6/include/python2.6 -DNDEBUG -Wc,'-arch >> > x86_64' -Wc,'-arch i386' -Wc,'-arch ppc7400' mod_wsgi.c -L/usr/local/ >> > python-2.6.2/frameworks/Python.framework/Versions/2.6/lib/python2.6/ >> > config -arch x86_64 -arch i386 -arch ppc7400 -lpython2.6 -ldl >> >> In Makefile, change: >> >> LDFLAGS = >> -L/usr/local/python-2.6.2/frameworks/Python.framework/Versions/2.6/lib/python2.6/config >> -arch x86_64 -arch i386 -arch ppc7400 >> LDLIBS = -lpython2.6 -ldl >> >> to: >> >> LDFLAGS = -F/usr/local/python-2.6.2/frameworks -arch x86_64 -arch >> i386 -arch ppc7400 >> LDLIBS = -framework Python -ldl >> >> and see it it makes a difference. >> >> Also give me 'ls -las' output from: >> >> >> /usr/local/python-2.6.2/frameworks/Python.framework/Versions/2.6/lib/python2.6/config >> >> Thanks. >> >> Graham >> >> > /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/usr/local/python-2.6.2/frameworks/ >> > Python.framework/Versions/2.6/include/python2.6 -DNDEBUG -c -o >> > mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo >> > mod_wsgi.c: In function 'Adapter_output': >> > mod_wsgi.c:2868: warning: format '%d' expects type 'int', but argument >> > 3 has type 'Py_ssize_t' >> > mod_wsgi.c: In function 'Adapter_output': >> > mod_wsgi.c:2868: warning: format '%d' expects type 'int', but argument >> > 3 has type 'Py_ssize_t' >> > mod_wsgi.c: In function 'Adapter_output': >> > mod_wsgi.c:2868: warning: format '%d' expects type 'int', but argument >> > 3 has type 'Py_ssize_t' >> > /usr/share/apr-1/build-1/libtool --silent --mode=link gcc -o >> > mod_wsgi.la -rpath /usr/libexec/apache2 -module -avoid-version >> > mod_wsgi.lo -L/usr/local/python-2.6.2/frameworks/Python.framework/ >> > Versions/2.6/lib/python2.6/config -arch x86_64 -arch i386 -arch >> > ppc7400 -lpython2.6 -ldl >> > warning: no debug symbols in executable (-arch x86_64) >> > warning: no debug symbols in executable (-arch i386) >> > warning: no debug symbols in executable (-arch ppc7400) >> >> > On Sep 1, 12:06 am, Graham Dumpleton <[email protected]> >> > wrote: >> >> Show me the actual output from running the 'make'. Want to see how it >> >> is linking in the Python framework. They may have subtly changed >> >> framework linking again. :-( >> >> >> Graham >> >> >> 2009/9/1 sachin <[email protected]>: >> >> >> > I downloaded and installed mod_wsgi 3.0c4. But I'm still getting the >> >> > same error. Here is the tail on the apache log: >> >> >> > [Mon Aug 31 23:57:03 2009] [warn] Init: Session Cache is not >> >> > configured [hint: SSLSessionCache] >> >> > [Mon Aug 31 23:57:03 2009] [warn] mod_wsgi: Compiled for Python/2.6.2. >> >> > [Mon Aug 31 23:57:03 2009] [warn] mod_wsgi: Runtime using Python/ >> >> > 2.6.1. >> >> > [Mon Aug 31 23:57:03 2009] [notice] Digest: generating secret for >> >> > digest authentication ... >> >> > [Mon Aug 31 23:57:03 2009] [notice] Digest: done >> >> > [Mon Aug 31 23:57:03 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/ >> >> > 2.2.11 OpenSSL/0.9.8k DAV/2 mod_wsgi/3.0c4 Python/2.6.1 configured -- >> >> > resuming normal operations >> >> >> > Sachin >> >> >> > On Aug 31, 11:42 pm, Graham Dumpleton <[email protected]> >> >> > wrote: >> >> >> Try with mod_wsgi 3.0c4, or replace the configure script in mod_wsgi >> >> >> 2.5 with: >> >> >> >> http://modwsgi.googlecode.com/svn/branches/mod_wsgi-2.X/configure >> >> >> >> and tell me if it works. >> >> >> >> Pending mod_wsgi 2.6 had further tweaks related to MacOS X builds >> >> >> which may have already addressed this. >> >> >> >> Graham >> >> >> >> 2009/9/1 sachin <[email protected]>: >> >> >> >> > I had Apple-supplied Apache and Python 2.6.2 built from source (with >> >> >> > all archs) and mod_wsgi 2.5 working fine on my box. But I just >> >> >> > upgraded to Mac OS X Snow Leopard, which installed a version of >> >> >> > Python >> >> >> > on the box which is older than the one I want to use (2.6.1). >> >> >> >> > Now I am getting the following warning: >> >> >> > [Mon Aug 31 23:26:56 2009] [warn] mod_wsgi: Compiled for >> >> >> > Python/2.6.2. >> >> >> > [Mon Aug 31 23:26:56 2009] [warn] mod_wsgi: Runtime using Python/ >> >> >> > 2.6.1. >> >> >> >> > I recompiled mod_wsgi pointing explicitly to the 2.6.2 version that I >> >> >> > want with the following command: >> >> >> >> > ./configure --with-python=/usr/local/python-2.6.2/frameworks/ >> >> >> > Python.framework/Versions/2.6/bin/python2.6 >> >> >> >> > I also modified my httpd.conf to include the following python home >> >> >> > directive: >> >> >> >> > WSGIPythonHome /usr/local/python-2.6.2/frameworks/Python.framework/ >> >> >> > Versions/2.6 >> >> >> >> > After stopping and starting the apachectl numerous times, I still get >> >> >> > the same compiled\runtime mismatch. >> >> >> >> > I saw in the docs this could be related to having mod_python >> >> >> > installed >> >> >> > as well, but I have never installed mod_python and did not find a >> >> >> > mod_python.so or load directive in my httpd.conf. >> >> >> >> > Any help would be appreciated! > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
