Project

General

Profile

Netcdf library installation problem

Added by Sergio Noce over 11 years ago

Hi to all, I'm a newbie of cdo. I show you briefly what I've done. I downloaded from cdo site last version of cdo (1.5.6.1) and libs4cdo.0.0.10, unzipped in Home/Documents and in folder /.../cdo-1.5.6.1
I call command

./configure --with-netcdf=/home/.../libs4cdo-0.0.10/netcdf-4.2

but I got this error message
...
checking netcdf.h presence... yes
checking for netcdf.h... yes
checking for library containing nc_open... no
configure: error: Could not link to netcdf library

I tried with all solution found in this forum but without results. Help please.

Attached config.log


Replies (13)

RE: Netcdf library installation problem - Added by Jaison-Thomas Ambadan over 11 years ago

Hi,

If you build the libs4cdo-0.0.10 with the default settings (as per the docs), then you should point all your library paths to the "build" subdirectory (libs4cdo-0.0.10/build). Please have a look at the last section here: https://code.zmaw.de/projects/cdo/wiki/Libs4cdo "Building CDO against libs4cdo"

Hope this helps!

Cheers,
J.

RE: Netcdf library installation problem - Added by Ralf Mueller over 11 years ago

lib4cdo is not a collection precompiled libraries! It's a source code collection, which (hopefully) can be installed easily by the user. If you have downloaded an unpacked it, you have to compile it yourself with

make libs4cdo
on unix platforms.

hth
ralf

RE: Netcdf library installation problem - Added by Sergio Noce over 11 years ago

Thanks Jaison and Ralf...

I have to steal you 5 minutes more...I called command

make libs4cdo (try also sudo make libs4cdo), but I got another error

configure: error: Can't find or link to the z library. Turn off netCDF-4 and opendap with --disable-netcdf-4 --disable-dap

Attached config.log (in /netcdf-4.2).

Thanks again!

RE: Netcdf library installation problem - Added by Jaison-Thomas Ambadan over 11 years ago

Hi,

It is missing the zlib library I guess; try

make config all install

Cheers,
J.

RE: Netcdf library installation problem - Added by Sergio Noce over 11 years ago

Now everything works correctly! Thanks!

Sergio

RE: Netcdf library installation problem - Added by Daniel Vila over 11 years ago

Hello I'm having similar problems as Sergio. I want to use CDO to convert a .nc file to GRIB, I don't mind if it is GRIB1 or GRIB2. So I downloaded the last libs package (libs4cdo-0.0.10) and compiled them using:

make libs4cdo

And I got exactly the same error as Sergio, then I tried make config all install as Jaison suggested. And in /netcdf-4.2 I get the file attached.

I tried to compile again CDO using:

./configure --with-netcdf=/home/daniel/libs4cdo-0.0.10/netcdf-4.2 --with-grib_api=/home/daniel/libs4cdo-0.0.10/grib_api-1.9.16 --prefix=/home/daniel/cdo-1.5.2

which I think is what I need for my propose, and then again:
checking for library containing nc_open... no
configure: error: Could not link to netcdf library

Any idea what I'm doing wrong?

Thank you,

Daniel.[[]]

RE: Netcdf library installation problem - Added by Jaison-Thomas Ambadan over 11 years ago

Hi,

fro the earlier post: If you build the libs4cdo-0.0.10 with the default settings (as per the docs), then you should point all your library paths to the "build" subdirectory (libs4cdo-0.0.10/build). Please have a look at the last section here: https://code.zmaw.de/projects/cdo/wiki/Libs4cdo "Building CDO against libs4cdo"

you should point to the "build" subdirectory (libs4cdo-0.0.10/build).

--with-netcdf=/home/daniel/libs4cdo-0.0.10/build

Cheers,
J

RE: Netcdf library installation problem - Added by Daniel Vila over 11 years ago

Thanks for your fast answer Jaison but still it doesn't work I think the problem is in the libraries, when I do:

make config all install

I get the following:

Start configuring zlib-1.2.3: 
unknown option: --with-pic
./configure --help for help
make[1]: *** [zlib-1.2.3] Error 1
make[1]: se sale del directorio «/home/daniel/libs4cdo-0.0.10»
make: *** [config] Error 2

RE: Netcdf library installation problem - Added by Jaison-Thomas Ambadan over 11 years ago

Hi,

Can you please upload your config.log file? It may help the CDO guys here to identify the problem

Cheers,
J

RE: Netcdf library installation problem - Added by Daniel Vila over 11 years ago

Hi thanks for the answers I tried to find the config.log but I don't know exactly which one to add. It seems that the problem is with zlib but when I check the config.log of zlib there is no file.

RE: Netcdf library installation problem - Added by Ralf Mueller over 11 years ago

/home/daniel/libs4cdo-0.0.10/netcdf-4.2/config.log and /home/daniel/libs4cdo-0.0.10/zlib-1.2.3/config.log

RE: Netcdf library installation problem - Added by Daniel Vila over 11 years ago

Please find attached the config.log under /netcdf-4.2. There is no config.log under /zlib-1.2.3. Thank you!

    (1-13/13)