Install from sources - nexusformat/HDF5-External-Filter-Plugins GitHub Wiki

General requirements

Required tools

  • cmake to configure and run the build
  • gcc on Linux or MS Visual Studio on Windows (tested with VS 2015)
  • conan if library dependencies cannot be satisfied by your Linux distribution. On Windows using conan is the recommended procedure to build the code.

Libraries

The required libraries depend on the filter plugins which should be built and installed

  • LZ4 (for the LZ4 and bitshuffle plugin)
  • BZIP2 (for the BZIP2 plugin)
  • HDF5 is required for all plugins
  • ZLIB which is a dependency of HDF5

CMake flags common for Linux and Windows

By default all plugins are disabled. To enable a particular plugin define the appropriate Cmake variable either on the command line or via the GUI tool to ON

  • ENABLE_LZ4_PLUGIN=ON - enable the LZ4 plugin
  • ENABLE_BITSHUFFLE_PLUGIN=ON - enable the bitshuffle plugin
  • ENABLE_BZIP2_PLUGIN=ON - enables the BZIP2 plugin

There are some additional variables you may want to use

  • CMAKE_BUILD_TYPE - this variable is mandatory and should be set to Debug or Release
  • ENABLE_CONAN - set this to ON if you want to use conan to resolve library dependencies.
  • CMAKE_INSTALL_PREFIX - prefix below which to install the plugins

Obtain the sources

You can either download a release tarball from the github project or clone the repository directly.

Build on Linux

Most modern Linux distributions have sufficiently recent versions of the required libraries and tools in their repositories. Thus installing the dependencies should be easy. The general assumption on Linux is that your system is set up in reasonably standard compliant way.

To build the code create a build directory with

$ mkdir plugins_build
$ cd plugins_build

and run cmake from within this directory

plugins_build: $ cmake -DENABLE_LZ4_PLUGIN=ON -DENABLE_BITSHUFFLE_PLUGIN=ON \
                       -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/hdf5

A subsequent call to make should build the code

plugins_build: $ make

to run the tests use the test target

plugins_buid: $ make test

Installation

Installation is done via the install target

plugins_build: $ make install

which will install the plugins into CMAKE_INSTALL_PREFIX/lib/plugins for the above example this would be /opt/hdf5/lib/plugins. In order to use the plugins you also have to set the HDF5_PLUGIN_PATH environment variable to this path. So for the above example use

plugins_build: $ export HDF5_PLUGIN_PATH=/opt/hdf5/lib/plugins

Build on Windows

Provided you have all tools installed the general problem on Windows is to obtain the required libraries to build the software.

TODO

⚠️ **GitHub.com Fallback** ⚠️