On 06/05/2014, at 8:25 AM, Carsten Fuchs <[email protected]> wrote:
> Hi all, > > I'm trying to upgrade an old Ubuntu 10.04 LTS system from Python 2.6 to > Python 2.7. > > Installing Python 2.7 was successful, including --enable-shared as explain in > the mod_wsgi documentation (InstallationIssues): > > $ cd Python-2.7.6 > $ ./configure --enable-shared > $ make > $ sudo make altinstall > > These steps were also necessary: > > $ cd /usr/local/lib/python2.7/config/ > $ sudo ln -s ../../libpython2.7.so . This shouldn't be necessary, the link line uses: -L/usr/local/lib -L/usr/local/lib/python2.7/config and so it looks in both locations anyway. > $ dir > insgesamt 6068 > -rw-r--r-- 1 root root 2200 2014-05-05 23:35 config.c > -rw-r--r-- 1 root root 1507 2014-05-05 23:35 config.c.in > -rwxr-xr-x 1 root root 7122 2014-05-05 23:35 install-sh > -rw-r--r-- 1 root root 6102842 2014-05-05 23:35 libpython2.7.a > lrwxrwxrwx 1 root root 21 2014-05-05 23:38 libpython2.7.so -> > ../../libpython2.7.so > -rw-r--r-- 1 root root 47796 2014-05-05 23:35 Makefile > -rwxr-xr-x 1 root root 7431 2014-05-05 23:35 makesetup > -rw-r--r-- 1 root root 4428 2014-05-05 23:35 python.o > -rw-r--r-- 1 root root 18484 2014-05-05 23:35 Setup > -rw-r--r-- 1 root root 368 2014-05-05 23:35 Setup.config > -rw-r--r-- 1 root root 41 2014-05-05 23:35 Setup.local > > & cd /usr/local/bin/ > $ sudo ldconfig # or else we cannot call the python2.7 binary More likely you should have set LD_RUN_PATH when compiling mod_wsgi. See: http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Python_Shared_Library http://code.google.com/p/modwsgi/wiki/InstallationIssues#Unable_To_Find_Python_Shared_Library > Using Python 2.7 at the command line and installing pip now works normally. If the issue was that 'python' itself wasn't running because it couldn't find the shared library, then that is distinct from mod_wsgi, but you could have used the same LD_RUN_PATH workaround when building Python itself. > I next tried to proceed with mod_wsgi installation as documented, as above > taking issues mentioned in InstallationIssues into account: > > $ cd ~/Downloads > $ tar -xzvf mod_wsgi-3.4.tar.gz > $ cd mod_wsgi-3.4/ > $ ./configure --with-python=/usr/local/bin/python2.7 > > $ make > /usr/bin/apxs2 -c -I/usr/local/include/python2.7 -DNDEBUG mod_wsgi.c > -L/usr/local/lib -L/usr/local/lib/python2.7/config -lpython2.7 -lpthread > -ldl -lutil -lm > /usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static > i486-linux-gnu-gcc -prefer-pic -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE > -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 > -I/usr/include/openssl -I/usr/include/xmltok -pthread > -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 > -I/usr/local/include/python2.7 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && > touch mod_wsgi.slo > In file included from /usr/local/include/python2.7/Python.h:8, > from mod_wsgi.c:142: > /usr/local/include/python2.7/pyconfig.h:1179:1: warning: "_POSIX_C_SOURCE" > redefined > In file included from /usr/include/sys/types.h:27, > from /usr/include/apr-1.0/apr.h:131, > from /usr/include/apache2/ap_config.h:25, > from /usr/include/apache2/httpd.h:43, > from mod_wsgi.c:34: > /usr/include/features.h:158:1: warning: this is the location of the previous > definition > In file included from /usr/local/include/python2.7/Python.h:8, > from mod_wsgi.c:142: > /usr/local/include/python2.7/pyconfig.h:1201:1: warning: "_XOPEN_SOURCE" > redefined > In file included from /usr/include/sys/types.h:27, > from /usr/include/apr-1.0/apr.h:131, > from /usr/include/apache2/ap_config.h:25, > from /usr/include/apache2/httpd.h:43, > from mod_wsgi.c:34: > /usr/include/features.h:160:1: warning: this is the location of the previous > definition > /usr/share/apr-1.0/build/libtool --silent --mode=link --tag=disable-static > i486-linux-gnu-gcc -o mod_wsgi.la -rpath /usr/lib/apache2/modules -module > -avoid-version mod_wsgi.lo -L/usr/local/lib > -L/usr/local/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm > > $ dir > insgesamt 656 > -rw-r--r-- 1 lori lori 3477 2014-05-06 00:05 config.log > -rwxr-xr-x 1 lori lori 20579 2014-05-06 00:05 config.status > -rwxr-xr-x 1 lori lori 80107 2012-08-23 05:10 configure > -rw-r--r-- 1 lori lori 5886 2012-08-23 05:10 configure.ac > -rw-r--r-- 1 lori lori 11358 2012-08-23 05:10 LICENCE > -rw-r--r-- 1 lori lori 1381 2014-05-06 00:05 Makefile > lrwxrwxrwx 1 lori lori 16 2014-05-06 00:05 Makefile.in -> posix-ap2X.mk.in > -rw-r--r-- 1 lori lori 484936 2012-08-23 05:10 mod_wsgi.c > -rw-r--r-- 1 lori lori 1029 2014-05-06 00:05 mod_wsgi.la > -rw-r--r-- 1 lori lori 294 2014-05-06 00:05 mod_wsgi.lo > -rw-r--r-- 1 lori lori 0 2014-05-06 00:05 mod_wsgi.slo > -rw-r--r-- 1 lori lori 1195 2012-08-23 05:10 posix-ap1X.mk.in > -rw-r--r-- 1 lori lori 1247 2012-08-23 05:10 posix-ap2X.mk.in > -rw-r--r-- 1 lori lori 18063 2012-08-23 05:12 README > -rw-r--r-- 1 lori lori 907 2012-08-23 05:10 win32-ap22py26.mk > -rw-r--r-- 1 lori lori 907 2012-08-23 05:10 win32-ap22py27.mk > -rw-r--r-- 1 lori lori 907 2012-08-23 05:10 win32-ap22py31.mk > > Problem is that it creates a .la file, but no .so, and I have no idea why > that is so. The Makefile is about creating the .la file, so it seems like a > problem at the configure step, but I have no idea what might be wrong. The true output of the build is in the .libs sub directory. Running 'make install' would have grabbed the mod_wsgi.so from the .libs sub directory. Graham -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
