#18879: mod_wsgi-1.1_0 compiles against Python 2.4 but links against system Python 2.5 -------------------------------+-------------------------------------------- Reporter: francis@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: mod_wsgi -------------------------------+-------------------------------------------- After installing mod_wsgi (and adding a LoadModule for it to httpd.conf) I get warnings in the apache error_log about Python versions: {{{ [Tue Mar 17 14:17:59 2009] [notice] SIGHUP received. Attempting to restart [Tue Mar 17 14:18:00 2009] [notice] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads. [Tue Mar 17 14:18:00 2009] [notice] mod_python: using mutex_directory /tmp [Tue Mar 17 14:18:00 2009] [notice] Digest: generating secret for digest authentication ... [Tue Mar 17 14:18:00 2009] [notice] Digest: done [Tue Mar 17 14:18:00 2009] [warn] mod_wsgi: Compiled for Python/2.4.6. [Tue Mar 17 14:18:00 2009] [warn] mod_wsgi: Runtime using Python/2.5.1. [Tue Mar 17 14:18:00 2009] [warn] mod_wsgi: Python module path '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip:/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/:/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /plat- darwin:/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /plat- mac:/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /plat-mac/lib- scriptpackages:/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/../../Extras/lib/python:/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /lib- tk:/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /lib-dynload'. [Tue Mar 17 14:18:00 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8j DAV/2 mod_python/3.3.1 Python/2.4.6 mod_wsgi/1.1 Python/2.5.1 configured -- resuming normal operations }}} I am using OS X 10.5.6 on Intel. "otool" shows that mod_wsgi.so is indeed linked against Python 2.5: {{{ # otool -L /opt/local/apache2/modules/mod_wsgi.so /opt/local/apache2/modules/mod_wsgi.so: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.3) /System/Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.1) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) }}} Workaround: set up LDFLAGS by hand as follows: 1) port configure mod_wsgi 2) edit /opt/local/var/macports/sources/rsync.macports.org/release/ports/www/mod_wsgi/work/mod_wsgi-1.1/Makefile and change the line {{{ LDFLAGS = -framework Python -u _PyMac_Error /opt/local/Library/Frameworks/ }}} to {{{ LDFLAGS = -framework Python -u _PyMac_Error -F/opt/local/Library/Frameworks/ }}} i.e. add "-F" before "/opt/local/Library/Frameworks/" 3) port install mod_wsgi -- Ticket URL: <http://trac.macports.org/ticket/18879> MacPorts <http://www.macports.org/> Ports system for Mac OS