Skip to content

Fixes for compiler wrappers and cmake config file dirs.#5361

Merged
lrknox merged 2 commits intoHDFGroup:developfrom
badshah400:develop
Mar 12, 2025
Merged

Fixes for compiler wrappers and cmake config file dirs.#5361
lrknox merged 2 commits intoHDFGroup:developfrom
badshah400:develop

Conversation

@badshah400
Copy link
Copy Markdown
Contributor

Fixes #5357.

Atri Bhattacharya added 2 commits March 11, 2025 22:44
In h5cc and other compiler wrappers, drop hardcoded 'lib' as the dir for
libhdf5.settings and pkgconfig scripts and use cmake computed values for
HDF5_INSTALL_LIB_DIR. This fixes issues on systems where the libdir is
'lib64' for instance, as on 64-bit Linux OSes, and 'lib' in the
wrappers point to incorrect locations of the settings and pkgconfig
files.
When calling `h5cc -show FOO`, the output should not repeat the '-show'
argument itself. This commit fixes the '-show' command invoked from a
cmake built h5cc to be consistent with an (previously) autotools built
one.
Copy link
Copy Markdown
Contributor

@byrnHDF byrnHDF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config/cmake/libh5cc.in looks good

The other file is not correct: see the 1.14 history file:

- Reworked corrected path searched by CMake find_package command

  The install path for cmake find_package files had been changed to use
    "share/cmake"
  for all platforms. However setting the HDF5_ROOT variable failed to locate
  the configuration files. The build variable HDF5_INSTALL_CMAKE_DIR is now
  set to the <INSTALL_DIR>/cmake folder. The location of the configuration 
  files can still be specified by the "HDF5_DIR" variable.

  (ADB - 2022/02/02)

@lrknox lrknox merged commit 41a7ef8 into HDFGroup:develop Mar 12, 2025
77 checks passed
mgorny added a commit to mgorny/hdf5 that referenced this pull request Apr 22, 2025
Replace the `${@:2}` construct that is specific to bash shell with
a more portable approach based on `shift`, in order to restore
compatibility with more strict POSIX shells.  This fixes a regression
introduced in HDFGroup#5361.
lrknox pushed a commit that referenced this pull request Apr 23, 2025
* h5cc: Fix bashism

Replace the `${@:2}` construct that is specific to bash shell with
a more portable approach based on `shift`, in order to restore
compatibility with more strict POSIX shells.  This fixes a regression
introduced in #5361.

* h5cc: Fix passing arguments to compiler subprocesses

Pass arguments to subprocesses via quoted `"$@"` rather than plain `$@`,
in order to prevent the shell from applying word splitting, filename
expansion, etc., and therefore ensure that they are passed through
to the compiler process unchanged.
qkoziol pushed a commit to qkoziol/hdf5 that referenced this pull request Oct 11, 2025
* h5cc: Fix bashism

Replace the `${@:2}` construct that is specific to bash shell with
a more portable approach based on `shift`, in order to restore
compatibility with more strict POSIX shells.  This fixes a regression
introduced in HDFGroup#5361.

* h5cc: Fix passing arguments to compiler subprocesses

Pass arguments to subprocesses via quoted `"$@"` rather than plain `$@`,
in order to prevent the shell from applying word splitting, filename
expansion, etc., and therefore ensure that they are passed through
to the compiler process unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect paths in wrapper scripts when built using cmake

4 participants