I’m trying to compile the openEphys GUI on Ubuntu 14.04. The program requires libhdf5 of version greater than 1.8.12.
Unfortunately Ubuntu 14.04 only has libhdf5-1.8.11 in the repository. The openEphys wiki suggest compiling from source, but I’m afraid doing that might break gtkclient, my wireless neural recording PC client.
Steps I took:
sudo apt-get remove libhdf5-dev
This removed “libhdf5-dev”, “libmatio-dev”, “hdf5-helpers”, “libhdf5-serial-dev”, and “hdf5-tools”
2. Next I searched for libhdf5-dev on Ubuntu package directory, and downloaded it and all its dependencies.
I choose the version 1.8.13 whenever possible. These packages include “hdf5-helpers”, “libhdf5-8”, “libhdf5-cpp-8”, “libhdf5-dev”, “libmatio-dev”, “libhdf5-serial-dev”, and “hdf5-tools”. Then install all these packages with
sudo dpkg -i packageName.deb
3. We can check that they are indeed installed via
dpkg -l "*hdf5*".
4. These steps are already enough to compile openEphys GUI. However, it indeed breaks my gtkclient build, with the linker unable to find “-lhdf5”. This is most likely because proper environment variable settings aren’t set, so the linker can’t find the “libhdf5.a” file. Setting “LD_LIBRARY_PATH” by creating and editing a ld_config file in this way did not work.
5. Instead, I edited my gtkclient Makefile flags to include:
HDF5INCLUDE := -I/usr/include/hdf5/serial
in the CPPFLAGS, and
HDF5LD := -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lhdf5 -lhdf5_cpp
in the linker flags.The first directory name is because all the hdf5 header files are included there. The second directory name is there because the .a and .so library files are in there.
This information is found by executing
dpkg -L "libhdf5-dev"
Now everything compiles successfully!