Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDF5 and netCDF4 Ubuntu build failing to find hdf5.h #42

Open
mjames-upc opened this issue Jan 3, 2019 · 1 comment
Open

HDF5 and netCDF4 Ubuntu build failing to find hdf5.h #42

mjames-upc opened this issue Jan 3, 2019 · 1 comment
Labels

Comments

@mjames-upc
Copy link
Member

HDF5 and netCDF4 Ubuntu build failing to find hdf5.h which is in $OS_INC. -ldl is supplied for $NETCDF in config/Makefile*

gfortran -fno-stack-protector -fno-second-underscore -fno-range-check -fd-lines-as-comments -I/home/gempak/GEMPAK7/gempak/include -I/home/gempak/GEMPAK7/os/linux64/include -I/usr/include/python2.7 -g -O -L/usr/lib -L/home/gempak/GEMPAK7/os/linux64/lib -s device.f /home/gempak/GEMPAK7/os/linux64/lib/device.a /home/gempak/GEMPAK7/os/linux64/lib/gif.a /home/gempak/GEMPAK7/os/linux64/lib/gn.a /home/gempak/GEMPAK7/os/linux64/lib/syslib.a /home/gempak/GEMPAK7/os/linux64/lib/gemlib.a /home/gempak/GEMPAK7/os/linux64/lib/cgemlib.a /home/gempak/GEMPAK7/os/linux64/lib/gemlib.a /home/gempak/GEMPAK7/os/linux64/lib/libnetcdf.a -ldl -lz /home/gempak/GEMPAK7/os/linux64/lib/libhdf5_hl.a /home/gempak/GEMPAK7/os/linux64/lib/libhdf5.a /home/gempak/GEMPAK7/os/linux64/lib/libpng.a /home/gempak/GEMPAK7/os/linux64/lib/libz.a /home/gempak/GEMPAK7/os/linux64/lib/rsl.a /home/gempak/GEMPAK7/os/linux64/lib/libbz2.a -lm -o gif
/home/gempak/GEMPAK7/os/linux64/lib/libhdf5.a(H5PL.o): In function `H5PL_term_interface':
H5PL.c:(.text+0x280): undefined reference to `dlclose'
/home/gempak/GEMPAK7/os/linux64/lib/libhdf5.a(H5PL.o): In function `H5PL_load':
H5PL.c:(.text+0x6a8): undefined reference to `dlsym'
H5PL.c:(.text+0x96c): undefined reference to `dlopen'
H5PL.c:(.text+0x979): undefined reference to `dlerror'
H5PL.c:(.text+0x98b): undefined reference to `dlsym'
H5PL.c:(.text+0x998): undefined reference to `dlclose'
H5PL.c:(.text+0x9ac): undefined reference to `dlclose'
H5PL.c:(.text+0xac3): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
Makefile:75: recipe for target 'gif' failed
make[5]: *** [gif] Error 1
make[5]: Leaving directory '/home/gempak/GEMPAK7/gempak/source/driver/active/gif'

mentioned: https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11875.html

@mzuranski
Copy link
Contributor

This issue continues for version 7.14.0.

I found a work-around a while back and posted it to the Gembud list, see that post for the details.

Here are the steps to get past this:

  1. Install as one normally would, pausing after the make all >& make.out step.
  2. Edit ~/NAWIPS/config/Makeinc.linux64_gfortran_ubuntu and add LIBBZ2 = $(OS_LIB)/libbz2.a -ldl at the bottom.
  3. Re-run make all >& make.out
  4. Continue the install as one normally would.

I've confirmed this works on Ubuntu 18.04 LTS and 20.04 LTS.

This was referenced Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants