Форум сайта python.su
Здравствуйте.
Столкнулся с проблемой компиляции mod_wsgi v 3.3 под python2.7 на платформе amd64, под i386 не было никаких проблем.
Матерится следующим образом:
/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 x86_64-linux-gnu-gcc -prefer-pic -DLINUX=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/mysql -I/usr/include/openssl -I/usr/include/postgresql -I/usr/include/xmltok -pthread -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include/postgresql -I/usr/include/mysql -I/usr/local/include/python2.7 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
/usr/share/apr-1.0/build/libtool --silent --mode=link --tag=disable-static x86_64-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
/usr/bin/ld: /usr/local/lib/libpython2.7.a(node.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Ошибка 1
Офлайн
в CFLAGS/LDFLAGS -fPIC пробовал добавить?
вот почитай http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3
Отредактировано (Ноя. 3, 2010 10:32:18)
Офлайн
Разобрался сам.
Что б все заработало нужно скомпилить питон с совместимостью:
./configure --enable-shared
python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
/sbin/ldconfig -v | less
Офлайн