-
Notifications
You must be signed in to change notification settings - Fork 267
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
Why not use H5_DEFAULT_PLUGINDIR to set the plugin directory? #2428
Comments
Because you are the first to suggest it! ;-) I did not even know it existed. Are you suggesting we take whatever value of H5_DEFAULT_PLUGINDIR is in h5pubconf.h and install plugins there? |
That would be my suggestion for a default value. That is where hdf5 will look in the absence of HDF5_PLUGIN_PATH. |
I looked at the code. The flag H5_DEFAULT_PLUGINDIR is intended as an HDF5 CMake build option of the form:
It does not to be ever used as an environment variable. |
I never said it was an environment variable. |
The
Although this is a customization in the hdf5 Debian package. Extracting the value from the include file is most reliable, e.g.: $ cat hdf5-plugin-dir.c
#include <stdio.h>
#include "H5pubconf.h"
int main () {
printf("%s\n", H5_DEFAULT_PLUGINDIR);
}
$ gcc -I /usr/include/hdf5/serial hdf5-plugin-dir.c && ./a.out
/usr/lib/x86_64-linux-gnu/hdf5/serial/plugins |
I do not understand your point. Even if exported as an environment variable, |
As mentioned in #2429:
IF(ENABLE_PLUGIN_INSTALL AND PLUGIN_INSTALL_DIR STREQUAL "YES")
# Default to last dir (lowest search priority) in HDF5_PLUGIN_PATH
IF(DEFINED ENV{HDF5_PLUGIN_PATH})
SET(PLUGIN_PATH "$ENV{HDF5_PLUGIN_PATH}")
ELSE()
IF(ISMSVC OR ISMINGW)
SET(PLUGIN_PATH "$ENV{ALLUSERSPROFILE}\\hdf5\\lib\\plugin")
ELSE()
SET(PLUGIN_PATH "/usr/local/hdf5/lib/plugin")
ENDIF()
ENDIF()
ENDIF() # If user wants, then install selected standard filters
AC_MSG_CHECKING([whether and where we should install plugins])
AC_ARG_WITH([plugin-dir], [AS_HELP_STRING([--with-plugin-dir=<absolute directory>|no|--without-plugin-dir],
[Install selected standard filters in specified or default directory])],
[],[with_plugin_dir=no])
AC_MSG_RESULT([$with_plugin_dir])
if test "x$with_plugin_dir" = xno ; then # option missing|disabled
with_plugin_dir=no
with_plugin_dir_setting="N.A."
enable_plugin_dir=no
elif test "x$with_plugin_dir" = xyes ; then # --with-plugin-dir, no argument
# Default to last dir (lowest search priority) in HDF5_PLUGIN_PATH
PLUGIN_PATH="$HDF5_PLUGIN_PATH"
if test "x${PLUGIN_PATH}" = x ; then
if test "x$ISMSVC" = xyes || test "x$ISMINGW" = xyes; then
PLUGIN_PATH="${ALLUSERSPROFILE}\\hdfd5\\lib\\plugin"
else
PLUGIN_PATH="/usr/local/hdf5/lib/plugin"
fi
fi
# Use the lowest priority dir in the path
if test "x$ISMSVC" = xyes || test "x$ISMINGW" = xyes; then
PLUGIN_DIR=`echo "$PLUGIN_PATH" | tr ';' ' '`
else
PLUGIN_DIR=`echo "$PLUGIN_PATH" | tr ':' ' '`
fi
for pp in ${PLUGIN_DIR} ; do last="$pp"; done
PLUGIN_DIR="$last"
with_plugin_dir_setting="$PLUGIN_DIR"
# canonical form is all forward slashes
with_plugin_dir=`echo "$PLUGIN_DIR" | tr '\\\\' '/'`
enable_plugin_dir=yes
AC_MSG_NOTICE([Defaulting to --with-plugin-dir=$with_plugin_dir])
else # --with-plugin-dir=<dir|path>
with_plugin_dir_setting="$with_plugin_dir"
enable_plugin_dir=yes
fi These parts of the CMake and Autotools build systems should be updated to use the value of Using the value of |
I see my confusion. When you said:
I interpreted that to mean that it was another environment variable. I note the following:
|
We have actually added that default directory. This issue can be closed. |
hdf5 defines H5_DEFAULT_PLUGINDIR in H5pubconf.h, why not use it to set the plugin path by default?
The text was updated successfully, but these errors were encountered: