Git Product home page Git Product logo

Comments (15)

WardF avatar WardF commented on August 20, 2024

So I notice you opening and closing this. Are you still having the issue?

from netcdf-cxx4.

kandogu avatar kandogu commented on August 20, 2024

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.

WardF avatar WardF commented on August 20, 2024

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.

kandogu avatar kandogu commented on August 20, 2024

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.

WardF avatar WardF commented on August 20, 2024

What happens if you invoke it as follows:

$ cmake .. -DCMAKE_PREFIX_PATH=/usr

Do you see the same issue?

from netcdf-cxx4.

kandogu avatar kandogu commented on August 20, 2024

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.

kandogu avatar kandogu commented on August 20, 2024

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.

WardF avatar WardF commented on August 20, 2024

Try this:

$ cmake .. -DCMAKE_CXX_FLAGS="-I /usr/include/hdf5/serial/"

Does that allow compilation to work?

from netcdf-cxx4.

kandogu avatar kandogu commented on August 20, 2024

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.

WardF avatar WardF commented on August 20, 2024

What happens if you try building with configure instead of cmake?

from netcdf-cxx4.

kandogu avatar kandogu commented on August 20, 2024

I tried it and nothing changed, still giving the same error for $ make command. :(

from netcdf-cxx4.

WardF avatar WardF commented on August 20, 2024

Can you attach the config.log file generated when you ran configure? Thanks!

from netcdf-cxx4.

kandogu avatar kandogu commented on August 20, 2024

Generated config log:
config.log

from netcdf-cxx4.

atharris avatar atharris commented on August 20, 2024

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.

niko-zvt avatar niko-zvt commented on August 20, 2024

export CPATH="/path_to_libs/hdf5/include/"

from netcdf-cxx4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.