python3.1.1_python 3.1.1 with--enable shared:将不会构建任何扩展

在RHEL 5.3 64位系统上,使用`--enable-shared`构建Python 3.1.1时遇到问题,无法编译扩展模块,而没有该选项时构建正常。尽管如此,仍能构建mod_wsgi,但在Apache下运行时出现符号未定义错误。
摘要由CSDN通过智能技术生成

摘要:使用--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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值