make[2]: *** [libcdo_la-fieldc_complex.lo] Error 1
Added by Gianluca Falconi over 1 year ago
Hi everyone, im trying to compile CDO on a Amazon Linux 2.
I had built hdf5 1.8.22 and proj 6.1.0 in custom paths, i run this commands:
export CFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H (from https://code.mpimet.mpg.de/boards/1/topics/7600?r=7601#message-7601)
./configure --prefix=/usr/local/cdo-2.1.1 --with-szlib=/usr/local --with-hdf5=/root/temp/hdf5-1.8.22/build --with-netcdf=/usr/local/netcdf4 --with-proj=/root/temp/proj-6.1.0/build
make -j2
and i encounter this error:
libtool: compile: /opt/intel/oneapi/compiler/latest/linux/bin/intel64/icpc -std=gnu++17 -DHAVE_CONFIG_H -I. -I../libcdi/src -I../src/mpim_grid -DYAC_FOR_CDO -I/usr/local/netcdf4/include -I/usr/local/include -I/root/temp/proj-6.1.0/build/include -I/usr/local/netcdf4/include -I/root/temp/hdf5-1.8.22/build/include -I/usr/local/include -DgFortran -DCDI_SIZE_TYPE=size_t -O3 -xHost -ip -no-prec-div -static-intel -fopenmp -pthread -MT libcdo_la-field_memory.lo -MD -MP -MF .deps/libcdo_la-field_memory.Tpo -c field_memory.cc -fPIC -DPIC -o .libs/libcdo_la-field_memory.o
make2: * [libcdo_la-fieldc_complex.lo] Error 1
make2: Waiting for unfinished jobs....
libtool: compile: /opt/intel/oneapi/compiler/latest/linux/bin/intel64/icpc -std=gnu++17 -DHAVE_CONFIG_H -I. -I../libcdi/src -I../src/mpim_grid -DYAC_FOR_CDO -I/usr/local/netcdf4/include -I/usr/local/include -I/root/temp/proj-6.1.0/build/include -I/usr/local/netcdf4/include -I/root/temp/hdf5-1.8.22/build/include -I/usr/local/include -DgFortran -DCDI_SIZE_TYPE=size_t -O3 -xHost -ip -no-prec-div -static-intel -fopenmp -pthread -MT libcdo_la-field_memory.lo -MD -MP -MF .deps/libcdo_la-field_memory.Tpo -c field_memory.cc -o libcdo_la-field_memory.o >/dev/null 2>&1
mv -f .deps/libcdo_la-field_memory.Tpo .deps/libcdo_la-field_memory.Plo
make2: Leaving directory `/root/temp/cdo-2.1.1/src'
make1: [all] Error 2
make1: Leaving directory `/root/temp/cdo-2.1.1/src'
make: * [all-recursive] Error 1
Any suggestion?
Replies (8)
RE: make[2]: *** [libcdo_la-fieldc_complex.lo] Error 1 - Added by Estanislao Gavilan over 1 year ago
Hi Gianluca,
I cannot see the error you are having. Can you try to find the log file? Also, I noticed that your libraries are in the root directory. Could it be a permission problem? Most of the building issues are related with paths or not found libraries. If you can find the log file (blabla.log), we will be able to spot the problem
Kind regards,
Estanislao
RE: make[2]: *** [libcdo_la-fieldc_complex.lo] Error 1 - Added by Gianluca Falconi over 1 year ago
Hi Estanislao,
First of all it cannot be a permission problem as I'm operating as root, also i cannot access a log as the "make" command doesn't generate any log but system response is what I reported in my previous message.
Kind Regards,
Gianluca
RE: make[2]: *** [libcdo_la-fieldc_complex.lo] Error 1 - Added by Estanislao Gavilan over 1 year ago
Hi Gianluca,
I am not sure if this is the issue, but that post says that you have to add that setting to CFLAGS and CXXFLAGS. Did you try to include "export CXXFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"?
Kind regards,
Estanislao
RE: make[2]: *** [libcdo_la-fieldc_complex.lo] Error 1 - Added by Ralf Mueller over 1 year ago
hi!
Gianluca, you can call make V=1
instead of make
for more output. uploading the config.log
would also be helpful, because it describes the relevant parts of your system.
In general: Why do you compile CDO? Did you check an installation with conda instead?
RE: make[2]: *** [libcdo_la-fieldc_complex.lo] Error 1 - Added by Gianluca Falconi over 1 year ago
Hi Estanislao, Ralf,
in the attachments you can find the config.log file.
I've tried to set the environment variable "CXXFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" and to use the "make V=1", and now the output is:
libtool: link: /opt/intel/oneapi/compiler/latest/linux/bin/intel64/icpc -std=gnu++17 -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -fopenmp -o cdo cdo-cdo.o cdo-Adisit.o cdo-Afterburner.o cdo-Arith.o cdo-Arithc.o cdo-Arithdays.o cdo-Arithlat.o cdo-Bitrounding.o cdo-Cat.o cdo-CDIread.o cdo-CDItest.o cdo-CDIwrite.o cdo-Change.o cdo-Change_e5slm.o cdo-Cloudlayer.o cdo-CMOR.o cdo-CMOR_lite.o cdo-CMOR_table.o cdo-Collgrid.o cdo-Command.o cdo-Comp.o cdo-Compc.o cdo-Complextorect.o cdo-Cond.o cdo-Cond2.o cdo-Condc.o cdo-Consecstat.o cdo-Copy.o cdo-DCW_util.o cdo-Dayarith.o cdo-Deltat.o cdo-Deltime.o cdo-Depth.o cdo-Derivepar.o cdo-Detrend.o cdo-Diff.o cdo-Distgrid.o cdo-Duplicate.o cdo-EOFs.o cdo-Eof3d.o cdo-EcaIndices.o cdo-EcaEtccdi.o cdo-Echam5ini.o cdo-Enlarge.o cdo-Enlargegrid.o cdo-Ensstat.o cdo-Ensstat3.o cdo-Ensval.o cdo-Eofcoeff.o cdo-Eofcoeff3d.o cdo-EstFreq.o cdo-Exprf.o cdo-FC.o cdo-Filedes.o cdo-Fillmiss.o cdo-Filter.o cdo-Fldrms.o cdo-Fldstat.o cdo-Fldstat2.o cdo-Fourier.o cdo-Gengrid.o cdo-Gradsdes.o cdo-Gridboxstat.o cdo-Gridcell.o cdo-Gridsearch.o cdo-Harmonic.o cdo-Hi.o cdo-Histogram.o cdo-Importamsr.o cdo-Importbinary.o cdo-Importcmsaf.o cdo-Importobs.o cdo-Importfv3grid.o cdo-Info.o cdo-Input.o cdo-Intgrid.o cdo-Intgridtraj.o cdo-Intlevel.o cdo-Intlevel3d.o cdo-Intntime.o cdo-Inttime.o cdo-Intyear.o cdo-Invert.o cdo-Invertlev.o cdo-Lic.o cdo-MapReduce.o cdo-Maskbox.o cdo-Mastrfu.o cdo-Math.o cdo-Merge.o cdo-Mergegrid.o cdo-Mergetime.o cdo-Merstat.o cdo-Monarith.o cdo-Mrotuv.o cdo-Mrotuvb.o cdo-NCL_wind.o cdo-Ninfo.o cdo-Nmldump.o cdo-Output.o cdo-Outputgmt.o cdo-Pack.o cdo-Pardup.o cdo-Pinfo.o cdo-Pressure.o cdo-Query.o cdo-Recttocomplex.o cdo-Regres.o cdo-Remap.o cdo-Remapweights.o cdo-Remapeta.o cdo-Remapstat.o cdo-Replace.o cdo-Replacevalues.o cdo-Rhopot.o cdo-Rotuv.o cdo-Runpctl.o cdo-Runstat.o cdo-Samplegrid.o cdo-Samplegridicon.o cdo-Seascount.o cdo-Seaspctl.o cdo-Seasstat.o cdo-Seasmonstat.o cdo-Selbox.o cdo-Selgridcell.o cdo-Select.o cdo-Selmulti.o cdo-Seloperator.o cdo-Selrec.o cdo-Selregion.o cdo-Selsurface.o cdo-Seltime.o cdo-Selvar.o cdo-Selyearidx.o cdo-Set.o cdo-Setattribute.o cdo-Setbox.o cdo-Setgrid.o cdo-Setgridcell.o cdo-Sethalo.o cdo-Setmiss.o cdo-Setpartab.o cdo-Setrcaname.o cdo-Settime.o cdo-Setzaxis.o cdo-Shiftxy.o cdo-Showinfo.o cdo-Showattribute.o cdo-Sinfo.o cdo-Smooth.o cdo-Sort.o cdo-Sorttimestamp.o cdo-Specinfo.o cdo-Spectral.o cdo-Spectrum.o cdo-Split.o cdo-Splitrec.o cdo-Splitsel.o cdo-Splittime.o cdo-Splityear.o cdo-Tee.o cdo-Templates.o cdo-Test.o cdo-Tests.o cdo-Timcount.o cdo-Timcumsum.o cdo-Timfill.o cdo-Timpctl.o cdo-Timselpctl.o cdo-Timselstat.o cdo-Timsort.o cdo-Timstat.o cdo-Timstat2.o cdo-Timstat3.o cdo-Tinfo.o cdo-Tocomplex.o cdo-Transpose.o cdo-Trend.o cdo-Trendarith.o cdo-Tstepcount.o cdo-Unpack.o cdo-Vargen.o cdo-Varrms.o cdo-Varsstat.o cdo-Vertintap.o cdo-Vertintgh.o cdo-Vertintml.o cdo-Vertintzs.o cdo-Vertstat.o cdo-Vertcum.o cdo-Vertwind.o cdo-Verifygrid.o cdo-Wct.o cdo-Wind.o cdo-WindTrans.o cdo-Writegrid.o cdo-Writerandom.o cdo-XTimstat.o cdo-Yeararith.o cdo-Yearmonstat.o cdo-Ydayarith.o cdo-Ydaypctl.o cdo-Ydaystat.o cdo-Ydrunpctl.o cdo-Ydrunstat.o cdo-Yhourarith.o cdo-Yhourstat.o cdo-Ymonarith.o cdo-Ymonpctl.o cdo-Ymonstat.o cdo-Yseaspctl.o cdo-Yseasstat.o cdo-Zonstat.o cdo-Maggraph.o cdo-Magplot.o cdo-Magvector.o cdo-template_parser.o cdo-results_template_parser.o cdo-magics_template_parser.o cdo-string_utilities.o cdo-cdo_magics_mapper.o -L/usr/local/netcdf4/lib -L/usr/local/lib -L/root/temp/proj-6.1.0/build/lib -L/root/temp/hdf5-1.8.22/build/lib ./.libs/libcdo.a ../libcdi/src/.libs/libcdi.a ../src/lib/yac/.libs/libyac.a ../src/lib/gradsdes/.libs/libgradsdes.a -L/root/temp/proj-5.0.0/build//lib ../src/lib/healpix/.libs/libhealpix.a /usr/local/lib/libproj.so /usr/local/netcdf4/lib/libnetcdf.so -lbz2 -lcurl /root/temp/hdf5-1.8.22/build/lib/libhdf5_hl.so /root/temp/hdf5-1.8.22/build/lib/libhdf5.so -lz -ldl /usr/local/lib/libsz.so -lm -lpthread -pthread -fopenmp -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/local/netcdf4/lib -Wl,-rpath,/root/temp/hdf5-1.8.22/build/lib -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/local/netcdf4/lib -Wl,-rpath,/root/temp/hdf5-1.8.22/build/lib
ld: warning: libhdf5_hl.so.8, needed by /usr/local/netcdf4/lib/libnetcdf.so, may conflict with libhdf5_hl.so.10
ld: warning: libhdf5.so.8, needed by /usr/local/netcdf4/lib/libnetcdf.so, may conflict with libhdf5.so.10
ld: warning: libhdf5_hl.so.8, needed by /usr/local/netcdf4/lib/libnetcdf.so, may conflict with libhdf5_hl.so.10
ld: warning: libhdf5.so.8, needed by /usr/local/netcdf4/lib/libnetcdf.so, may conflict with libhdf5.so.10
./.libs/libcdo.a(libcdo_la-grid_proj.o): In function `cdo_lcc_to_lonlat(int, unsigned long, double*, double*)':
grid_proj.cc:(.text+0x328e): undefined reference to `proj_errno_string'
grid_proj.cc:(.text+0x33db): undefined reference to `proj_errno_string'
./.libs/libcdo.a(libcdo_la-grid_proj.o): In function `cdo_stere_to_lonlat(int, unsigned long, double*, double*)':
grid_proj.cc:(.text+0x588e): undefined reference to `proj_errno_string'
grid_proj.cc:(.text+0x59db): undefined reference to `proj_errno_string'
./.libs/libcdo.a(libcdo_la-grid_proj.o): In function `cdo_sinu_to_lonlat(unsigned long, double*, double*)':
grid_proj.cc:(.text+0x65cf): undefined reference to `proj_errno_string'
./.libs/libcdo.a(libcdo_la-grid_proj.o):grid_proj.cc:(.text+0x720b): more undefined references to `proj_errno_string' follow
make[2]: *** [cdo] Error 1
make[2]: Leaving directory `/root/temp/cdo-2.1.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/temp/cdo-2.1.1/src'
make: *** [all-recursive] Error 1
P.S: a customer asked me to compile CDO, i don't know what they have to do with it; I can't install conda on this host, I've already tried for some pyhton packages but doesn't work as well and broke the entire host
config.log (124 KB) config.log |
RE: make[2]: *** [libcdo_la-fieldc_complex.lo] Error 1 - Added by Ralf Mueller over 1 year ago
libhdf5_hl.so.8, needed by /usr/local/netcdf4/lib/libnetcdf.so, may conflict with libhdf5_hl.so.10
:This indicates a problem, because
- CDO itseld needs netcdf
- CDO can be build with direct hdf5 support (for a single operator)
- netcdf itself needs hdf5 in case it is build with cdf4 support
In order to get this right, you need to use the indentical hdf5 version for netcdf AND cdo. I recommend removeing --with-hdf5
options from the configure call. I am sure you don't need it.
Regarding undefined reference to `proj_errno_string
For the sake of getting a working CDO binary, I would again drop the proj4 support for now. It might be that there is a version problem with proj, since your are using 5.0.0. Another option is to check different proj version, but you seem to do that already
Why can't you install conda?
RE: make[2]: *** [libcdo_la-fieldc_complex.lo] Error 1 - Added by Gianluca Falconi over 1 year ago
Hi Ralf,
after changing hdf5 and removed proj the compilation completed successfully.
I don't know why I can't install conda, but the guy who has configured the system told me not install conda, in fact when I've tried it broke yum and other packages.
Thanks
RE: make[2]: *** [libcdo_la-fieldc_complex.lo] Error 1 - Added by Ralf Mueller over 1 year ago
alright - thx for posting the solution. good luck with the binary ;-)
cheers + a weekend
ralf