P
peter s.
I am trying to build Python from source on a RHEL system where I do
not have root access. There are two modules that I am having trouble
with: zlib & binascii.
zlib -- This seems like a make configuration issue. I have noticed
that 'gcc -v' returns '--with-system-zlib':
$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --
enable-checking=release --with-system-zlib --enable-__cxa_atexit --
disable-libunwind-exceptions --enable-libgcj-multifile --enable-
languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --
disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-
gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)
and then when I run 'make' I see:
building 'zlib' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -
Wstrict-prototypes -I. -I/location/of/Python-2.5.2/./Include -I. -
IInclude -I./Include -I/usr/local/include -I/location/of/Python-2.5.2/
Include -I/location/of/Python-2.5.2 -c /location/of/Python-2.5.2/
Modules/zlibmodule.c -o build/temp.linux-x86_64-2.5/location/of/
Python-2.5.2/Modules/zlibmodule.o
gcc -pthread -shared build/temp.linux-x86_64-2.5/location/of/
Python-2.5.2/Modules/zlibmodule.o -L/usr/local/lib -lz -o build/
lib.linux-x86_64-2.5/zlib.so
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for
-lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -
lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
It seems as though I need to force the build process to use the zlib
that comes with python source.
binascii -- I have no idea what binascii requires in order to compile,
so I am clueless. It properly compiles with 2.5.2, but fails to build
in 2.6.1. I am OK using 2.5.2 if I could get zlib to work.
Thanks,
Peter
not have root access. There are two modules that I am having trouble
with: zlib & binascii.
zlib -- This seems like a make configuration issue. I have noticed
that 'gcc -v' returns '--with-system-zlib':
$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --
enable-checking=release --with-system-zlib --enable-__cxa_atexit --
disable-libunwind-exceptions --enable-libgcj-multifile --enable-
languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --
disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-
gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)
and then when I run 'make' I see:
building 'zlib' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -
Wstrict-prototypes -I. -I/location/of/Python-2.5.2/./Include -I. -
IInclude -I./Include -I/usr/local/include -I/location/of/Python-2.5.2/
Include -I/location/of/Python-2.5.2 -c /location/of/Python-2.5.2/
Modules/zlibmodule.c -o build/temp.linux-x86_64-2.5/location/of/
Python-2.5.2/Modules/zlibmodule.o
gcc -pthread -shared build/temp.linux-x86_64-2.5/location/of/
Python-2.5.2/Modules/zlibmodule.o -L/usr/local/lib -lz -o build/
lib.linux-x86_64-2.5/zlib.so
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for
-lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -
lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
It seems as though I need to force the build process to use the zlib
that comes with python source.
binascii -- I have no idea what binascii requires in order to compile,
so I am clueless. It properly compiles with 2.5.2, but fails to build
in 2.6.1. I am OK using 2.5.2 if I could get zlib to work.
Thanks,
Peter