python3.1.1_python 3.1.1 with--enable shared:将不会构建任何扩展
摘要:使用--enable shared在RHEL 5.3 64位上構建Python3.1無法編譯所有擴展。建筑“正常”工作良好,沒有任何問題。
請注意
這個問題似乎模糊了編程和系統管理之間的界限。但是,我相信因為它必須直接處理操作系統問題和編程問題,所以我會在stackoverflow和serverfault上交叉發布它。也在
Python 3.1.1 with --enable-shared : will not build any extensions
. 謝謝!
問題:
在RHEL 5.3 64位上構建Python3.1
--enable-shared
無法編譯所有擴展。建筑“正常”工作良好,沒有任何問題。
我可以很好地構建Python3.1,但是當構建為共享庫時,它會發出許多警告(見下文),并且拒絕構建
c
基于模塊。盡管失敗了,我仍然可以針對它構建mod_wsgi 3.0c5,并在apache下運行它。不用說,python的功能已經大大減少了……
有趣的是,Python3.2a0(來自SVN)可以使用--enable shared進行良好的編譯,而mod_wsgi可以針對它進行良好的編譯。但是當啟動apache時,我得到:
Cannot load /etc/httpd/modules/mod_wsgi.so into server: /etc/httpd/modules/mod_wsgi.so: undefined symbol: PyCObject_FromVoidPtr
這個項目是一個長期的項目,所以如果需要的話,我可以使用alpha質量軟件。下面是關于這個問題的更多細節。
主持人:
戴爾PowerEdge
英特爾氙氣
RHEL 5.3 64位
沒什么特別的
建造:
Python3.1.1源代碼分發
很好地配合
./configure
不適合
./configure --enable-shared
(
export CFLAGS="-fPIC"
已經完成)
制作輸出
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE -c ./Modules/_weakref.c -o Modules/_weakref.o
building 'bz2' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I./Include -I/usr/local/include -IInclude -I/home/build/RPMBUILD/BUILD/Python-3.1.1 -c /home/build/RPMBUILD/BUILD/Python-3.1.1/Modules/bz2module.c -o build/temp.linux-x86_64-3.1/home/build/RPMBUILD/BUILD/Python-3.1.1/Modules/bz2module.o
gcc -pthread -shared -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes build/temp.linux-x86_64-3.1/home/build/RPMBUILD/BUILD/Python-3.1.1/Modules/bz2module.o -L/usr/local/lib -L. -lbz2 -lpython3.1 -o build/lib.linux-x86_64-3.1/bz2.so
/usr/bin/ld: /usr/local/lib/libpython3.1.a(abstract.o): relocation R_X86_64_32 against 'a local symbol' can not be used when making a shared object; recompile with -fPIC
Failed to build these modules:
_bisect _codecs_cn _codecs_hk
_codecs_iso2022 _codecs_jp _codecs_kr
_codecs_tw _collections _csv
_ctypes _ctypes_test _curses
_curses_panel _dbm _elementtree
_gdbm _hashlib _heapq
_json _lsprof _multibytecodec
_multiprocessing _pickle _random
_socket _sqlite3 _ssl
_struct _testcapi array
atexit audioop binascii
bz2 cmath crypt
datetime fcntl grp
itertools math mmap
nis operator ossaudiodev
parser pyexpat readline
resource select spwd
syslog termios time
unicodedata zlib
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的python3.1.1_python 3.1.1 with--enable shared:将不会构建任何扩展的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 千兆路由器怎么连接摄像头960p摄像头如
- 下一篇: 连发键盘设置(连发键怎么设置)