HDF5
| Name | HDF5 (Hierarchical Data Format 5) — C library and high-level library (dimension scales) |
| Version | 2.2.0 |
| Source | https://github.com/HDFGroup/hdf5/releases/download/2.2.0/hdf5-2.2.0.tar.gz |
| SHA-256 of the archive | 1a1ab8209b35586fbc1aa279ba76d102130b95badcb20ca329587219112d8c16 |
| Project | https://www.hdfgroup.org/solutions/hdf5/ — https://github.com/HDFGroup/hdf5 |
| License | BSD 3-Clause (file LICENSE of the source archive), with the additional notices reproduced below |
| Copyright | Copyright 2006 by The HDF Group. Copyright 1998-2006 by The Board of Trustees of the University of Illinois. |
Why it is bundled
HDF5 is the container of .h5 / .hdf5 files and of NetCDF-4 files. The format is too large to re-implement
(B-trees, heaps, chunk indexes, filters, datatype conversion); the reference C library is the only complete reader
and writer. The scientific engine uses it for inspection, hyperslab reads, flattening to tables and
HDF5 ↔ NetCDF-4 conversions. NetCDF classic files do not go through it: the engine has its own reader and
writer for them, and no netCDF library is bundled.
How it is built and linked
build.sh downloads the pinned archive, checks its SHA-256 and builds with CMake for arm64 / macOS 15.0
(MACOSX_DEPLOYMENT_TARGET=15.0, Release, static):
- C library and high-level library only: no C++, Fortran or Java bindings, no command-line tools, tests or examples;
- no MPI (parallel), no thread-safe or concurrency mode (the engine serialises every call behind one lock);
- deflate through the zlib of the macOS SDK (Homebrew prefixes are excluded from the search); no szip / libaec (datasets compressed with szip are reported as unreadable); no bundled filter plug-ins;
- no remote or exotic file drivers: ROS3 (S3), HDFS, mirror and direct drivers are off;
- the default plug-in directory compiled into the library is
/var/empty/orix-convert-hdf5-plugins-disabled, which cannot exist.
libhdf5.a and libhdf5_hl.a are merged with libtool -static into libCHDF5.a, wrapped with the public headers
into CHDF5.xcframework, and its module map is moved by ../normalize-xcframework.sh like every other bundled
library. Packages/EngineScientific/Package.swift consumes it as a SwiftPM binaryTarget (module CHDF5); the C
target CHDF5Shim supplies what Swift cannot import (macro identifiers, callbacks). The code is statically linked;
nothing is loaded at run time and nothing is looked up on the user's Mac.
Run-time hardening done by the shim before the first use of the library (orix_h5_init):
HDF5_PLUGIN_PRELOADis set to::(plug-in loading disabled),H5PLset_loading_state(0)is called and the plug-in search table is emptied, so a file cannot make the library load code from disk;HDF5_VOL_CONNECTOR,HDF5_DRIVER,HDF5_DRIVER_CONFIGandHDF5_USE_FILE_LOCKINGare removed from the environment;- the library's external-link class is replaced by one whose traversal always fails, and every access property list used on a source file carries a callback refusing external-link traversal: a link to another file is listed with its target and never followed;
- automatic error printing is turned off; errors are read from the error stack and turned into Swift errors.
Build-time tools used: cmake (Homebrew, already present on the build machine), make, libtool, xcodebuild.
None of them is needed at run time.
Sizes measured on 2026-11-21: source archive 42 131 403 bytes; libCHDF5.a 9 048 728 bytes;
CHDF5.xcframework 11 040 kB on disk (static archive + 66 public headers). Only the object code the engine
references is linked into the application.
The source code is not modified. src/, work/, prefix/ and CHDF5.xcframework/ are build products and are not
committed.
Obligations
BSD 3-Clause: the copyright notice, the list of conditions and the disclaimer must be reproduced in the documentation or other materials provided with the binary distribution, and the names of The HDF Group, of the University or of contributors may not be used to endorse the product. The UC LLNL statement below says of itself that it "must be retained in any redistribution of source code, binaries, documentation, and/or accompanying materials". The application's acknowledgements must therefore include the whole text below.
Copyright Notice and License Terms for
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-----------------------------------------------------------------------------
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 2006 by The HDF Group.
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998-2006 by The Board of Trustees of the University of Illinois.
All rights reserved.
This software library and utilities is covered by the 3-clause BSD License.
Redistribution and use in source and binary forms, with or without
modification, are permitted for any purpose (including commercial purposes)
provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions, and the following disclaimer in the documentation
and/or materials provided with the distribution.
3. Neither the name of The HDF Group, the name of the University, nor the
name of any Contributor may be used to endorse or promote products derived
from this software without specific prior written permission from
The HDF Group, the University, or the Contributor, respectively.
DISCLAIMER:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
“AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
For further details, please refer to the full license text available
at https://opensource.org/licenses/bsd-3-clause
You are under no obligation whatsoever to provide any bug fixes, patches, or
upgrades to the features, functionality or performance of the source code
("Enhancements") to anyone; however, if you choose to make your Enhancements
available either publicly, or directly to The HDF Group, without imposing a
separate written license agreement for such Enhancements, then you hereby
grant the following license: a non-exclusive, royalty-free perpetual license
to install, use, modify, prepare derivative works, incorporate into other
computer software, distribute, and sublicense such enhancements or derivative
works thereof, in binary and source code form.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Contributors: National Center for Supercomputing Applications (NCSA) at
the University of Illinois, Fortner Software, Unidata Program Center
(netCDF), The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler
(gzip), and Digital Equipment Corporation (DEC).
-----------------------------------------------------------------------------
Portions of HDF5 were developed with support from the Lawrence Berkeley
National Laboratory (LBNL) and the United States Department of Energy
under Prime Contract No. DE-AC02-05CH11231.
-----------------------------------------------------------------------------
Portions of HDF5 were developed with support from Lawrence Livermore
National Laboratory and the United States Department of Energy under
Prime Contract No. DE-AC52-07NA27344.
-----------------------------------------------------------------------------
Portions of HDF5 were developed with support from the University of
California, Lawrence Livermore National Laboratory (UC LLNL).
The following statement applies to those portions of the product and must
be retained in any redistribution of source code, binaries, documentation,
and/or accompanying materials:
This work was partially produced at the University of California,
Lawrence Livermore National Laboratory (UC LLNL) under contract
no. W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy
(DOE) and The Regents of the University of California (University)
for the operation of UC LLNL.
DISCLAIMER:
THIS WORK WAS PREPARED AS AN ACCOUNT OF WORK SPONSORED BY AN AGENCY OF
THE UNITED STATES GOVERNMENT. NEITHER THE UNITED STATES GOVERNMENT NOR
THE UNIVERSITY OF CALIFORNIA NOR ANY OF THEIR EMPLOYEES, MAKES ANY
WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY OR RESPONSIBILITY
FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY INFORMATION,
APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE
WOULD NOT INFRINGE PRIVATELY- OWNED RIGHTS. REFERENCE HEREIN TO ANY
SPECIFIC COMMERCIAL PRODUCTS, PROCESS, OR SERVICE BY TRADE NAME,
TRADEMARK, MANUFACTURER, OR OTHERWISE, DOES NOT NECESSARILY CONSTITUTE
OR IMPLY ITS ENDORSEMENT, RECOMMENDATION, OR FAVORING BY THE UNITED
STATES GOVERNMENT OR THE UNIVERSITY OF CALIFORNIA. THE VIEWS AND
OPINIONS OF AUTHORS EXPRESSED HEREIN DO NOT NECESSARILY STATE OR REFLECT
THOSE OF THE UNITED STATES GOVERNMENT OR THE UNIVERSITY OF CALIFORNIA,
AND SHALL NOT BE USED FOR ADVERTISING OR PRODUCT ENDORSEMENT PURPOSES.
-----------------------------------------------------------------------------
Portions of HDF5 were developed with support from the National Science
Foundation under Federal Award No. 2534078.
-----------------------------------------------------------------------------