3

My project compiles flawlessly in Mac OS X and now that I try building in Ubuntu 12.x latest as of today, I get the error -- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS). If I take the HDF5-dev package using apt-get cmake will find HDF5 but my code will not compile due to the HDF5-dev package being older.

I tried downloading the latest HDF5 and building from source:

cd $HDF5_ROOT
./configure /usr/local/hdf5
sudo make install

and this successfully installs HDF5 under directory /usr/local/hdf5 but cmake won't find it. I also tried setting the environment variables $HDF5_ROOT and $HDF5_ROOT_DIR_HINT but still doesn't work.

Any suggestions?

2 Answers 2

2

Try to update your PATH:

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

Additionally, you can change PATH in your ~/.profile:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="/usr/local/hdf5:$HOME/bin:$PATH" #this line
fi

This is just a guess; hope to be helpful.

0

This Solved my same issue :

  • I unzip and configure hdf5 in /src/hdf5-1.8.14 and did a make install.

  • It created a directory /src/hdf5-1.8.14/hdf5 with lib, include, bin in it and VTK compile failed on:

    Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS)
    

Solved with:

export PATH=$PATH:/src/hdf5-1.8.14/hdf5  

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .