google-deepmind / torch-hdf5

Torch interface to HDF5 library
Other
237 stars 126 forks source link

Could NOT find HDF5 (missing: HDF5_LIBRARIES) (Required is at least version "1.8") #93

Open zilesazoyi2 opened 7 years ago

zilesazoyi2 commented 7 years ago

Thanks for you code ! i meet this error ,could you give me some advice ??

sun@sunwin:~/torch-hdf5$ luarocks make hdf5-0-0.rockspec LIBHDF5_LIBDIR="/usr/lib/x86_64-linux-gnu/" cmake -E make_directory build; cd build; cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/sun/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/sun/torch/install/lib/luarocks/rocks/hdf5/0-0"; make

-- Found Torch7 in /home/sun/torch/install CMake Warning (dev) at /home/sun/cmake-3.2.2/Modules/FindHDF5.cmake:211 (get_target_property): Policy CMP0045 is not set: Error on non-existent target in get_target_property. Run "cmake --help-policy CMP0045" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

get_target_property() called with non-existent target "hdf5". Call Stack (most recent call first): CMakeLists.txt:4 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at /home/sun/cmake-3.2.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message): Could NOT find HDF5 (missing: HDF5_LIBRARIES) (Required is at least version "1.8") Call Stack (most recent call first): /home/sun/cmake-3.2.2/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE) /home/sun/cmake-3.2.2/Modules/FindHDF5.cmake:360 (find_package_handle_standard_args) CMakeLists.txt:4 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred! See also "/home/sun/torch-hdf5/build/CMakeFiles/CMakeOutput.log". make: *** 没有指明目标并且找不到 makefile。 停止。

Error: Build error: Failed building.

I have installed hdf5 1.8.18 in my home and add to ~/.bashrc!!

export PATH=$PATH:/home/sun/hdf5-1.8.18/hdf5

export PATH="$PATH:/usr/local/hdf5"

export HDF5_INCLUDE_DIR="/usr/local/hdf5/include/"

export HDF5_LIBRARIES="/usr/local/hdf5/lib/"

anyone who meet some problem? thanks for you kindness O(∩_∩)O

RuWang15 commented 6 years ago

I encountered a similar problem, after I manually deleted all(I think) the files of a older version(1.8.11) of hdf5 and then installed a new one(1.8.18).

-- Found Torch7 in /home/xxx/torch/install
CMake Error at CMakeLists.txt:4 (FIND_PACKAGE):
  By not providing "FindHDF5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "HDF5", but
  CMake did not find one.

  Could not find a package configuration file provided by "HDF5" (requested
  version 1.8) with any of the following names:

    HDF5Config.cmake
    hdf5-config.cmake

  Add the installation prefix of "HDF5" to CMAKE_PREFIX_PATH or set
  "HDF5_DIR" to a directory containing one of the above files.  If "HDF5"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
See also "/home/xxx/torch-hdf5/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found.  Stop.

Error: Build error: Failed building.

I'm not good at compiling hdf5 or using cmake, and it really drives me crazy. The related path are all added into ~/.bashrc.

huangtao00 commented 4 years ago

I encountered a similar problem, after I manually deleted all(I think) the files of a older version(1.8.11) of hdf5 and then installed a new one(1.8.18).

-- Found Torch7 in /home/xxx/torch/install
CMake Error at CMakeLists.txt:4 (FIND_PACKAGE):
  By not providing "FindHDF5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "HDF5", but
  CMake did not find one.

  Could not find a package configuration file provided by "HDF5" (requested
  version 1.8) with any of the following names:

    HDF5Config.cmake
    hdf5-config.cmake

  Add the installation prefix of "HDF5" to CMAKE_PREFIX_PATH or set
  "HDF5_DIR" to a directory containing one of the above files.  If "HDF5"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
See also "/home/xxx/torch-hdf5/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found.  Stop.

Error: Build error: Failed building.

I'm not good at compiling hdf5 or using cmake, and it really drives me crazy. The related path are all added into ~/.bashrc.

how did u finally sovle this problem, could u pls show what u have done?