Closed Tompythonorange closed 2 years ago
Hi Tom,
this error looks like the compiler can't find the HDF5 library.
You may have to check the library and include paths in the Makefile.
Also, if you are going to use the netCDF and GSL libraries of your Ubuntu installation, static compilation may not work, I think. Maybe try make STATIC=0
, to compile the code.
This is how I got MPTRAC running on my Ubuntu 20.04 installation and how it is running here on GitHub actions as a test (see https://github.com/slcs-jsc/mptrac/actions):
1) Install GSL and netCDF development packages:
sudo apt-get install gnuplot libnetcdf-dev libgsl-dev libhdf5-dev
2) Modify library path and include path in src/Makefile
:
INCDIR = -I/usr/include -I/usr/include/hdf5/serial
LIBDIR = -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/hdf5/serial
3) Compile with dynamic linking:
make STATIC=0
4) You can check the results by running the example test case:
make check
Best regards Lars
Hi Tom,
this error looks like the compiler can't find the HDF5 library.
You may have to check the library and include paths in the Makefile.
Also, if you are going to use the netCDF and GSL libraries of your Ubuntu installation, static compilation may not work, I think. Maybe try
make STATIC=0
, to compile the code.This is how I got MPTRAC running on my Ubuntu 20.04 installation and how it is running here on GitHub actions as a test (see https://github.com/slcs-jsc/mptrac/actions):
- Install GSL and netCDF development packages:
sudo apt-get install gnuplot libnetcdf-dev libgsl-dev libhdf5-dev
- Modify library path and include path in
src/Makefile
:INCDIR = -I/usr/include -I/usr/include/hdf5/serial LIBDIR = -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/hdf5/serial
- Compile with dynamic linking:
make STATIC=0
- You can check the results by running the example test case:
make check
Best regards Lars
thank you I will try your steps after working,maybe, I guess should use absolute paths instead of relative paths in Makefile。
Best regards
thank you ,I got it running。
At 2022-03-23 22:22:18, "Lars Hoffmann" @.***> wrote:
Hi Tom,
this error looks like the compiler can't find the HDF5 library.
You may have to check the library and include paths in the Makefile.
Also, if you are going to use the netCDF and GSL libraries of your Ubuntu installation, static compilation may not work, I think. Maybe try make STATIC=0, to compile the code.
This is how I got MPTRAC running on my Ubuntu 20.04 installation:
Install GSL and netCDF development packages: sudo apt install libnetcdf-dev libgsl-dev
Modify library path and include path in src/Makefile: INCDIR = -I/usr/include -I/usr/include/hdf5/serial LIBDIR = -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/hdf5/serial
Compile with dynamic linking: make STATIC=0
You can check the results by running the example test case: make check
Best regards Lars
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Happy to hear! If you have any other questions, please let us know.
I will close the issues for now.
Lars
use nc2
atm_dist.c:47:3: optimized: Inlining printf/47 into main/185 (always_inline). /usr/bin/ld: cannot find -lhdf5_hl /usr/bin/ld: cannot find -lhdf5 collect2: error: ld returned 1 exit status make: [Makefile:142: atm_select] Error 1 /usr/bin/ld: cannot find -lhdf5_hl /usr/bin/ld: cannot find -lhdf5 collect2: error: ld returned 1 exit status make: [Makefile:142: atm_init] Error 1 /usr/bin/ld: cannot find -lhdf5_hl /usr/bin/ld: cannot find -lhdf5 collect2: error: ld returned 1 exit status make: *** [Makefile:142: atm_dist] Error 1![image](https://user-images.githubusercontent.com/39429729/159713999-1e66b88f-f027-4338-90cc-bb55e4ba1635.png)