Comments (15)
So I notice you opening and closing this. Are you still having the issue?
from netcdf-cxx4.
Yes I have the issue and cannot fixed, as I know hdf5.h exist, but cmake .. command does not find it and causes error.
from netcdf-cxx4.
Ok, can you provide some information on your platform, the version of netCDF-C and HDF5 you have installed, and their locations? Also, how are you invoking cmake
? What does the command look like? I will try to sort this out with you. :)
from netcdf-cxx4.
I use Ubuntu 19.10 and installed netCDF-4 C++ 4.3.1. For hdf5 I install libdhdf5-dev and its version is 1.10.4+repack-10, location of hdf5 is /usr/include/hdf5/serial/hdf5.h and netCDF library direction is /usr/lib/x86_64-linux-gnu. I'm trying to invoke cmake command as you told in the guide.
canning dependencies of target test_bzip2
[85%] Building C object plugins/CMakeFiles/test_bzip2.dir/blocksort.c.o
[ 87%] Building C object plugins/CMakeFiles/test_bzip2.dir/huffman.c.o
[ 88%] Building C object plugins/CMakeFiles/test_bzip2.dir/crctable.c.o
[ 89%] Building C object plugins/CMakeFiles/test_bzip2.dir/randtable.c.o
[ 90%] Building C object plugins/CMakeFiles/test_bzip2.dir/compress.c.o
[ 92%] Building C object plugins/CMakeFiles/test_bzip2.dir/decompress.c.o
[ 93%] Building C object plugins/CMakeFiles/test_bzip2.dir/bzlib.c.o
[ 94%] Building C object plugins/CMakeFiles/test_bzip2.dir/H5Zbzip2.c.o
/home/dogukan/c++/netcdf-cxx4-4.3.1/plugins/H5Zbzip2.c:6:10: fatal error: hdf5.h: No such file or directory
6 | #include <hdf5.h>
| ^~~~~~~~
compilation terminated.
after I write "cmake ..", error occurs here.
Edit ---
netCDF version is 4.6.2
from netcdf-cxx4.
What happens if you invoke it as follows:
$ cmake .. -DCMAKE_PREFIX_PATH=/usr
Do you see the same issue?
from netcdf-cxx4.
It builds, however, this time it cannot pass ctest, all tests failed.
Edit---
Sorry, it failed "make" command this time and It gives the same error.
from netcdf-cxx4.
For more detailed information
$ cmake .. -DCMAKE_PREFIX_PATH=/usr
-- Found bash: /usr/bin/bash
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
NetCDF C Configuration Summary
General
NetCDF Version: 4.3.1
Configured On: Çrş Şub 5 00:19:15 +03 2020
Host System: x86_64-Linux-5.3.0-29-generic
Build Directory: /home/dogukan/c++/netcdf-cxx4-4.3.1/build
Install Prefix:
Compiling Options
C Compiler: /usr/bin/cc
CFLAGS: -g -Wall -Wno-unused-variable -Wno-unused-parameter -g
CPPFLAGS: -g -Wall -Wno-unused-variable -Wno-unused-parameter -g -Wall -Wconversion
LDFLAGS: -Wl,--no-undefined
AM_CFLAGS:
AM_CPPFLAGS:
AM_LDFLAGS:
Shared Library: yes
Static Library: no
Extra libraries:
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dogukan/c++/netcdf-cxx4-4.3.1/build
$ make
[ 35%] Built target netcdf-cxx4
[ 37%] Built target cxx4_test_var
[ 40%] Built target cxx4_test_dim
[ 42%] Built target cxx4_test_group
[ 45%] Built target cxx4_test_att
[ 48%] Built target cxx4_test_filter
[ 50%] Built target cxx4_test_classic
[ 53%] Built target cxx4_test_var2
[ 55%] Built target cxx4_test_type
[ 58%] Built target cxx4_test_ncFile_Flags
[ 61%] Built target cxx4_test_open_close
[ 63%] Built target examples_simple_xy_rd
[ 66%] Built target examples_simple_xy_wr
[ 68%] Built target examples_pres_temp_4D_wr
[ 71%] Built target examples_sfc_pres_temp_wr
[ 74%] Built target examples_pres_temp_4D_rd
[ 76%] Built target examples_sfc_pres_temp_rd
[ 79%] Built target pres_temp_4D_plugin_rd
[ 81%] Built target examples_simple_xy_wr_formats
[ 84%] Built target pres_temp_4D_plugin_wr
[ 85%] Building C object plugins/CMakeFiles/test_bzip2.dir/H5Zbzip2.c.o
/home/dogukan/c++/netcdf-cxx4-4.3.1/plugins/H5Zbzip2.c:6:10: fatal error: hdf5.h: No such file or directory
6 | #include <hdf5.h>
| ^~~~~~~~
compilation terminated.
from netcdf-cxx4.
Try this:
$ cmake .. -DCMAKE_CXX_FLAGS="-I /usr/include/hdf5/serial/"
Does that allow compilation to work?
from netcdf-cxx4.
No, it gave the same error again.
fatal error: hdf5.h: No such file or directory
6 | #include <hdf5.h>
| ^~~~~~~~
compilation terminated.
make[2]: *** [plugins/CMakeFiles/test_bzip2.dir/build.make:154: plugins/CMakeFiles/test_bzip2.dir/H5Zbzip2.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1833: plugins/CMakeFiles/test_bzip2.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
from netcdf-cxx4.
What happens if you try building with configure
instead of cmake
?
from netcdf-cxx4.
I tried it and nothing changed, still giving the same error for $ make
command. :(
from netcdf-cxx4.
Can you attach the config.log
file generated when you ran configure
? Thanks!
from netcdf-cxx4.
Generated config log:
config.log
from netcdf-cxx4.
I had the same issue on Ubuntu 18.04 running with WSL, and resolved it by changing the cmake call to:
cmake .. -DCMAKE_C_FLAGS="-I /usr/include/hdf5/serial/" -DCMAKE_PREFIX_PATH=/usr
I believe this is because the auto-generated make files in plugins/misc.dir
use the C_INCLUDES
variable rather than the CXX_INCLUDES
variable.
from netcdf-cxx4.
export CPATH="/path_to_libs/hdf5/include/"
from netcdf-cxx4.
Related Issues (20)
- Errors building 4.3.1 tag on macOS with Clang 12.0.5
- libnetcdf_c++4 vs. libnetcdf-cxx4 HOT 1
- Get attributes in the original order
- compile failure ncVar.cpp:630:11 error: 'nc_def_var_filter' was not declared in this scope (on static build) HOT 1
- header file is right? HOT 2
- Erroneous condition always evaluating true HOT 2
- Minimum required C++ standard?
- How to load data into a std::vector HOT 4
- 2 * field not copied in copy constructor ? HOT 1
- Does netcdf-cxx4 support parallel IO? HOT 1
- netCDF::exceptions::NcHdfErr after calling getVar too often HOT 1
- CMake uninstall target conflicts with other previously registered uninstall targets
- Inconsistent constructor signatures
- HDF 1.14 + netcdf-c 4.9 Support? HOT 3
- Cmake modernization
- Testing: cxx4_test_filter (10/18) - Failed HOT 2
- [feature-request] `netcdfcpp_meta.h` file HOT 1
- updating a variable in a netcdf file
- adding a variable to an existing nc file
- Please clarify H5Free HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netcdf-cxx4.