You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently migrating servers and am in the process of reinstalling ncdump-json. The installation instructions do however no longer work with the more recent versions of cmake due to syntax errors.
However, there is a workaround: cmake version 2.8.12.2. Posting it here for the sake of community knowledge.
In case you get any errors in the configure phase (e.g. due to C++ compilers not found or Fortran related errors), execute sudo apt-get install gcc gfortran g++ and try again.
Running the make command
In the installation instructions, after $cmake, you'll have to run the make command from the ncdump-json folder. It may then be that you run into HDF5 errors:
Linking C executable ncdump-json
/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
CMakeFiles/ncdump-json.dir/build.make:210: recipe for target 'ncdump-json' failed
make[2]: *** [ncdump-json] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/ncdump-json.dir/all' failed
make[1]: *** [CMakeFiles/ncdump-json.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2
To solve this, first ensure that you have installed the proper HDF5 dependencies:
sudo apt-get install libhdf5-serial-dev
Try again. If you get the same error, there is a mismatch between where your system has installed the files and where the makefile expects them to be.
To solve this, execute these steps:
Move into the relevant dir: cd /usr/lib/x86_64-linux-gnu
Execute ls | grep libhdf5.
Find the correct 'version ish number' behind the file name specified next. For example: libhdf5_serial.so.8.0.2 or, in my case, libhdf5_serial.so.100.
Important: make sure to replace 8.0.2 with the number you identified in step 3.
5. Move towards the ncdump-json directory, e.g. /home/username/ncdump-json.
6. Run make again.
The error disappeared and I got it running:
Linking C executable ncdump-json
[100%] Built target ncdump-json
Obviously, I ran this on a Unix based system with one of the more recent version of Debian (9). I hope it benefits some of you as it cost me several hours to figure it out, which will probably save some time for anyone dealing with this as well :)
The text was updated successfully, but these errors were encountered:
Thank you for sharing your experience and providing workarounds.
Let me add that if you have the time to update or improve the CMakeLists.txt file to make compiling and linking better and more homogeneus between systems, I will be happy to review and merge a pull-request.
I'm currently migrating servers and am in the process of reinstalling
ncdump-json
. The installation instructions do however no longer work with the more recent versions of cmake due to syntax errors.However, there is a workaround: cmake version 2.8.12.2. Posting it here for the sake of community knowledge.
Installing compatible CMake version
Follow these installation instructions: https://geeksww.com/tutorials/operating_systems/linux/installation/downloading_compiling_and_installing_cmake_on_linux.php Important: instead of 2.8.3 in the wget command, use 2.8.12.2.
In case you get any errors in the
configure
phase (e.g. due to C++ compilers not found or Fortran related errors), executesudo apt-get install gcc gfortran g++
and try again.Running the make command
In the installation instructions, after $cmake, you'll have to run the make command from the ncdump-json folder. It may then be that you run into HDF5 errors:
To solve this, first ensure that you have installed the proper HDF5 dependencies:
sudo apt-get install libhdf5-serial-dev
Try again. If you get the same error, there is a mismatch between where your system has installed the files and where the makefile expects them to be.
To solve this, execute these steps:
cd /usr/lib/x86_64-linux-gnu
ls | grep libhdf5
.libhdf5_serial.so.8.0.2
or, in my case,libhdf5_serial.so.100
.Important: make sure to replace 8.0.2 with the number you identified in step 3.
5. Move towards the
ncdump-json
directory, e.g./home/username/ncdump-json
.6. Run
make
again.The error disappeared and I got it running:
Obviously, I ran this on a Unix based system with one of the more recent version of Debian (9). I hope it benefits some of you as it cost me several hours to figure it out, which will probably save some time for anyone dealing with this as well :)
The text was updated successfully, but these errors were encountered: