Building Plugins

Hello,
I would like to build the LZF plugin for HDF5. I currently have HDF5 and liblzf installed through vcpkg. I have cloned the hdf5_plugins repository and tried that but was coming across a bunch of errors that makes me think I am fundamentally doing something incorrect. I read https://github.com/HDFGroup/hdf5_plugins/blob/master/LZF/README.txt but that seems like I should be doing something from another CMakeLists.txt file? I would eventually like to write another vcpkg port so that everything is just done through vcpkg.

export HDF5_ROOT=/Users/mjackson/Workspace1/vcpkg-installed/arm64-osx-v11  
export LZF_ROOT=/Users/mjackson/Workspace1/vcpkg-installed/arm64-osx-v11

git clone ssh://git@github.com/HDFGroup/hdf5_plugins
cd hdf5_plugins
mkdir build && cd build


1045:[mjackson@octane:build]% rm -rf *; cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/hdf5_plugins -DH5PL_RESOURCES_DIR=`pwd`/../config/cmake ../
-- The C compiler identification is AppleClang 15.0.0.15000100
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:41 (BASIC_SETTINGS):
  BASIC_SETTINGS Macro invoked with incorrect arguments for macro named:
  BASIC_SETTINGS


-- HDF5 find comps: C;shared
-- Found ZLIB: /Users/mjackson/Workspace1/vcpkg-installed/arm64-osx-v11/lib/libz.dylib (found version "1.2.13")  
-- HDF5 C libs:1 static: and shared:0
-- HDF5 find comps: C
-- HDF5 libs:1 C:
CMake Error at config/cmake/HDFPluginMacros.cmake:223 (set_property):
  set_property could not find TARGET h5dump.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  CMakeLists.txt:77 (HDF5_SUPPORT)


CMake Error at config/cmake/HDFPluginMacros.cmake:224 (set_property):
  set_property could not find TARGET h5repack.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  CMakeLists.txt:77 (HDF5_SUPPORT)


-- HDF5-1.12.0 found: INC=/Users/mjackson/Workspace1/vcpkg-installed/arm64-osx-v11/include; TOOLS=
-- HDF5 link libs:  Includes: /Users/mjackson/Workspace1/vcpkg-installed/arm64-osx-v11/include
-- HDF5 link libs: 
CMake Error at BSHUF/CMakeLists.txt:40 (BASIC_SETTINGS):
  BASIC_SETTINGS Macro invoked with incorrect arguments for macro named:
  BASIC_SETTINGS


-- Configuring for bshuf HDF5 Plugin version:  1.0
CMake Error at BSHUF/CMakeLists.txt:68 (include):
  include could not find requested file:

    /H5BSHUFMacros.cmake


CMake Error at BSHUF/CMakeLists.txt:73 (include):
  include could not find requested file:

    /ConfigureChecks.cmake


-- HDF5 link libs:  Includes: /Users/mjackson/Workspace1/vcpkg-installed/arm64-osx-v11/include
-- H5BSHUF link libs: 
CMake Error: File /config.h.in does not exist.
CMake Error at BSHUF/CMakeLists.txt:84 (configure_file):
  configure_file Problem configuring file


CMake Error at BSHUF/src/CMakeLists.txt:62 (target_include_directories):
  Cannot specify include directories for target "PRIVATE" which is not built
  by this project.


CMake Error at BSHUF/src/CMakeLists.txt:63 (target_link_libraries):
  Cannot specify link libraries for target "PRIVATE" which is not built by
  this project.


-- Configuring incomplete, errors occurred!

Clearly, I’m not “doing it correctly”. If someone could lend a gentle push in the right direction that would be much appreciated.

Also, is there like a central list of filters that I can set that enables/disables them? Is there a consistent “HDF5_ENABLE_PLUGIN_LZF” kind of thing?

Thank You

Yes, I have done that before - I will need to search a bit for the exact options.
However, if you look at the config/cmake/HDF5PluginCache.cmake file you might find some clues.
Also, You should be able to use a subset of the plugin repo for just LZF, use the LZF/CMakeLists.txt file as the project root.

Looking deeper into the issue there are issues with the HDF5 that vcpkg has. The 1.12.x releases on VCPKG don’t install the tools with any execute permissions and they rpath is incorrect for the tools.

Then on top of that, the liblzf that VCPKG has does not put out a CMakeConfig.cmake file so that stops the HDF5 LZF Plugin from being configured.

I think for us we are probably going to punt on C/C++ HDF5 filters and try and cram the python versions into our app and see what happens there. Good Luck to us.


Mike J.

My vcpkg uses a fairly recent snapshot of upcoming 1.14.4 release.
I hope you can try it and see how it goes.

Adjust these if you want to try the yesterday’s 1.14.4 snapshot: