Project

General

Profile

CDO build fails with duplicate symbol error in cdo-expr_yacc.o

Added by Jed Kaplan about 13 years ago

Dear CDO gurus,

I am trying to build CDO 1.4.7 on Mac OS X with netCDF 4.1.2.

The build fails during the link step with the following error:

ld: duplicate symbol _var in /usr/local/lib/libnetcdf.a(libncdap3_la-ceparse.o) and cdo-expr_yacc.o

There appears to be a symbol "_var" that is used in this version of libnetcdf that is also used in CDO. Maybe this symbol could be given a different name in CDO?

Please find attached the configure and build output, and the result of nc-config --all that describes my netCDF installation.

Thanks for your help!

Jed


Replies (2)

RE: CDO build fails with duplicate symbol error in cdo-expr_yacc.o - Added by Uwe Schulzweida about 13 years ago

Dear Jed,

Thanks for this information! We will rename this symbol in the next CDO release.

Best regards,
Uwe

RE: CDO build fails with duplicate symbol error in cdo-expr_yacc.o - Added by Ralf Mueller about 13 years ago

In your build script, you use a lenghty LIBS setting:

'LIBS=-lhdf5 -lhdf5_hl -ldf -lmfhdf -lcurl -lgssapi_krb5 -lssl -lcrypto -ldl -ldes425 -lkrb5 -lk5crypto -lcom_err -lkrb5support -lresolv' 

Since 4.1.1 netcdf uses libtool for building just like cdo. That's why -lnetcdf should be sufficient for linking. libtool does the rest for you with runtime library path settings.
For further optimization, you could use the -fast option of icc (see #602). CXX is not needed except for compiling experimental ruby/python bindings of CDI, which are switched off be default.
In case CDO is the only user of netcdf, you should skip the fortran interface of netcdf (use --enable-c-only)

    (1-2/2)