Project

General

Profile

cdo-configure: Unable to link to eccodes library

Added by Maik Gottschalk almost 2 years ago

Hello!

I successfully installed eccodes-2.26.0.

On trying to configure cdo with '--with-eccodes=<dir>' I always obtain the error
checking for library containing grib_get_message... no
configure: error: Could not link to eccodes library
(the complete output to 'configure' is attached as configure.log).

The directory provided to '--with-eccodes=<dir>' is available:
mg@odroidn2:~$ ls -l /opt/eccodes-2.26.0
total 16
drwxr-xr-x 2 mg mg 4096 May 30 16:21 bin
drwxr-xr-x 2 mg mg 4096 May 30 16:21 include
drwxr-xr-x 4 mg mg 4096 May 30 16:21 lib
drwxr-xr-x 3 mg mg 4096 May 30 16:21 share

The command used is
./configure --prefix=/opt/cdo-2.0.5 --exec-prefix=/opt/cdo-2.0.5 --enable-dependency-tracking --enable-option-checking --with-gnu-ld --with-szlib=yes --with-hdf5=yes --with-netcdf=yes --with-fftw3 --with-udunits2=/opt/udunits-2.2.28 --with-util-linux-uuid=yes --with-eccodes=/opt/eccodes-2.26.0 --with-magics=/opt/Magics-4.12.0 --with-curl=/usr/lib --with-proj=/usr/lib --with-libxml2=yes

What am I doing wrong?

Regards,
Maik.


Replies (5)

RE: cdo-configure: Unable to link to eccodes library - Added by Estanislao Gavilan almost 2 years ago

Hi Maik,

I am not sure if you can upload the configure.log file, but did you try to add --with-eccodes=/opt/eccodes-2.26.0/lib or run it with sudo?

Kind regards,

Estanislao

RE: cdo-configure: Unable to link to eccodes library - Added by Maik Gottschalk almost 2 years ago

Hi Estanislao,

thanks for your hints.

I just tried all combinations of both
--with-eccodes=/opt/eccodes-2.26.0/ and
--with-eccodes=/opt/eccodes-2.26.0/lib
with and without using 'sudo'. None succeeded.

The relevant log files are attached. The only difference I found is that by using '/lib' the file 'grib_api.h' cannot be found:

mg@odroidn2:~$ diff configure.log configure_with_lib.log
187c187
< checking for grib_api.h... yes
---

checking for grib_api.h... no

BTW: I compiled / installed Magics-4.12.0 and Metview-5.16.0 (both from ECMWV) against eccodes-2.26.0 without any problems.

Maybe sth. is wrong with the 'configure'-script on using '--with-eccodes=<dir>'?

Any further help is highly appreciated...

Regards,
Maik.

configure_sudo.log (8.42 KB) configure_sudo.log sudo call of 'configure'
configure.log (8.42 KB) configure.log call --with-eccodes=/opt/eccodes-2.26.0
configure_with_lib.log (8.42 KB) configure_with_lib.log call --with-eccodes=/opt/eccodes-2.26.0/lib

RE: cdo-configure: Unable to link to eccodes library - Added by Estanislao Gavilan almost 2 years ago

Hi Maik,

I have just downloaded the source file. I also found those lines. I think it is a problem of your local paths. cdo is trying to find something but he cannot (shame on him!!). if you go to the configure file you can read "--with-eccodes=&lt;yes|no|directory&gt; (default=no)". Have you tried to write --with-eccodes=yes and  pass the path of your libraries like flags (i.e. ECCODES_INCLUDE='' and ECCODES_LIBS='')? You could also try to add the bin,shared,lib and include to your $PATH and $LD_PATH. I hope this can help. I know it is frustating to configure and compile libraries

Kind regards,

Estanislao

RE: cdo-configure: Unable to link to eccodes library - Added by Maik Gottschalk almost 2 years ago

Hi Estanislao,

Fortunately, I found the solution of my problem myself:
The file 'config.log' contains detailed calls of what 'configure' tries to compile and / or link. It showed a failed linkeage to libjasper.so.4, needed to link libeccodes.so, which indeed must fail. A short investigation showed that libjasper.so has been updated from .4 to .6 after compilation of libeccodes and before cdo.
After re-compilation of libeccodes cdo could be configured and compiled fine.

Anyway, thanks for your ongoing help!

Kind regards,

Maik.

RE: cdo-configure: Unable to link to eccodes library - Added by Estanislao Gavilan almost 2 years ago

Hi Maik,

I am glad that you found the problem. Sometimes the compiling errors are extremly unhelpful. the log files are key to find the those error, but sometimes..it is a tedious task.

Kind regards,

Estanislao

    (1-5/5)