> Hi, > > Martin Schmidt > Institute for Baltic Sea Research > > address@hidden > > netcdf 4.1.2 > > I am trying to build netcdf 4.1.2 at SLES10. > > Compiling zlib 1.2.5 and hdf5 works without any problems. > > configure for netcdf4 is called as follows > export CC=icc > export FC=ifort > export CXX=icpc > export CFLAGS="-O3 -fPIC > -Wl,-rpath,/sw/dataformats/netcdf/4.1.2-intel/lib > -Wl,-rpath,/sw/intel/Compiler/11.1/073/lib/intel64" > export FCFLAGS="-O3 -fPIC > -Wl,-rpath,/sw/dataformats/netcdf/4.1.2-intel/lib > -Wl,-rpath,/sw/intel/Compiler/11.1/073/lib/intel64" > export FFLAGS="-O3 -fPIC > -Wl,-rpath,/sw/dataformats/netcdf/4.1.2-intel/lib > -Wl,-rpath,/sw/intel/Compiler/11.1/073/lib/intel64" > export F90FLAGS="-O3 -fPIC > -Wl,-rpath,/sw/dataformats/netcdf/4.1.2-intel/lib > -Wl,-rpath,/sw/intel/Compiler/11.1/073/lib/intel64" > export LDFLAGS="-fPIC -L/sw/dataformats/netcdf/4.1.2-intel/lib" > ./configure --with-zlib=/sw/dataformats/zlib/1.2.5 > --with-szlib=/sw/dataformats/szip/2.1 > --with-hdf5=/sw/dataformats/hdf5/intel-11/1.8.6 > --enable-large-file-tests --enable-shared --enable-docs-install > --prefix=/sw/dataformats/netcdf/4.1.2-intel > > make works and checks are without failure. However, the wrong version of > the zlib is linked to nccopy and ncdump. > readelf reveals > 0x0000000000000001 (NEEDED) Shared library: [libz.so] > > No path. This is the version installed in the system. > > Looking into the Makefile one sees the correct path to the libz, but at > other places libz is linked again, now with the wrong path > to /usr/lib64. > > In the installation instruction of hdf5, zlib 1.2.5 is required explicitly. > > I did not edit the Makefiles by hand. Is there another way to fix this? > > Greetings, > Martin Schmidt > > Howdy Martin, The problem is that your linker is finding the older version of libz instead of the 1.2.5 version you have installed. The correct way to proceed (and the whole point of shared libraries) would be to update the older version of libz in /usr/lib64 directory. If this is not possible (perhaps because you are not system administrator) then try setting environment variable LD_LIBRARY_PATH to the directory that holds the shared libraries (like zlib version 1.2.5) that you want to use in preference to the ones in /usr/lib64. For more tips on shared libraries, see our FAQ: http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#Shared%20Libraries Thanks, Ed Ticket Details =================== Ticket ID: BKL-976066 Department: Support netCDF Priority: Normal Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.