hdf5 libz.a unrecognized symbol error

Hi it would be helpful if some one can help with the following error. I have
compile zlib from source, set the path using --with-zlib option and set
LD_LIBRARY_PATH and CC and FC environment variables. I have all the required
files include make, awk, perl etc. But cannot resolve the following message
after many attempts. Its a 64 bit architecture machine, the interesting
thing is that everything worked on an identical machine but it refuses to
work on this particular machine. Please HELP.

Ash

/usr/bin/ld: /usr/local/lib/libz.a(compress.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
make[1]: *** [libhdf5.la] Error 1
make[1]: Leaving directory
`/home/beastmaster/Desktop/QACC/WRF/hdf5-1.8.3/src'
make: *** [check-recursive] Error 1

It looks as if you built zlib without -fPIC (as stated in the error message).
You did not bother building zlib as a loadable module (a shared library)?

Cheers,
Ger

Ashutosh Sharma <sharmaa@hope.ac.uk> 11/02/09 11:18 AM >>>

Hi it would be helpful if some one can help with the following error. I have
compile zlib from source, set the path using --with-zlib option and set
LD_LIBRARY_PATH and CC and FC environment variables. I have all the required
files include make, awk, perl etc. But cannot resolve the following message
after many attempts. Its a 64 bit architecture machine, the interesting
thing is that everything worked on an identical machine but it refuses to
work on this particular machine. Please HELP.

Ash

/usr/bin/ld: /usr/local/lib/libz.a(compress.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
make[1]: *** [libhdf5.la] Error 1
make[1]: Leaving directory
`/home/beastmaster/Desktop/QACC/WRF/hdf5-1.8.3/src'
make: *** [check-recursive] Error 1