Problems building zlib module on RHEL

  • Thread starter mhearne808[insert-at-sign-here]gmail[insert-dot-he
  • Start date
M

mhearne808[insert-at-sign-here]gmail[insert-dot-he

I can't seem to get the zlib module to build on an RHEL box.

I did the following:
1) Download zlib 1.2.3
2) configure;make;make install
3) Download python 2.5.2
4) configure;make;make install
5) >>> import zlib => "ImportError: No module named zlib"

In the make install step for python, I notice there are the following
errors:

building 'zlib' extension
gcc -pthread -shared build/temp.linux-x86_64-2.5/home/shake/python/
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: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32
against `a local symbol' can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

Does anyone have any hints on how to get around this?

system info:
kernel : 2.6.9-67.0.1.ELsmp
gcc : 3.4.6

Thanks,

Mike
 
M

mhearne808[insert-at-sign-here]gmail[insert-dot-he

I can't seem to get the zlib module to build on an RHEL box.

I did the following:
1) Download zlib 1.2.3
2) configure;make;make install
3) Download python 2.5.2
4) configure;make;make install
5) >>> import zlib => "ImportError: No module named zlib"

In the make install step for python, I notice there are the following
errors:

building 'zlib' extension
gcc -pthread -shared build/temp.linux-x86_64-2.5/home/shake/python/
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: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32
against `a local symbol' can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

Does anyone have any hints on how to get around this?

system info:
kernel : 2.6.9-67.0.1.ELsmp
gcc : 3.4.6

Thanks,

Mike

I figured it out, although it wasn't obvious... You have to compile
zlib as a shared library by running "configure -s".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top