Project

General

Profile

Libraries not recognized

Added by François Ritter almost 10 years ago

Hello,

I have to read a .nc file using the cdo command, that is why I have installed following exactly this link : http://www.studytrails.com/blog/install-climate-data-operator-cdo-with-netcdf-grib2-and-hdf5-support/

I had no error message, I have checked every library, I have managed to install cdo

However, when I want to read my .nc file, I have this error message :

cdo showname: Open failed on >test.nc<
Unsupported file type (library support not compiled in)

I would like to verify if NETcdf is correctly installed, I typed cdo -V and got :

Climate Data Operators version 1.6.4 (http://code.zmaw.de/projects/cdo)
Compiled: by fritter on ritterlinuxlaptop (x86_64-unknown-linux-gnu) Jul 11 2014 10:29:11
Compiler: gcc -std=gnu99 -g -O2 -fopenmp
version: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Features: PTHREADS OpenMP Z
Libraries:
Filetypes: srv ext ieg grb
CDI library version : 1.6.4 of Jul 11 2014 10:29:04
CGRIBEX library version : 1.6.4 of Jun 27 2014 14:00:04
SERVICE library version : 1.3.2 of Jul 11 2014 10:28:56
EXTRA library version : 1.3.2 of Jul 11 2014 10:28:51
IEG library version : 1.3.2 of Jul 11 2014 10:28:54
FILE library version : 1.8.2 of Jul 11 2014 10:28:51

So the NETcdf library is not recognized, right ?

How should I solve this problem ?

Thanks,

François


Replies (6)

RE: Libraries not recognized - Added by Jaison-Thomas Ambadan almost 10 years ago

try "configure" again with

CPPFLAGS="-I/opt/cdo-install/include" LDFLAGS="-L/opt/cdo-install/lib" 

RE: Libraries not recognized - Added by François Ritter almost 10 years ago

Thanks for your help !

Here is the message from the 'configure' step :

############################################

configure: CDO is configured with the following options: {
"CC" : "gcc -std=gnu99",
"CPP" : "gcc -E",
"CPPFLAGS" : "-I/opt/cdo-install/include -I/opt/cdo-install/include -I/opt/cdo-install/include -I/opt/cdo-install/include -I/opt/cdo-install/include",
"CFLAGS" : "-fPIC -fopenmp ",
"LDFLAGS" : "-L/opt/cdo-install/lib -L/opt/cdo-install/lib -L/opt/cdo-install/lib -L/opt/cdo-install/lib -L/opt/cdo-install/lib",
"LIBS" : "-lgrib_api -ljasper -lnetcdf -lhdf5_hl -lhdf5 -lz -lm ",
"FCFLAGS" : "",
"INCLUDES" : "INCLUDES",
"LD" : "/usr/bin/ld -m elf_x86_64",
"NM" : "/usr/bin/nm -B",
"AR" : "ar",
"AS" : "as",
"DLLTOOL" : "false",
"OBJDUMP" : "objdump",
"STRIP" : "strip",
"RANLIB" : "ranlib",
"INSTALL" : "/usr/bin/install -c",
"cdi" : {
"enable_cdi_lib" : false
},
"threads" : {
"lib" : "",
"include" : ""
},
"zlib" : {
"lib" : " -lz",
},
"szlib" : {
"lib" : "",
"include" : ""
},
"hdf5" : {
"lib" : " -L/opt/cdo-install/lib -lhdf5",
"include" : " -I/opt/cdo-install/include"
},
"netcdf" : {
"lib" : " -L/opt/cdo-install/lib -lnetcdf",
"include" : " -I/opt/cdo-install/include"
},
"udunits2" : {
"lib" : "",
"include" : ""
},
"proj" : {
"lib" : "",
"include" : ""
},
"USER_NAME" : "fritter",
"HOST_NAME" : "ritterlinuxlaptop",
"SYSTEM_TYPE" : "x86_64-unknown-linux-gnu"
}
configure:

Configuration completed.
You can now say 'make' to compile the CDO package and 'make install' to install it afterwards.

############################################

So I think that "CPPFLAGS : -I/opt/cdo-install/include -I/opt/cdo-install/include -I/opt/cdo-install/include -I/opt/cdo-install/include -I/opt/cdo-install/include" is not normal, right ?

RE: Libraries not recognized - Added by François Ritter almost 10 years ago

I have also detected an other problem during the 'make install' of cdo :

....
make[4]: Entering directory `/opt/cdo-install/cdo-1.6.4/libcdi/src'
rmdir: failed to remove `/opt/cdo-install/lib': Directory not empty
make[4]: [install-exec-hook] Error 1 (ignored)
make[4]: Leaving directory `/opt/cdo-install/cdo-1.6.4/libcdi/src'
make install-data-hook
make[4]: Entering directory `/opt/cdo-install/cdo-1.6.4/libcdi/src'
rmdir: failed to remove `/opt/cdo-install/include': Directory not empty
....

Who does the program try to remove lib and include ?

RE: Libraries not recognized - Added by Jaison-Thomas Ambadan almost 10 years ago

if you would like to use the full functionality of CDO you should try to include other libraries such as "proj/proj4". Please have a look at: https://code.zmaw.de/projects/cdo/wiki/Libs4cdo

RE: Libraries not recognized - Added by François Ritter almost 10 years ago

Ok, now I understood what is going on :

I have made (by mistake ...) 2 installations of CDO : one on /usr/share/local (without extra libraries netcdf, ...) and the other on /opt/cdo-install (with extra libraries)

when I type "cdo -V" in my terminal, I got the older version, without libraries.

When I go in /usr/share/local/bin and launches "./cdo -V", I got the same version
but when I go in /opt/cdo-install/bin and launches "./cdo -V" I got the right version, with extra librairies.

Now two questions :

1) How is it possible to uninstall properly cdo ? (in the 200 pages manual, they say how to install it but not how to uninstall it ... !)
2) How is it possible to link 'cdo' command in the terminal with the right version in /opt/cdo-install ?

Thanks !

RE: Libraries not recognized - Added by Jaison-Thomas Ambadan almost 10 years ago

just remove/delete the cdo binary from /usr/share/local/bin and simply create a soft link to the new cdo in /opt/cdo-install/bin or you can keep the old version and create a alias alias cdo='/opt/cdo-install/bin/cdo' for the new cdo version in your .bashrc (or equivalent alias for other csh/? shell you are using)

    (1-6/6)