Building Python 3.2.3 on redhat 5: missing _posixsubprocess

Posted by Oz123 on Server Fault See other posts from Server Fault or by Oz123
Published on 2012-05-14T12:45:51Z Indexed on 2012/09/05 21:40 UTC
Read the original article Hit count: 432

Filed under:
|

I am trying to build Python3 on a RHEL 5.7 machine, I successful managed to build Python 3.2.2, with :

# Install required build dependencies
yum 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.bz2
tar -xjf Python-3.2.tar.bz2
cd Python-3.2

# Configure the build with a prefix (install dir) of /opt/python3, compile, and install.
./configure --prefix=/opt/python3
make

But I am failing (?) with Python 3.2.3:

Failed to build these modules:
_posixsubprocess     

Is this a problem that should bother me ? How do I build it? I found this patch, but it's not included in sources Python 3.2.3 I obtained from the website ...
Applying this patch on my sources, didn't solve the problem ...

Here is the output from stderr:

 ~/tmp/Python-3.2.3 $ make > build.log
ldd: 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.o
ar 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.o
building '_posixsubprocess' extension
gcc -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

© Server Fault or respective owner

Related posts about redhat

Related posts about python