在redhat 5上构建Python 3.2.3:缺少_posixsubprocess

在redhat 5上构建Python 3.2.3:缺少_posixsubprocess,第1张

概述我正在尝试在RHEL 5.7机器上构建 Python3,我成功地构建了Python 3.2.2,其中: # Install required build dependenciesyum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel# Fetch and extract 我正在尝试在RHEL 5.7机器上构建 Python3,我成功地构建了Python 3.2.2,其中:
# Install required build dependencIEsyum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel# Fetch and extract source. Please refer to http://www.python.org/download/releases# to ensure the latest source is used.wget http://www.python.org/ftp/python/3.2/Python-3.2.tar.bz2tar -xjf Python-3.2.tar.bz2cd Python-3.2# Configure the build with a prefix (install dir) of /opt/python3,compile,and install../configure --prefix=/opt/python3make

但我在Python 3.2.3中失败了(?):

Failed to build these modules:_posixsubprocess

这是一个应该打扰我的问题吗?我该如何构建它?
我找到了this patch,但它没有包含在我从网站上获得的Python 3.2.3源代码中……

这是stderr的输出:

~/tmp/Python-3.2.3 $make > build.logldd: warning: you do not have execution permission for `/usr/local/lib/libreadline.so'/usr/bin/ld: skipPing incompatible /usr/local/lib/libreadline.so when searching for -lreadline/usr/bin/ld: skipPing incompatible /usr/local/lib/libreadline.a when searching for -lreadline/home/oznahum/tmp/Python-3.2.3/Modules/_posixsubprocess.c: In function '_close_open_fd_range_safe':/home/oznahum/tmp/Python-3.2.3/Modules/_posixsubprocess.c:205: error: 'O_CLOEXEC' undeclared (first use in this function)/home/oznahum/tmp/Python-3.2.3/Modules/_posixsubprocess.c:205: error: (Each undeclared IDentifIEr is reported only once/home/oznahum/tmp/Python-3.2.3/Modules/_posixsubprocess.c:205: error: for each function it appears in.)/usr/bin/ld: skipPing incompatible /usr/local/lib/libz.so when searching for -lz/usr/bin/ld: skipPing incompatible /usr/local/lib/libz.so when searching for -lz~/tmp/Python-3.2.3 $grep posix build.log gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes    -I. -IInclude -I./Include    -DPy_BUILD_CORE  -c ./Modules/posixmodule.c -o Modules/posixmodule.oar rc libpython3.2m.a Modules/_threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/_functoolsmodule.o  Modules/operator.o  Modules/_collectionsmodule.o  Modules/itertoolsmodule.o  Modules/_localemodule.o  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/xxsubtype.obuilding '_posixsubprocess' extensiongcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -IInclude -I/home/oznahum/localroot/include -I. -I./Include -I/usr/local/include -I/home/oznahum/tmp/Python-3.2.3 -c /home/oznahum/tmp/Python-3.2.3/Modules/_posixsubprocess.c -o build/temp.linux-x86_64-3.2/home/oznahum/tmp/Python-3.2.3/Modules/_posixsubprocess.o_posixsubprocess
@R_404_6120@ 好的……我在这里回答,不要回答这个问题.
我重新下载了Python-3.2.3源并检查它们.他们确实不包括那个补丁.
我重新应用了补丁并在CentOS-5.7和RedHat-5.7上测试了该建筑物.我设法编译没有错误.
所以,我想关键是要正确应用补丁.
我的失败构建在Modules / _posixsubprocess中:
199 static voID200 _close_open_fd_range_safe(int start_fd,int end_fd,PyObject* py_fds_to_keep)201 {202     int fd_dir_fd;203     if (start_fd >= end_fd)204         return;205         fd_dir_fd = open(FD_DIR,O_RDONLY | O_CLOEXEC,0);206 #ifdef O_CLOEXEC207      fd_dir_fd = open(FD_DIR,0);208 #else209     fd_dir_fd = open(FD_DIR,O_RDONLY,0);210 #ifdef FD_CLOEXEC

第205行应该已被删除…

总结

以上是内存溢出为你收集整理的在redhat 5上构建Python 3.2.3:缺少_posixsubprocess全部内容,希望文章能够帮你解决在redhat 5上构建Python 3.2.3:缺少_posixsubprocess所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/1036410.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存