Project

General

Profile

CDO installation could not link to udunits2

Added by Li Dong over 9 years ago

Dear all,

I am installing CDO 1.6.6 on CentOS with the udunits2 library installed by me manually. The configure line is:


./configure --prefix=/opt/packman/cdo/1.6.6 --with-hdf5=/opt/packman/hdf5/1.8.13/0 --with-netcdf=/opt/packman/netcdf/c_4.3.2_cxx_4.2.1_fortran_4.4.1/0 --with-szlib=/opt/packman/szip/2.1/0 --with-jasper=/opt/packman/jasper/1.900.1/0 --with-grib_api=/opt/packman/grib_api/1.12.3/0 --with-udunits2=/opt/packman/udunits/2.1.24/0 --with-proj=/opt/packman/proj/4.8.0/0 --disable-dependency-tracking --disable-debug

The error I have encountered is:


configure: error: Could not link to udunits2 library!

I have checked the content of config.log, and the relevant snippets are:


/opt/packman/udunits/2.1.24/0/lib/libudunits.so: undefined reference to `XML_ErrorString'
...

So I checked udunits2 library, and found that it comes with libexpat.so, which contains `XML_ErrorString', but the link flags do not contain `-lexpat'. So how to solve this problem? Thank you!