2414 Commits
Author SHA1 Message Date
jhendersonHDF 32022649cc Fix various issues in package configuration file (#6617)
Fix find_dependency() calls so that PRIVATE-linked libraries are only
propagated as transitive link requirements for static library targets

Add missing find_dependency() calls for some PRIVATE-linked libraries

Fix issue where parallel-enabled HDF5 can fail to locate MPI Fortran
support, even when HDF5 Fortran support isn't requested

Set HDF5_LIB_TYPE to only shared or static, depending on requested
library type, rather than a list that could include both shared and
static

Fix HDF5_LIB_TYPE being undefined when components are specified, but
shared/static isn't

Reduce scope of modifications to CMAKE_MODULE_PATH so changes aren't
propagated to consuming projects

Add check for both shared and static libraries being requested and fail
if so

Remove enable_language() call in favor of checking enabled languages and
failing if required language isn't enabled

Add missing CMake variable for digitally signed plugins feature

Fix CMake variable for HDF5_DIMENSION_SCALES_NEW_REF option
2026-09-24 11:41:22 -05:00
scivisionandscivision d006fb8d3a CMake Fortran float128 check simplification / correction (#6584)
* CMake bracket-quote Fortran float128 check

this eliminates ambiguous escaping flagged by CMake CMP0219 warning

* CMake fix test escaping

---------

Co-authored-by: scivision <scivision@users.noreply.github.com>
2026-08-06 12:16:06 -05:00
jhendersonHDF 3cd70e2bc5 Fix version handling in installed .cmake file to accept newer minor versions (#6593) 2026-08-06 10:15:25 -05:00
H. Joe LeeandClaude Opus 5 61fbe139e8 Solaris: only pass SunPro -erroff to SunPro compilers (#6570)
On SunOS the C and C++ flag files appended the single string
"-erroff=%none -DBSD_COMP" to HDF5_CMAKE_C/CXX_FLAGS. Because that is one
list element, target_compile_options() hands it to the compiler as one
argument, and -erroff is an Oracle Developer Studio option to begin with.
gcc silently ignores the result (it parses the leading -e as the linker
entry-symbol option), but clang errors out:

  clang: error: unknown argument: '-erroff=%none -DBSD_COMP'

which breaks the build on the first object file. As a side effect,
-DBSD_COMP was never actually reaching the compiler as a define.

Emit -erroff=%none only for SunPro, and append -DBSD_COMP as its own list
element so it is passed as a separate argument on all Solaris compilers.

Fixes #6569

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 14:57:23 -05:00
Chuck AtkinsandLarry Knox 4d666721f4 Fix INSTALL_CMAKE_DIR for GNU_DIRS and enable by default on Linux. (#6410)
The previous `lib/cmake/hdf5-config.cmake` isn't in CMake's find_package
search path since CMake expects that to be a common path with each
package having it's own subdirectory. This changes it to
`lib/cmake/hdf5/hdf5-config.cmake` so the config is now found when the
install prefix is in `CMAKE_PREFIX_PATH`.
This also sets `HDF5_USE_GNU_DIRS=ON` by default for non-Windows builds.

Fixes #6137

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2026-07-20 11:59:13 -05:00
Scot Breitenfeld 8f2c548743 Fix runExecute.cmake: restore ERROR_APPEND and fix zero-or-more mask patterns (#6484)
* Fix runExecute.cmake: restore ERROR_APPEND and fix zero-or-more mask patterns

Three bugs were introduced when runTest.cmake was refactored into runExecute.cmake:

1. ERROR_APPEND=1 support was dropped. Tests that redirect their error-stack
   output to stderr and rely on ERROR_APPEND to combine it with stdout before
   comparison (e.g. H5TEST-err_compat, H5TEST-error_test) fail silently because
   the reference file never matches the truncated actual output.

2. " line [0-9]*" uses zero-or-more digits, so it matches " line " (with zero
   digits) in already-masked reference text like " line (number)", prepending
   another "(number)" and producing " line (number)(number)".

3. "HDF5 [1-9]*[.][0-9]*..." has the "HDF5 " prefix and uses [1-9]* (zero-or-
   more), so it does not match "2.2.0" in actual output (blocked by the leading
   "("), and double-masks "version (number)" in the reference.
   "H5Eget_auto[1-2]*" / "H5Eset_auto[1-2]*" have the same zero-or-more issue,
   double-masking "(1 or 2)" already present in reference files.

Fix: restore ERROR_APPEND handling; change * to + for all digit/char class
quantifiers that can match zero occurrences in already-masked reference text;
remove the "HDF5 " prefix from the version pattern. Same fix applied to
HDF5Examples/config/cmake/runExecute.cmake which has identical bugs.

* Fix AOCC CI: source setenv_AOCC.sh from its actual install location

install.sh generates setenv_AOCC.sh inside the aocc-compiler-VERSION/
directory (where it runs from), not in the repo root one level up.

* Fix AOCC CI: replace hardcoded runner paths with GITHUB_WORKSPACE

All /home/runner/work/hdf5/hdf5/ paths were hardcoded to the HDFGroup/hdf5
repo name. Running the workflow in any fork (e.g. brtnfld/hdf5_swmr_2)
puts the checkout under a different path, breaking AOCC/OpenMPI install,
configure, and build steps. Use $GITHUB_WORKSPACE / ${{ github.workspace }}
so the paths resolve correctly regardless of repo name.

* fix(aocc): source setenv_AOCC.sh from workspace root, not compiler subdir

install.sh places setenv_AOCC.sh in the workspace root, not inside the
aocc-compiler-X.X.X/ directory.

* Fix runExecute.cmake: anchor HDF5 version regex to full token

Replace the over-broad version pattern with one that matches the complete
'HDF5 (x.y.z)' token, preventing over-matching of IP addresses and other
version-like strings, and avoiding nested substitution artifacts in .err
reference comparisons. Applied identically to both copies of the file.
2026-06-30 14:05:00 -05:00
Aleksandar Jelenak 55d179733c Fix HTTP 403 errors in ROS3 VFD for object keys that need URI encoding (#6441)
The ROS3 VFD appended the raw object key to the HTTP request path.
Because the signing configuration disables use_double_uri_encode (the
correct setting for S3), the SigV4 signer uses the request path
verbatim, so keys containing characters that AWS requires to be
percent-encoded -- such as '=' in Hive-style "key=value" partition
prefixes, '+', or spaces -- produced signatures that disagree with
S3's server-side recomputation. S3 rejects such requests with
SignatureDoesNotMatch, surfaced as a bodyless HTTP 403 that is
indistinguishable from a permissions error on a HEAD request, even
though other S3 clients (AWS CLI, boto3, s3fs) could read the same
objects.
2026-06-12 08:16:37 -04:00
Scot Breitenfeld a957dd480d Improve HDF5_BUILD_PARALLEL_TOOLS docs and MFU not-found message (#6428)
* cmake: improve HDF5_BUILD_PARALLEL_TOOLS documentation and MFU error message

The option description for HDF5_BUILD_PARALLEL_TOOLS was too terse to be
useful — it did not mention the required MFU, CIRCLE, or DTCMP external
libraries, nor that HDF5_ENABLE_PARALLEL must also be ON. Expand it with
the dependency list and a link to the mpiFileUtils project.

- CMakeBuildOptions.cmake: rephrase HDF5_BUILD_PARALLEL_TOOLS description
  to "Build MPI-enabled HDF5 tools" (shorter, forward-compatible)
2026-06-03 14:15:44 -05:00
Scot Breitenfeld 013e9cc90c config/HDF5UseZLIB.cmake: resolve ALIASED_TARGET before re-aliasing (#6408)
Before creating the namespaced `hdf5::<name>` alias, query
ALIASED_TARGET so we point the new alias at the real target.  When
the target is not an alias the behaviour is unchanged.

config/HDF5Use{ZLIB,Libaec}.cmake: resolve ALIASED_TARGET before re-aliasing
2026-05-19 13:53:53 -05:00
tbeu 7acc58fc86 CMake: Preserve _GNU_SOURCE in CMAKE_REQUIRED_DEFINITIONS for MinGW/Cygwin (#6396)
The earlier block (line 164-167) adds _GNU_SOURCE to
CMAKE_REQUIRED_DEFINITIONS and via add_definitions for MinGW/Cygwin.
However, the later 'MinGW and Cygwin' block overwrites
CMAKE_REQUIRED_DEFINITIONS using CURRENT_TEST_DEFINITIONS (which is
undefined/empty), discarding _GNU_SOURCE. This causes subsequent
configure checks like vasprintf to not see _GNU_SOURCE in their test
definitions.

Use CMAKE_REQUIRED_DEFINITIONS instead of CURRENT_TEST_DEFINITIONS
to append to the existing definitions (which already include
_GNU_SOURCE) rather than replacing them.

Fixes #5885
2026-05-12 10:41:56 -05:00
86bdc78365 ✨[Feature] Digital Signature Verification for HDF5 Plugins (#6198)
feat: add optional digital signature verification for HDF5 filter plugins

Introduce an opt-in plugin signing and verification system that allows
HDF5 deployments to require cryptographically signed filter plugins before
loading them. Disabled by default (HDF5_REQUIRE_SIGNED_PLUGINS=OFF).

New tool: h5sign
- Signs plugin shared libraries by appending an RSA signature and a
  14-byte footer (algo_id | sig_len | 8-byte magic | format_ver) to the
  binary without modifying the original content.
- Supports SHA-512 (default), SHA-256, SHA-384, and their PSS variants
  (-a/--algorithm flag).
- Detects already-signed plugins; --force strips the old signature and
  re-signs.
- Security hardened: keeps the file descriptor open through hashing and
  appending (no TOCTOU window), enforces a 2048-bit minimum RSA key size,
  rolls back partial writes on failure, and rejects paths that are not
  regular files.

Verification (H5PLsig.c)
- At plugin load time, reads the footer, validates the magic and format
  version, then checks the RSA signature against all public keys found in
  the KeyStore directory.
- File is hashed once; per-key verification operates on the pre-computed
  digest (no redundant I/O for multi-key keystores).
- Plugins whose signature hash appears in revoked_signatures.txt are
  rejected regardless of key validity.
- Runtime debug output via HDF5_DEBUG=pl.

KeyStore management
- Trusted public keys are PEM files in a directory specified by
  HDF5_PLUGIN_KEYSTORE_DIR (build time) or HDF5_PLUGIN_KEYSTORE (env var).
- HDF5_LOCK_PLUGIN_KEYSTORE cmake option disables the env-var override for
  security-hardened deployments.

Test infrastructure
- h5signverifytest: positive, negative, tamper, re-sign, and revocation
  test cases.
- CTest fixture-based dependency graph (FIXTURES_SETUP/FIXTURES_REQUIRED)
  replaces fragile DEPENDS chains so tests remain correct under -R filtering.
- Dedicated signed-plugins.yml CI workflow; full test suite scoped to
  H5SIGN and H5PLUGIN-signature tests to avoid unrelated flaky failures.
- Cross-platform: Linux, macOS, and Windows (MSVC-compatible, BIO-based
  OpenSSL I/O, HDsleep/HDsetenv portability wrappers).

Documentation: docs/PLUGIN_SIGNATURE_README.md covers usage, footer
format, revocation file format, FAQ, and troubleshooting.

Co-authored-by: Glenn Song <gsong@hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-06 09:35:19 -05:00
Scot Breitenfeld f858615b70 Revert "Pin BLOSC2 git fetch to versioned tag (#6380)" (#6384)
This reverts commit c478c6e35f.
2026-04-28 13:09:45 -05:00
Scot Breitenfeld c478c6e35f Pin BLOSC2 git fetch to versioned tag (#6380)
BLOSC2_GIT_BRANCH was "main" causing the inline plugin build to fetch
unreleased c-blosc2 that breaks test output comparisons. Pin to the
tagged release matching HDF5_BLOSC2_VERSION so the git and tgz paths
are consistent.
2026-04-26 04:06:26 -04:00
Orion Poplawski 62701c4c79 Java JNI library changes (#6344)
* Allow setting HDF5_INSTALL_JNI_LIB_DIR to specify install location for the JNI shared library

* No library versioning for Java JNI
2026-04-10 06:41:43 -05:00
jhendersonHDF 7a62abb03d Fix Java build ordering when building with parallel jobs (#6354) 2026-04-08 11:47:50 -05:00
Scot Breitenfeld 05676d1abe Consolidate documentation under docs/ directory (#6310)
* Consolidate documentation under doc/ directory

Move user-facing guides from release_docs/ and doxygen/ into a single
doc/ root. release_docs/ now holds only release artifacts (changelogs,
history, release process, maintainer info).

- git mv release_docs/INSTALL*.md, USING_*.md, README_HPC.md,
  BuildSystemNotes.md, AutotoolsToCMakeOptions.md,
  HDF5_Library_2.0.0_Migration_Guide.md → doc/
- git mv doxygen/ → doc/doxygen/
- Update CMakeLists.txt: HDF5_DOXYGEN_DIR and add_subdirectory path
- Update CMakeInstallation.cmake: all install paths for moved files
- Update bin/make_vers: hardcoded doxygen/ path substitution
- Update doc/doxygen/CMakeLists.txt: EXAMPLES_DIRECTORY and comments
- Update README.md, CONTRIBUTING.md, SECURITY.md, config/README.md,
  release_docs/RELEASE_PROCESS.md: links to moved files
- Update doxygen .dox files: release_docs/ URLs for moved guides
- Rewrite release_docs/README.md for narrowed scope

* Add HDF5_DOCS_DIR variable for doc/ root path

Introduce HDF5_DOCS_DIR = \${HDF5_SOURCE_DIR}/doc so that
CMakeInstallation.cmake and future callers reference the doc/
directory symbolically rather than by hardcoded path.
HDF5_DOXYGEN_DIR is now derived from HDF5_DOCS_DIR.
2026-03-31 17:01:54 -06:00
H. Joe Lee 9ba9b7153f build: avoid using a fixed version in HDF5_Examples.cmake.in (#6328) 2026-03-31 16:00:13 -05:00
jhendersonHDF 2952bb9216 Mark several CMake variables as advanced (#6321) 2026-03-27 11:30:23 -05:00
jhendersonHDF 994dbf6ea9 Document CMake options in a central location (#6294) 2026-03-27 09:43:24 -05:00
jhendersonHDF 88b1ee8cc9 Add missing directory to signed files (#6313) 2026-03-24 14:05:55 -05:00
jhendersonHDF e31194650f Suppress verbose testing output when testing with CMake presets (#6312) 2026-03-24 14:05:36 -05:00
SY Wang 10b9801642 Fixes #6171 (#6218)
* Generate "Extra libraries" in `libhdf5.settings` using a new variable `LINK_LIBS_SETTINGS` rather than `LINK_LIBS`
* Follow up to #6220
* Try to deal with Windows MSVC
2026-03-16 17:10:34 -05:00
jhendersonHDF 5a11a79fc4 Improvements to CMake logic for handling filters (#6287)
* Re-write zlib/szip CMake logic for clarity

* Update external libaec, zlib-ng and zlib builds to not use patching process

* Add FindZLIBNG module to locate zlib-ng on system

* Rework HDF5 filter plugins support
2026-03-16 13:46:48 -05:00
Alex Dutka a37ac086ae Simplify MPI configuration in CMake (#6145)
* Remove outdated MPI_CXX_FOUND check

* Remove redundant MPI_C_FOUND check
2026-03-10 07:07:59 -05:00
Aleksandar Jelenak 1adafbdc30 Convert several .txt in release_docs folder to Markdown (#6263) 2026-03-08 13:11:39 -05:00
H. Joe Lee eff101bffe style: update hdf logos (#6265)
close #6258
2026-03-06 09:47:04 -06:00
Scot Breitenfeld a7ec64a857 Split static targets into separate optional target [UPDATED] (#6216)
Build-tree exports can't diverge from install-tree exports — the export(EXPORT ...) reads directly from the install export sets. No manual list to keep in sync.

Removed 3 global variables (HDF5_STATIC_LIBRARIES_TO_EXPORT, HDF5_JAVA_LIBRARIES_TO_EXPORT, HDF5_UTILS_TO_EXPORT) and their ~21 set_global_variable calls across tool/utility files.

Fixed the static-only build bug in the PR where the base export set was guarded by BUILD_SHARED_LIBS, breaking tools export.

Removed redundant utils in export files — the PR was dumping tools into all three build-tree export files (java, static, shared). Now they correctly appear only in the base export.
2026-02-24 17:04:25 -06:00
jhendersonHDF 4b1f87332b Suppress some CMake dev warnings for lower message log levels (#6228) 2026-02-23 11:27:14 -06:00
Harish RS 33510a52e4 Enable Windows ARM64 CTest CI for release binaries (#6177)
* ci: add Windows ARM64 MSVC CTest job

* ci: add MSYS2 clangarm64 build on Windows ARM64

* cmake: add MSVC ARM64 presets for Windows

* zlib: fix MSVC static library flags for ARM64 builds
2026-02-20 11:04:00 -06:00
jhendersonHDF 5f430099e9 Add CMake function to extract pkg-config info from libraries (#6220) 2026-02-18 12:12:34 -07:00
jhendersonHDF 5de837660f Remove force-setting of ZLIB_USE_EXTERNAL / SZIP_USE_EXTERNAL (#6222)
Removes the force-setting of ZLIB_USE_EXTERNAL and SZIP_USE_EXTERNAL to
ON when HDF5_ALLOW_EXTERNAL_SUPPORT is GIT or TGZ so that zlib and
szip can be independently built from the system or externally as desired
2026-02-18 11:47:40 -07:00
Julien Schueller d58638be09 CMake: Fix Fortran cross-compilation support
Refactor the cross-compilation infrastructure to rely on the standard
CMAKE_CROSSCOMPILING_EMULATOR variable instead of the custom
CROSSCOMPILING_PATH environment hack.

Key changes:
- Removed `ENVIRONMENT "${CROSSCOMPILING_PATH}"` from all test definitions.
- Updated custom commands (e.g., H5match_types, H5_gen) to invoke the
  emulator explicitly when cross-compiling.
- Updated ConfigureChecks.cmake and HDF5UseFortran.cmake to enable
  `try_run` checks when an emulator is defined.
- Added config/toolchain/mingw-w64-x86-64-wine.sh wrapper to automatically
  locate MinGW runtime libraries (like libgfortran) for Wine execution.
- Cleaned up toolchain files to remove hardcoded emulator paths, deferring
  configuration to the build environment.
2026-02-13 14:45:02 -06:00
jhendersonHDF 4ded1cbcb4 Inherit Debug C build flags in Developer build mode (#6182) 2026-02-12 22:03:51 -06:00
Larry Knox 448ae0a94f Update develop branch version / Clean CHANGELOG.md entries (#6211)
* Advance version to 2.1.1 after creating release branch for 2.1.0
release.

* Update develop branch version to 2.2.0
Clean 2.1.0 entries from CHANGELOG.md

* Add notice for removing alternate release tag to CHANGELOG.md.
Fix typo.

* Fix typo

* Reorder AGE and REVISION for consistent order for all libraries.

* Temporarily remove develop branch restrictions from workflows.

* Revert "Temporarily remove develop branch restrictions from workflows."

This reverts commit abc7039fc5.
2026-02-10 12:09:47 -05:00
Matt L 8ebdb2f6d4 Fix inconsistent empty postfix handling (#6094) 2026-01-24 12:03:19 -06:00
Scot Breitenfeld 5240b804aa Fixes issues caused by #6147 (#6172)
Scope Safety: Refactored parse_hdf5_version from a Macro to a Function to prevent variable namespace pollution.
Implemented a helper macro (_parse_version_component) to handle repetitive regex logic, significantly reducing code size and complexity.
Updated HDF5config.cmake to calculate paths dynamically using REALPATH relative to CMAKE_CURRENT_LIST_FILE, fixing issues with symlinks and execution context.
Decoupled the parsing logic from scope promotion; the helper now parses to a local variable, and the function explicitly handles the PARENT_SCOPE assignment.
2026-01-24 12:02:11 -06:00
Larry Knox 755e278a6a Replace last link with version directory path on support site. (#6165)
* Replace last link with version directory path on support site.
Links for downloading doxygen.zip files will be to the GitHub HDF5
releases page.

* Update config/README.md.cmake.in
2026-01-23 11:33:30 -06:00
jhendersonHDF 9af6db11b6 Distribute Findlibaec.cmake module for use by HDF5 library consumers (#6159) 2026-01-22 16:14:20 -06:00
Scot Breitenfeld 5711c7466f Update the version to 2.1 (#6147)
Update version to 2.1 and derive version information from H5public.h, removing h5vers script and updating CMake and Java configurations.

Versioning:
Update version to 2.1 in H5public.h.
Derive version strings in H5public.h using macros.
CMake:
Extract version from H5public.h in HDF5config.cmake and HDF5AsSubdirMacros.cmake.
Configure README.md and CHANGELOG.md using CMakeLists.txt.
Java:
Generate H5Version.java from H5public.h for version consistency.
Update H5.java to use H5Version for version constants.
Removals:
Delete bin/h5vers script, previously used for version management.
2026-01-21 23:02:49 -06:00
jhendersonHDF b100609caa Add Findlibaec CMake module for locating libaec (#6152) 2026-01-13 09:26:40 -06:00
malcolm-vivosa 6ca281ba66 Use 'find_dependency' instead of 'find_package' (#6139)
It is considered best practice for cmake package configuration files to use "find_dependency" instead of "find_package".
This is because it can propagate flags properly, gives more clear error messages and is able to avoid duplicate dependency include issues.

This change fixes an issue I am seeing in some external cmake projects when including hdf5. As per issue report here https://github.com/HDFGroup/hdf5/issues/6107
2026-01-02 10:55:27 -06:00
jhendersonHDF 2ddfed18df Rewrite complex number configuration logic to fix re-configuration issue and improve clarity (#6080) 2025-12-05 11:24:55 -06:00
Allen Byrne 5f9d12601c Fix ci-Intel preset to use intel toolchain (#6038) 2025-11-25 15:30:26 -06:00
Larry Knox 53b52f8593 Set version to 2.0.1 for continued development. (#5978) 2025-11-06 15:25:13 -06:00
Allen Byrne b754dcb8f2 Move Java wrappers to FFM using jextract and java 25 (#5957)
FFM build requires Java 25, Jextract 25.
Generates FFM bindings during configure.
JNI is default when the requirements are not met or can be forced.
Presets added for maven and FFM - JNI is default selection.
Enhanced Maven options will work with either JNI or FFM
New Workflows for testing and maven uploads.
Extensive documentation changes for java.
2025-11-04 14:03:06 -06:00
Neil Fortner 1093a18c18 Add support for 64 bit chunks, including 64 bit chunk dimensions (#5965)
Various related changes, including refactoring part of dataset creation, and reworking how layout versions are calculated.

Needs more testing of filters that create very large chunks, but that will need code to turn it off in cases where we can't allocate >4GiB buffers. I tested this manually by increasing the expansion ration in the expand2 test in dsets, and it passed everything up until it tried to expand the datasets with H5Dset_extent() and my laptop ran out of disk space.

We should add code and testing to handle the case where the "size of size" is set less than 8 bytes. This is not a new issue, since it can be set to 2.

I will file issues for these, but I don't think they are necessary for the release.
2025-11-04 11:42:24 -06:00
Matt L 10c2ddc3cb Implement fallback for systems without qsort_r (#5931)
Also includes a new workflow to test FreeBSD, which has a different qsort signature and was previously untested
Resolves #5896
2025-11-02 22:06:34 -06:00
Scot Breitenfeld e4113ffaa5 Combined INSTALL_parallel and README_HPC content (#5952)
* Combined INSTALL_parallel and README_HPC into a single, README_HPC.md file.
* Removed all autotools references
* Updated All References
2025-10-30 21:57:14 -05:00
Erik Schnetter 2ff6c6497c Update HDF5UseFortran.cmake (#5920)
Remove extraneous curly braces from log output
2025-10-15 15:28:15 -05:00
Larry Knox 849de4ec05 Increment subversion to -4 after snapshot release 2.0.0-3. (#5916) 2025-10-14 22:30:05 -05:00