This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Full Name: Antonio Messina > Email Address: address@hidden > Organization: The Abdus Salam ICTP > Package Version: 4.1.2 > Operating System: Linux RHEL 5.5 > Hardware: Linux x86_64 > Description of problem: Dear all, > > I'm having troubles compiling netcdf 4.1.2 with pgi 10.9. The error I'm > getting is: > > make[6]: Entering directory > `/svn/argo/lazybuilder/build/netcdf-4.1.2_pgi%10.9/netcdf-4.1.2/udunits/lib' > /bin/sh ../libtool --tag=CC --mode=link > /opt/pgi/10.9/linux86-64/10.9/bin/pgcc -DpgiFortran -O2 -Msignextend -o > libudunits2.la -rpath /opt/netcdf/4.1.2/pgi/10.9/lib unitcore.lo converter.lo > formatter.lo idToUnitMap.lo unitToIdMap.lo unitAndId.lo systemMap.lo > prefix.lo parser.lo status.lo xml.lo error.lo ut_free_system.lo udunits-1.lo > -lexpat > libtool: link: /opt/pgi/10.9/linux86-64/10.9/bin/pgcc -shared -fpic -DPIC > .libs/unitcore.o .libs/converter.o .libs/formatter.o .libs/idToUnitMap.o > .libs/unitToIdMap.o .libs/unitAndId.o .libs/systemMap.o .libs/prefix.o > .libs/parser.o .libs/status.o .libs/xml.o .libs/error.o > .libs/ut_free_system.o .libs/udunits-1.o /usr/lib/libexpat.so -lc -O2 > -Wl,-soname -Wl,libudunits2.so.0 -o .libs/libudunits2.so.0.0.0 > /usr/lib/libexpat.so: could not read symbols: File in wrong format > make[6]: *** [libudunits2.la] Error 2 > > > It seems that it's trying to use the 32bit version of libxpat.so while > compiling a 64bit version of the program. Moreover, if I run the following > command from udunits/lib directory: > > /opt/pgi/10.9/linux86-64/10.9/bin/pgcc -shared -fpic -DPIC .libs/unitcore.o > .libs/converter.o .libs/formatter.o .libs/idToUnitMap.o .libs/unitToIdMap.o > .libs/unitAndId.o .libs/systemMap.o .libs/prefix.o .libs/parser.o > .libs/status.o .libs/xml.o .libs/error.o .libs/ut_free_system.o > .libs/udunits-1.o /usr/lib64/libexpat.so -lc -O2 -Wl,-soname > -Wl,libudunits2.so.0 -o .libs/libudunits2.so.0.0.0 > > it compiles fine. > > Please note that NetCDF 4.1.1 doesn't have this problem (using the same > configuration/compilation flags) > > I'm using the following environment variables during configuration: > > export CPPFLAGS="-DpgiFortran "; > export CFLAGS="-DpgiFortran -O2 -Msignextend "; > export FFLAGS="-O2 "; > > ./configure --prefix=/opt/netcdf/4.1.2/pgi/10.9 > --with-hdf5=/opt/hdf5/1.8.5-patch1/gnu/4.1.2 > --with-szip=/opt/hdf5/1.8.5-patch1/gnu/4.1.2 > --with-szlib=/opt/hdf5/1.8.5-patch1/gnu/4.1.2 --enable-netcdf4 --with-libcf > --enable-logging --with-udunits --disable-cxx The libtool command should be linking to just "libexpat.so", not "usr/lib/libexpat.so", as then the appropriate 64-bit library would be found in /usr/lib64, which is in the default path for 64-bit Linux platforms. You might try the latest snapshot for netCDF 4.1.3 to see if the problem is fixed in that version: ftp://ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz because our nightly test shows this is building with udunits OK on a Linux RHEL system: http://www.unidata.ucar.edu/software/netcdf/builds/snapshot/nc_make_distcheck_out.txt --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: DZV-771355 Department: Support netCDF Priority: Normal Status: Closed