Please help,
I am having trouble to install pyhdf on CentOS7. I should say, I am a newbie to linux
Pyhdf needs HDF to be installed and so far I've tried the following:
first install HDF with ./configure, gmake && gmake check. However, check exit with 6 errors.
Then I used "yum install hdf-devel" This way, HDF got installed on the computer but pyhdf still exists with errors. As for the phydf I tried both "pip install pyhdf" and "python setup.py install" but always end up unsuccessful. Please see the log below for details. Thank you!
$ python setup.py build running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building extension "pyhdf._hdfext" sources build_src: building npy-pkg config files running build_py running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext building 'pyhdf._hdfext' extension compiling C sources C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python36/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -std=c99
compile options: '-I/usr/local/hdf4/include -I/home/npec/oop/oop_venv/lib64/python3.6/site-packages/numpy/core/include -I/home/npec/oop/oop_venv/include -I/opt/rh/rh-python36/root/usr/include/python3.6m -c' extra options: '-DNOSZIP' gcc -pthread -shared -L/opt/rh/rh-python36/root/usr/lib64-Wl,-z,relro -Wl,-rpath,/opt/rh/rh-python36/root/usr/lib64 -Wl,--enable-new-dtags build/temp.linux-x86_64-3.6/pyhdf/hdfext_wrap.o -L/usr/local/hdf4/lib -L/usr/local/jpeg/lib -L/usr/local/zlib/lib -L/usr/local/jpeg/lib -L/usr/local/zlib/lib -L/usr/local/szip/lib -L/usr/lib -L/usr/local/lib -L/lib -L/opt/rh/rh-python36/root/usr/lib64 -lmfhdf -ldf -ljpeg -lz -lpython3.6m -o build/lib.linux-x86_64-3.6/pyhdf/_hdfext.cpython-36m-x86_64-linux-gnu.so /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(mfsd.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(putget.o): relocation R_X86_64_32S against
.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(putgetg.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(string.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(var.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(array.o): relocation R_X86_64_32S against
.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(attr.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(cdf.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(dim.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(file.o): relocation R_X86_64_32 against undefined symbol
rlim' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(hdfsds.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(iarray.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(error.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(nssdc.o): relocation R_X86_64_32S against
.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libmfhdf.a(xdrposix.o): relocation R_X86_64_32S against.data' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(cszip.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(dfconv.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(dfgroup.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(dfknat.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(dfkswap.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(hblocks.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(hchunks.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(hcomp.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(herr.o): relocation R_X86_64_32S against
.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(hextelt.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(hfile.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(hfiledd.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(mcache.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(mfan.o): relocation R_X86_64_32 against symbolANIanncmp' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(mstdio.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(tbbt.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(vattr.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(vg.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(vgp.o): relocation R_X86_64_32 against symbol
vdestroynode' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(vhi.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(vio.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(vparse.o): relocation R_X86_64_32S against.bss' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(vrw.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(vsfld.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(atom.o): relocation R_X86_64_32S against
.bss' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(bitvect.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(cdeflate.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(cnbit.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(cnone.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(crle.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(cskphuff.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(dynarray.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(glist.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(hbitio.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(hbuffer.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(hcompri.o): relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(vconv.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(dfcomp.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(dfimcomp.o): relocation R_X86_64_32 against
.bss' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(dfjpeg.o): relocation R_X86_64_32S against symbolhdf_init_destination' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(dfrle.o): relocation R_X86_64_32S against
.bss' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libdf.a(dfunjpeg.o): relocation R_X86_64_32S against symbolhdf_init_source' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcapimin.o): relocation R_X86_64_32 against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcapistd.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcparam.o): relocation R_X86_64_32S against
.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcinit.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcmaster.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcmarker.o): relocation R_X86_64_32S against symboljpeg_natural_order' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcmainct.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcprepct.o): relocation R_X86_64_32S against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jccoefct.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jccolor.o): relocation R_X86_64_32S against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcsample.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jchuff.o): relocation R_X86_64_32S against symboljpeg_natural_order' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcphuff.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcdctmgr.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jfdctfst.o): relocation R_X86_64_32 against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jfdctflt.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jfdctint.o): relocation R_X86_64_32 against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdapimin.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdapistd.o): relocation R_X86_64_32 against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdmaster.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdinput.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdmarker.o): relocation R_X86_64_32S against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdhuff.o): relocation R_X86_64_32S against
.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdphuff.o): relocation R_X86_64_32S against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdmainct.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdcoefct.o): relocation R_X86_64_32S against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdpostct.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jddctmgr.o): relocation R_X86_64_32 against symboljpeg_idct_2x2' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jidctfst.o): relocation R_X86_64_32 against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jidctflt.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jidctint.o): relocation R_X86_64_32 against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jidctred.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdsample.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdcolor.o): relocation R_X86_64_32S against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jquant1.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jquant2.o): relocation R_X86_64_32S against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jdmerge.o): relocation R_X86_64_32S against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jcomapi.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jutils.o): relocation R_X86_64_32 against
.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jerror.o): relocation R_X86_64_32S against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jmemmgr.o): relocation R_X86_64_32S against
.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libjpeg.a(jmemnobs.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libz.a(deflate.o): relocation R_X86_64_32S against
.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libz.a(inflate.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libz.a(inftrees.o): relocation R_X86_64_32S against
.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libz.a(trees.o): relocation R_X86_64_32S against.data' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libz.a(zutil.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libz.a(adler32.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libz.a(crc32.o): relocation R_X86_64_32 against
.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/hdf4/lib/libz.a(inffast.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status error: Command "gcc -pthread -shared -L/opt/rh/rh-python36/root/usr/lib64-Wl,-z,relro -Wl,-rpath,/opt/rh/rh-python36/root/usr/lib64 -Wl,--enable-new-dtags build/temp.linux-x86_64-3.6/pyhdf/hdfext_wrap.o -L/usr/local/hdf4/lib -L/usr/local/jpeg/lib -L/usr/local/zlib/lib -L/usr/local/jpeg/lib -L/usr/local/zlib/lib -L/usr/local/szip/lib -L/usr/lib -L/usr/local/lib -L/lib -L/opt/rh/rh-python36/root/usr/lib64 -lmfhdf -ldf -ljpeg -lz -lpython3.6m -o build/lib.linux-x86_64-3.6/pyhdf/_hdfext.cpython-36m-x86_64-linux-gnu.so" failed with exit status 1