-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: NetCDF: Filter error: undefined filter encountered #1170
Comments
You have to set the HDF5_PLUGIN_PATH env var to point to where the plugins were installed by netcdf-c |
The NetCDF build doesn't specify a HDF5 plugin path, how is one supposed to find out what it is? |
From the 'Developer Install' section of the docs: if the env var NETCDF_PLUGIN_DIR is set to point to the location of the netcdf-c compression plugins built by netcdf >= 4.9.0, they will be installed inside the package. In this case HDF5_PLUGIN_PATH will be set to the package installation path on import, so the extra compression algorithms available in netcdf-c >= 4.9.0 will automatically be available. Otherwise, the user will have to set HDF5_PLUGIN_PATH explicitly to have access to the extra compression plugins. |
When building netcdf-c (using autotools) set |
It does not result in any plugins being installed. See also the settings:
|
CMake is wrong: # If user wants, then install selected plugins (default on)
SET(PLUGIN_INSTALL_DIR "NO" CACHE STRING "Whether and where we should install plugins; defaults to yes") Default is not YES/ON. |
NetCDF build fails with
|
setting HDF5_PLUGIN_PATH to where you want the plugins installed and then using -DPLUGIN_INSTALL_DIR=YES works for me. If you then set NETCDF_PLUGIN_DIR to HDF5_PLUGIN_PATH when building netcdf4-python, the plugins will be copied inside the netcdf4-python installation. Otherwise, you have to have HDF5_PLUGIN_PATH set for the python module to find them. |
@sebastic please consider creating a netcdf-c issue with the issues you are finding with plugin installation. There will soon be a 4.9.1 update, and it would be nice for these issues to be fixed in that release. |
thanks @sebastic. If you set HDF5_PLUGIN_PATH and set -DPLUGIN_INSTALL_DIR=YES do the netcfd4-python tests pass for you? |
This works: --- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,10 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
HDF5_INCLUDE_PATH=/usr/include/hdf5/serial
HDF5_LIBRARY_PATH=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
+# Use H5_DEFAULT_PLUGINDIR from /usr/include/hdf5/serial/H5pubconf.h
+# https://github.com/Unidata/netcdf-c/issues/2428
+export HDF5_PLUGIN_PATH=$(HDF5_LIBRARY_PATH)/plugins
+
include /usr/share/dpkg/pkg-info.mk
UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
@@ -30,7 +34,8 @@ override_dh_auto_configure:
-DENABLE_TESTS:BOOL=ON \
-DENABLE_DOXYGEN:BOOL=ON \
-DHDF5_INCLUDE_PATH=$(HDF5_INCLUDE_PATH) \
- -DHDF5_LIBRARY_PATH=$(HDF5_LIBRARY_PATH)
+ -DHDF5_LIBRARY_PATH=$(HDF5_LIBRARY_PATH) \
+ -DPLUGIN_INSTALL_DIR=YES
override_dh_auto_test:
ARGS="--output-on-failure" dh_auto_test --max-parallel=1 || echo "Ignoring test failures" But is not sufficient, the hdf5 plugins are not included in any package. The filenames look questionable: -- Installing: /build/netcdf-4.9.0/debian/tmp/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins
-- Installing: /build/netcdf-4.9.0/debian/tmp/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins/lib__nch5zstd.so
-- Installing: /build/netcdf-4.9.0/debian/tmp/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins/lib__nch5blosc.so
-- Installing: /build/netcdf-4.9.0/debian/tmp/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins/lib__nch5fletcher32.so
-- Installing: /build/netcdf-4.9.0/debian/tmp/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins/lib__nch5shuffle.so
-- Installing: /build/netcdf-4.9.0/debian/tmp/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins/lib__nch5deflate.so
-- Installing: /build/netcdf-4.9.0/debian/tmp/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins/lib__nczhdf5filters.so
-- Installing: /build/netcdf-4.9.0/debian/tmp/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins/lib__nczstdfilters.so
-- Installing: /build/netcdf-4.9.0/debian/tmp/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins/lib__nch5szip.so It's not clear what their relation is to libnetcdf or the executables, despite reading https://github.com/Unidata/netcdf-c/blob/main/docs/filters.md. Based on the filenames the hdf5 plugins cannot be included in the libnetcdf19 binary package as there is no SOVERSION, so a new binary package (e.g. libnetcdf-hdf5-plugins) will be required for these files and have that be a Recommended dependency of libnetcdf19 as there doesn't seem to be a hard dependency. Or maybe something else is more appropriate. Not including the plugins in the Debian package makes my life easier, I only maintain the NetCDF package because its a dependency of GDAL, I don't actually use them. So I think I'm going to update the netcdf package to explicitly not build the plugins and remove the related compression library dependencies. |
Disabling plugins with
|
You can disable the netcdf4-python plugin tests by setting the env var NO_PLUGINS. |
Those are the correct filenames (lib__nc*so) for the netcdf-c plugins. They are dynamically loaded at runtime. You are probably right that they should be in a separate package. |
Thanks works, thanks. |
@sebastic - you might want to checkout Unidata/netcdf-c#2431 - although we are still using autotools on Fedora. |
Some of the compression tests in 1.6.0 fail when building the Debian package (with NetCDF 4.9.0):
blosc, bz2, zstd, and zlib compression were enabled in netcdf (1:4.9.0-1):
The text was updated successfully, but these errors were encountered: