Project

General

Profile

Problem in istalling eccodes in CenOS 7

Added by AJILESH P over 3 years ago

HI, I am following these (http://www.studytrails.com/blog/install-climate-data-operator-cdo-with-netcdf-grib2-and-hdf5-support/#main) steps to build and install cdo in centOS 7. While trying to install grib_api or eccodes, getting errors saying ".rodata.str1.1' can not be used when making a shared object; recompile with -fPIC". The full error message is pasted below. Any help would appreciated.

[ 68%] Building C object src/CMakeFiles/eccodes.dir/grib_yacc.c.o
[ 68%] Building C object src/CMakeFiles/eccodes.dir/grib_lex.c.o
Linking C shared library ../lib/libeccodes.so
/home/regcm/cdo_install/lib/libjasper.a(jas_stream.o): In function `jas_stream_tmpfile':
/home/regcm/cdo_install/jasper-1.900.1/src/libjasper/base/jas_stream.c:368: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jas_image.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jas_seq.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jas_stream.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jas_version.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_dec.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_enc.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_math.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_mct.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_mqdec.o): relocation R_X86_64_32S against symbol `jpc_mqstates' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_mqenc.o): relocation R_X86_64_32S against symbol `jpc_mqstates' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_tagtree.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_t1cod.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_t1dec.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_t1enc.o): relocation R_X86_64_32S against undefined symbol `jpc_zcctxnolut' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_tsfb.o): relocation R_X86_64_32 against symbol `jpc_ns_qmfb2d' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_t2cod.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_t2dec.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_t2enc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_util.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jas_cm.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jas_debug.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jas_icc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jas_tvp.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_bs.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: /home/regcm/cdo_install/lib/libjasper.a(jpc_cs.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make2: * [lib/libeccodes.so] Error 1
make1:
[src/CMakeFiles/eccodes.dir/all] Error 2
make: *
* [all] Error 2
(base) [regcm@aura build]$