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

Error: HDF5 library configure #52

Closed
nyckmaia opened this issue Feb 4, 2020 · 2 comments
Closed

Error: HDF5 library configure #52

nyckmaia opened this issue Feb 4, 2020 · 2 comments

Comments

@nyckmaia
Copy link

nyckmaia commented Feb 4, 2020

Following the H5Cpp INSTALL file documentation, I'm trying to configure and install the HDF5 library in my Ubuntu machine.

I downloaded the lasted HDF5 source code from here: official website
Here is my output:

vm@vm:~/Desktop/hdf5-1.10.6$ sudo ./configure --prefix=/usr/local --enable-build-mode=production --enable-shared --enable-static --enable-optimization=high --with-default-api-version=v110

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/vm/Desktop/hdf5-1.10.6/bin/missing: line 3: $'\r': command not found
/home/vm/Desktop/hdf5-1.10.6/bin/missing: line 5: $'\r': command not found
/home/vm/Desktop/hdf5-1.10.6/bin/missing: line 8: $'\r': command not found
/home/vm/Desktop/hdf5-1.10.6/bin/missing: line 13: $'\r': command not found
/home/vm/Desktop/hdf5-1.10.6/bin/missing: line 18: $'\r': command not found
/home/vm/Desktop/hdf5-1.10.6/bin/missing: line 21: $'\r': command not found
/home/vm/Desktop/hdf5-1.10.6/bin/missing: line 26: $'\r': command not found
/home/vm/Desktop/hdf5-1.10.6/bin/missing: line 32: syntax error near unexpected token `$'in\r''
'home/vm/Desktop/hdf5-1.10.6/bin/missing: line 32: `case $1 in
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: error: cannot run /bin/bash bin/config.sub

How can I fix it?

My setup is:
OS: Ubuntu 18 x64
HDF5 Library: 1.10.6
gcc version: 7.4.0
CMake version: 3.10.2

@nyckmaia
Copy link
Author

nyckmaia commented Feb 4, 2020

UPDATE 1: HDF5 source-code (CMake version)

Alternatively, I saw in the HDF5 official web site that is possible to download a Cmake version of the HDF5 source-code (For Unix and Windows).

I tried it too.
The CMake process works perfect. No errors.
After that I type: make and sudo make install. It works with no errors.

So, at this point, I was thinking that I have installed the lasted HDF5 library (1.10.6) in my Ubuntu machine, but when I go to the H5cpp folder and type:

./configure --prefix=/usr/local --enable-build-mode=production --enable-shared --enable-static --enable-optimization=high --with-default-api-version=v110

I got a CMake error message saying:
-- !!! H5CPP examples require of HDF5 v1.10.4 or greater!!!
Here below is a full terminal error:

vm@vm:~/Desktop/h5cpp-master$ sudo ./configure --prefix=/usr/local --enable-build-mode=production --enable-shared --enable-static --enable-optimization=high --with-default-api-version=v110
[sudo] password for vm: 
-- The CXX compiler identification is GNU 7.4.0
-- The C compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.0.1")  
CMake Error at CMakeLists.txt:24 (message):
  -- !!! H5CPP examples require of HDF5 v1.10.4 or greater!!!


-- Configuring incomplete, errors occurred!
See also "/home/vm/Desktop/h5cpp-master/CMakeFiles/CMakeOutput.log".

@steven-varga
Copy link
Owner

This just means that the cmake picks up an older version of libhdf5.so -- probably installed with the system.
When you don't use the provided binary package, then just use the plain unix make -- which will install H5CPP into /usr/loca/ The examples have both unix make files, and cmake.

NOTE: you can control withing CMakeList.txt the root of libhdf5, then just check it the correct one is picked up. As an alternative use the binary package from http://h5cpp.org.

line 21: set(HDF5_ROOT /usr/local/ /usr) # there maybe more upto date library in these places

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants