Hello. I’m trying to build some legacy software and move it away from spack. The relevant (I think) versions of the Spack libraries are:
hdf5-1.8.18
netcdf-4.4.0
netcdf-cxx4-4.3.0
netcdf-fortran-4.4.4
When I try to build netcdf-cxx4
I am getting errors like:
[ 24%] Linking C executable ncgen
ld: ../liblib/libnetcdf.so.4.3.0: undefined reference to `H5DSget_num_scales'
ld: ../liblib/libnetcdf.so.4.3.0: undefined reference to `H5DSis_scale'
ld: ../liblib/libnetcdf.so.4.3.0: undefined reference to `H5DSdetach_scale'
ld: ../liblib/libnetcdf.so.4.3.0: undefined reference to `H5DSset_scale'
ld: ../liblib/libnetcdf.so.4.3.0: undefined reference to `H5DSiterate_scales'
ld: ../liblib/libnetcdf.so.4.3.0: undefined reference to `H5DSattach_scale'
ld: ../liblib/libnetcdf.so.4.3.0: undefined reference to `H5DSget_scale_name'
ncgen/CMakeFiles/ncgen.dir/build.make:534: recipe for target 'ncgen/ncgen' failed
make[2]: *** [ncgen/ncgen] Error 1
CMakeFiles/Makefile2:1690: recipe for target 'ncgen/CMakeFiles/ncgen.dir/all' failed
make[1]: *** [ncgen/CMakeFiles/ncgen.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2
If I run nm libhdf5.so | grep H5D
I get lots of strings returned, but none with the string scale
in the name. nm libhdf5.so | grep H5D | grep scale
has no response. How do I build libhdf5 v1.8.18 with these? I used these commands to build the current hdf5 I’m trying to link against:
git clone -b hdf5-1_8_18 git@github.com:HDFGroup/hdf5.git
cd hdf5
# --enable-cxx \ # not compatible with --enable-parallel
# --enable-parallel \ # configure: error: unable to link a simple MPI-IO Fortran program
./configure \
--prefix=${MY_ROOT}/opt/hdf5 \
--enable-fortran \
--enable-hl
make -j
make install