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.
Hi Stephen, > Trying to build netcdf-4.1.3 and having troubles opening the shared > library file: libhdf5_hl.so.7 > > I followed the instructions for building zlib (1.2.5) and hdf5 (1.8.8) > and have uduints (2.1.24) available. When I use --disable-netcdf-4, it > builds correctly, but alas, I need netcdf 4 for installing > ncview-2.1.1. > > I'm using Ubuntu 10.10 linux 2.6.35-31-generic x86_64 > > Attached is config.log > > Below is what I could paste from the shell from the last call of: > > sudo make check install: ... > Making check in h5_test > make[1]: Entering directory `/usr/local/src/netcdf-4.1.3/h5_test' > make tst_h_files tst_h_files2 tst_h_files4 tst_h_atts tst_h_atts3 > tst_h_atts4 tst_h_vars tst_h_vars2 tst_h_vars3 tst_h_grps > tst_h_compounds tst_h_compounds2 tst_h_wrt_cmp tst_h_rd_cmp tst_h_vl > tst_h_opaques tst_h_strings tst_h_strings1 tst_h_strings2 tst_h_ints > tst_h_dimscales tst_h_dimscales1 tst_h_dimscales2 tst_h_dimscales3 > tst_h_enums tst_h_dimscales4 > make[2]: Entering directory `/usr/local/src/netcdf-4.1.3/h5_test' > depbase=`echo tst_h_files.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ > gcc -DHAVE_CONFIG_H -I. -I.. -I../fortran -I../include > -I/usr/local/include -g -O2 -MT tst_h_files.o -MD -MP -MF > $depbase.Tpo -c -o tst_h_files.o tst_h_files.c &&\ > mv -f $depbase.Tpo $depbase.Po > /bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 > -L/usr/local/lib -o tst_h_files tst_h_files.o -lhdf5_hl -lhdf5 -lm > -lz > libtool: link: gcc -g -O2 -o tst_h_files tst_h_files.o > -L/usr/local/lib /usr/local/lib/libhdf5_hl.so So evidently it's building these test programs like tst_h_files OK, linking to the shared library libhdf5_hl.so in /usr/local/lib. But later, when it tries to execute the program tst_h_files, it can't find the library: > make check-TESTS > make[2]: Entering directory `/usr/local/src/netcdf-4.1.3/h5_test' > ./tst_h_files: error while loading shared libraries: libhdf5_hl.so.7: > cannot open shared object file: No such file or directory > FAIL: tst_h_files Is /usr/local/lib/libhdf5_hl.so a symbolic link to something like libhdf5_hl.so.7, which is a symbolic link to a real file, somethig like libhdf5_hl.so.7.0.2 ? If not, there was some problem with your attempt to install HDF5. Also, when you run ldd tst_h_files in the directory /usr/local/src/netcdf-4.1.3/h5_test, does it show libhdf5_hl.so.7 => /usr/local/lib/libhdf5_hl.so.7 ... or something else? Also, if your system is not configured to look in /usr/local/lib for shared libraries, you may have to set the environment variable LD_LIBRARY_PATH to contain /usr/local/lib before running make check. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: BAX-548035 Department: Support netCDF Priority: Normal Status: Closed