From b06e4ade2481d129514dfe5dc5178bdcef74055b Mon Sep 17 00:00:00 2001 From: immanuelazn Date: Thu, 11 Dec 2025 17:23:14 -0800 Subject: [PATCH] [cpp] add explicit hdf5 v1.12.0 dependency --- r/DESCRIPTION | 5 +++++ r/configure | 2 +- r/configure.win | 2 +- r/tools/h5write.c | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 3dd6ad3f..2e87f1ea 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -54,4 +54,9 @@ Suggests: RcppAnnoy Depends: R (>= 4.0.0) +SystemRequirements: C++17, + HDF5 (>= 1.12) [detected using base libraries, pkg-config 'hdf5' or 'h5cc' fallbacks or via conda in order; + else set HDF5_CFLAGS/HDF5_LIBS], + Highway (>= 1.0.5) [optional; detected via pkg-config 'libhwy'/'hwy'; + falls back to vendored build if not found] Config/Needs/website: pkgdown, devtools, uwot, irlba, RcppHNSW, igraph, BiocManager, bioc::BSgenome.Hsapiens.UCSC.hg38, github::GreenleafLab/motifmatchr, github::GreenleafLab/chromVARmotifs, png, magrittr diff --git a/r/configure b/r/configure index d6af5179..dedf11f6 100755 --- a/r/configure +++ b/r/configure @@ -109,7 +109,7 @@ if [ -z $HDF5_OK ]; then fi if [ -z $HDF5_OK ]; then - printf "\n\nUnable to locate libhdf5. Please install manually or edit compiler flags.\n" + printf "\n\nUnable to locate libhdf5 (>= 1.12.0). Please install manually or edit compiler flags.\n" exit 1 fi diff --git a/r/configure.win b/r/configure.win index 396abbb9..6197233b 100755 --- a/r/configure.win +++ b/r/configure.win @@ -54,7 +54,7 @@ if [ -z $HDF5_OK ]; then fi if [ -z $HDF5_OK ]; then - printf "\n\nUnable to locate libhdf5. Please install manually or edit compiler flags.\n" + printf "\n\nUnable to locate libhdf5 (>= 1.12.0). Please install manually or edit compiler flags.\n" exit 1 fi diff --git a/r/tools/h5write.c b/r/tools/h5write.c index 1278260d..e21f7202 100644 --- a/r/tools/h5write.c +++ b/r/tools/h5write.c @@ -18,6 +18,10 @@ #include "hdf5.h" +#if H5_VERS_MAJOR < 1 || (H5_VERS_MAJOR == 1 && H5_VERS_MINOR < 12) +#error "HDF5 version 1.12.0 or greater required" +#endif + #define H5FILE_NAME "SDS.h5" #define DATASETNAME "IntArray" #define NX 5 /* dataset dimensions */