Skip to content

Commit

Permalink
Try to rebuild 1.14.3
Browse files Browse the repository at this point in the history
I'm tying to revert the changes done in
conda-forge#231

while keeping it updated with some recent improvements

Please discuss in conda-forge#240

- [ ] Build number maintained
  • Loading branch information
hmaarrfk committed Nov 7, 2024
1 parent 0242148 commit e11914a
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 89 deletions.
80 changes: 80 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,84 @@ if errorlevel 1 exit 1
findstr /V "Libs.private" %LIBRARY_PREFIX%\\lib\\pkgconfig\\hdf5.pc > hdf5.pc.new
if errorlevel 1 exit 1
move /y hdf5.pc.new %LIBRARY_PREFIX%\\lib\\pkgconfig\\hdf5.pc

:: The CMake Build process adds a -shared at the end of every exe when you don't
:: build the static libraries.
:: We copy the shared executables to a name without the -shared suffix to ensure
:: they are found by programs that expect them in the standard location
:: We cannot move the files since the generated CMake files from HDF5 still
:: expect them to exists with the -shared suffix
:: https://github.com/conda-forge/hdf5-feedstock/pull/188
echo Copying %LIBRARY_PREFIX%\bin\h5repart-shared.exe %LIBRARY_PREFIX%\bin\h5repart.exe
copy %LIBRARY_PREFIX%\bin\h5repart-shared.exe %LIBRARY_PREFIX%\bin\h5repart.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5debug-shared.exe %LIBRARY_PREFIX%\bin\h5debug.exe
copy %LIBRARY_PREFIX%\bin\h5debug-shared.exe %LIBRARY_PREFIX%\bin\h5debug.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5jam-shared.exe %LIBRARY_PREFIX%\bin\h5jam.exe
copy %LIBRARY_PREFIX%\bin\h5jam-shared.exe %LIBRARY_PREFIX%\bin\h5jam.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5unjam-shared.exe %LIBRARY_PREFIX%\bin\h5unjam.exe
copy %LIBRARY_PREFIX%\bin\h5unjam-shared.exe %LIBRARY_PREFIX%\bin\h5unjam.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5clear-shared.exe %LIBRARY_PREFIX%\bin\h5clear.exe
copy %LIBRARY_PREFIX%\bin\h5clear-shared.exe %LIBRARY_PREFIX%\bin\h5clear.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h52gif-shared.exe %LIBRARY_PREFIX%\bin\h52gif.exe
copy %LIBRARY_PREFIX%\bin\h52gif-shared.exe %LIBRARY_PREFIX%\bin\h52gif.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5mkgrp-shared.exe %LIBRARY_PREFIX%\bin\h5mkgrp.exe
copy %LIBRARY_PREFIX%\bin\h5mkgrp-shared.exe %LIBRARY_PREFIX%\bin\h5mkgrp.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5format_convert-shared.exe %LIBRARY_PREFIX%\bin\h5format_convert.exe
copy %LIBRARY_PREFIX%\bin\h5format_convert-shared.exe %LIBRARY_PREFIX%\bin\h5format_convert.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\gif2h5-shared.exe %LIBRARY_PREFIX%\bin\gif2h5.exe
copy %LIBRARY_PREFIX%\bin\gif2h5-shared.exe %LIBRARY_PREFIX%\bin\gif2h5.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5copy-shared.exe %LIBRARY_PREFIX%\bin\h5copy.exe
copy %LIBRARY_PREFIX%\bin\h5copy-shared.exe %LIBRARY_PREFIX%\bin\h5copy.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5stat-shared.exe %LIBRARY_PREFIX%\bin\h5stat.exe
copy %LIBRARY_PREFIX%\bin\h5stat-shared.exe %LIBRARY_PREFIX%\bin\h5stat.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5import-shared.exe %LIBRARY_PREFIX%\bin\h5import.exe
copy %LIBRARY_PREFIX%\bin\h5import-shared.exe %LIBRARY_PREFIX%\bin\h5import.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5watch-shared.exe %LIBRARY_PREFIX%\bin\h5watch.exe
copy %LIBRARY_PREFIX%\bin\h5watch-shared.exe %LIBRARY_PREFIX%\bin\h5watch.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5diff-shared.exe %LIBRARY_PREFIX%\bin\h5diff.exe
copy %LIBRARY_PREFIX%\bin\h5diff-shared.exe %LIBRARY_PREFIX%\bin\h5diff.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5repack-shared.exe %LIBRARY_PREFIX%\bin\h5repack.exe
copy %LIBRARY_PREFIX%\bin\h5repack-shared.exe %LIBRARY_PREFIX%\bin\h5repack.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5ls-shared.exe %LIBRARY_PREFIX%\bin\h5ls.exe
copy %LIBRARY_PREFIX%\bin\h5ls-shared.exe %LIBRARY_PREFIX%\bin\h5ls.exe
if errorlevel 1 exit 1

echo Copying %LIBRARY_PREFIX%\bin\h5dump-shared.exe %LIBRARY_PREFIX%\bin\h5dump.exe
copy %LIBRARY_PREFIX%\bin\h5dump-shared.exe %LIBRARY_PREFIX%\bin\h5dump.exe
if errorlevel 1 exit 1

if "%mpi%"=="impi" (
echo Copying %LIBRARY_PREFIX%\bin\ph5diff-shared.exe %LIBRARY_PREFIX%\bin\ph5diff.exe
copy %LIBRARY_PREFIX%\bin\ph5diff-shared.exe %LIBRARY_PREFIX%\bin\ph5diff.exe
if errorlevel 1 exit 1
)
6 changes: 3 additions & 3 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ EOF
fi

if [[ $mpi == "mvapich" ]]; then
# The t_filters_parallel test suite ensures the correct application and integrity of HDF5 filters, such as compression,
# in a parallel I/O context. The t_pmulti_dset test suite verifies the proper creation and I/O operations on multiple
# datasets in parallel. We had to disable these tests for MVAPICH due to specific failures for a couple of them,
# The t_filters_parallel test suite ensures the correct application and integrity of HDF5 filters, such as compression,
# in a parallel I/O context. The t_pmulti_dset test suite verifies the proper creation and I/O operations on multiple
# datasets in parallel. We had to disable these tests for MVAPICH due to specific failures for a couple of them,
# likely related to resource constraints in the testing environment.
echo "Replacing problematic test sources with dummy tests for MVAPICH"
cp $RECIPE_DIR/dummy_t_pmulti_dset.c testpar/t_pmulti_dset.c
Expand Down
12 changes: 5 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set version = "1.14.4" %}
{% set version = "1.14.3" %}
{% set maj_min_ver = ".".join(version.split(".")[:2]) %}
{% set build = 3 %}
{% set build = 6 %}

# recipe-lint fails if mpi is undefined
{% set mpi = mpi or 'nompi' %}
Expand Down Expand Up @@ -36,9 +36,8 @@ package:
version: {{ version }}

source:
# Note: The additional "-3" at the end of the download link is an upstream accident and should go away with the next version.
url: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-{{ maj_min_ver }}/hdf5-{{ version }}/src/hdf5-{{ version }}-3.tar.gz
sha256: 019ac451d9e1cf89c0482ba2a06f07a46166caf23f60fea5ef3c37724a318e03
url: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-{{ maj_min_ver }}/hdf5-{{ version }}/src/hdf5-{{ version }}.tar.gz
sha256: 09cdb287aa7a89148c1638dd20891fdbae08102cf433ef128fd345338aa237c7
patches:
# Atomicity tests seem to fail for openmpi
# This seems to be a known bug
Expand All @@ -51,8 +50,6 @@ source:
# Enable cross-compiling on osx
- patches/0001-avoid-test-execution-when-cross-compiling.patch # [osx and build_platform != target_platform]
- patches/0002-run-host-H5detect-when-cross-compiling.patch # [osx and build_platform != target_platform]
# Fix operator= (https://github.com/HDFGroup/hdf5/pull/4473)
- patches/ea760136.patch

build:
number: {{ build }}
Expand All @@ -76,6 +73,7 @@ requirements:
- make # [not win]
- ninja # [win]
- {{ mpi }} # [build_platform != target_platform and mpi != 'nompi']
- libgfortran-devel_osx-64 # [build_platform != target_platform and build_platform == 'osx-64']
# Keep both versions of openssl in sync
- openssl
host:
Expand Down
35 changes: 25 additions & 10 deletions recipe/patches/0001-avoid-test-execution-when-cross-compiling.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
--- hdf5-1.14.4-3.orig/configure.ac 2024-09-04 11:40:42.165782724 +0200
+++ hdf5-1.14.4-3/configure.ac 2024-09-04 11:49:55.287694807 +0200
@@ -138,6 +138,9 @@
From abfc19a7732d6e72ff738a4c2ff6f205677c9fa2 Mon Sep 17 00:00:00 2001
From: Min RK <[email protected]>
Date: Wed, 14 Jun 2023 16:20:49 +0200
Subject: [PATCH 1/2] avoid test execution when cross-compiling

---
configure.ac | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2c3b041677..830dd176da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,6 +138,9 @@ AC_SUBST([CPPFLAGS])
AC_SUBST([JNIFLAGS])
AC_SUBST([AR_FLAGS])

Expand All @@ -10,7 +21,7 @@
## H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but
## not exported to h5cc (or h5fc, etc.)
##
@@ -801,19 +804,21 @@
@@ -575,19 +578,21 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
FLT128_DIG=0
LDBL_DIG=0

Expand All @@ -34,10 +45,11 @@
AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $PAC_C_MAX_REAL_PRECISION, [Determine the maximum decimal precision in C])
AC_MSG_RESULT([$PAC_C_MAX_REAL_PRECISION])

@@ -921,6 +926,14 @@
fi
fi
@@ -679,6 +684,15 @@ if test "X$HDF_FORTRAN" = "Xyes"; then

## See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV"
PAC_PROG_FC_ISO_FORTRAN_ENV
+
+ if test "$cross_compiling" = yes; then
+ ## defines from aclocal_fc.m4, but require execution
+ AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision])
Expand All @@ -49,15 +61,15 @@
## Check KIND and size of native integer
PAC_FC_NATIVE_INTEGER

@@ -934,6 +947,7 @@
## Find all SIZEOFs for available KINDs
@@ -687,6 +701,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
## Find all sizeofs for available KINDs
PAC_FC_SIZEOF_INT_KINDS
PAC_FC_SIZEOF_REAL_KINDS
+ fi

AC_SUBST([PAC_FC_ALL_REAL_KINDS])
AC_SUBST([PAC_FC_MAX_REAL_PRECISION])
@@ -1045,9 +1059,15 @@
@@ -782,9 +797,15 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS])

dnl count the number of real kinds
Expand All @@ -73,3 +85,6 @@

AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs])
AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs])
--
2.34.1

47 changes: 35 additions & 12 deletions recipe/patches/0002-run-host-H5detect-when-cross-compiling.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
--- hdf5-1.14.4-3.orig/configure.ac 2024-09-04 11:52:50.297783584 +0200
+++ hdf5-1.14.4-3/configure.ac 2024-09-04 11:54:32.681536979 +0200
@@ -140,6 +140,14 @@
From c3b21fe8632a8d03525b07ea671ebdb44aeb5cbd Mon Sep 17 00:00:00 2001
From: Min RK <[email protected]>
Date: Thu, 15 Jun 2023 00:06:44 +0200
Subject: [PATCH 2/2] run host H5detect when cross-compiling

Edit: Mark Harfouche: H5detect was removed in 1.14.3 but we still need
this to run some Fortran tests.

---
configure.ac | 8 ++++++++
fortran/src/Makefile.am | 4 ++--
hl/fortran/src/Makefile.am | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 830dd176da..a1fe555a21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,6 +140,14 @@ AC_SUBST([AR_FLAGS])

AC_SUBST([cross_compiling])

Expand All @@ -15,32 +31,39 @@

## H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but
## not exported to h5cc (or h5fc, etc.)
--- hdf5-1.14.4-3.orig/fortran/src/Makefile.am 2024-09-04 11:52:50.403781047 +0200
+++ hdf5-1.14.4-3/fortran/src/Makefile.am 2024-09-04 11:54:32.681536979 +0200
@@ -121,13 +121,13 @@
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index d42a41d2c9..a83df060cd 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -119,13 +119,13 @@ BUILT_SOURCES = H5f90i_gen.h
# header, then H5match_types which includes that header, then
# it needs to run H5match_types.
H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT)
+ $(RUNSERIAL) $(src_run)H5match_types$(EXEEXT)
- $(RUNSERIAL) ./H5match_types$(EXEEXT)
+ $(RUNSERIAL) $(src_run)H5match_types$(EXEEXT)

# H5_buildiface.F90 generates all the APIs that have a KIND type associated
# with them.

H5_gen.F90: H5_buildiface$(EXEEXT)
+ $(RUNSERIAL) $(src_run)H5_buildiface$(EXEEXT)
- $(RUNSERIAL) ./H5_buildiface$(EXEEXT)
+ $(RUNSERIAL) $(src_run)H5_buildiface$(EXEEXT)

# H5_buildiface.F90 is included in the distribution, and Automake knows
# how to compile a fortran program given its sources.
--- hdf5-1.14.4-3.orig/hl/fortran/src/Makefile.am 2024-09-04 11:52:50.480779204 +0200
+++ hdf5-1.14.4-3/hl/fortran/src/Makefile.am 2024-09-04 11:54:32.681536979 +0200
@@ -95,7 +95,7 @@
diff --git a/hl/fortran/src/Makefile.am b/hl/fortran/src/Makefile.am
index 5834c9932d..98f8888f96 100644
--- a/hl/fortran/src/Makefile.am
+++ b/hl/fortran/src/Makefile.am
@@ -95,7 +95,7 @@ noinst_PROGRAMS = H5HL_buildiface
# with them.

H5LTff_gen.F90: H5HL_buildiface$(EXEEXT)
+ $(RUNSERIAL) $(src_run)H5HL_buildiface$(EXEEXT)
- $(RUNSERIAL) ./H5HL_buildiface$(EXEEXT)
+ $(RUNSERIAL) $(src_run)H5HL_buildiface$(EXEEXT)

H5TBff_gen.F90: H5HL_buildiface$(EXEEXT)

--
2.34.1

41 changes: 0 additions & 41 deletions recipe/patches/ea760136.patch

This file was deleted.

16 changes: 8 additions & 8 deletions recipe/patches/testh5diff.sh.in.patch
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
--- hdf5-1.14.4-3.orig/tools/test/h5diff/testh5diff.sh.in 2024-09-04 11:37:38.397521167 +0200
+++ hdf5-1.14.4-3/tools/test/h5diff/testh5diff.sh.in 2024-09-04 11:39:19.843948177 +0200
@@ -714,7 +714,7 @@
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -709,7 +709,7 @@
TOOLTEST h5diff_58.txt -v2 h5diff_dset1.h5 h5diff_dset2.h5 refreg
TOOLTEST h5diff_58_ref.txt -v2 h5diff_dset1.h5 h5diff_dset2.h5 /g1/reference2D
# STD_REF_OBJ
+# TOOLTEST h5diff_reg.txt -v2 trefer_attr.h5 trefer_ext2.h5 Dataset3 Dataset3
-TOOLTEST h5diff_reg.txt -v2 trefer_attr.h5 trefer_ext2.h5 Dataset3 Dataset3
+# TOOLTEST h5diff_reg.txt -v2 trefer_attr.h5 trefer_ext2.h5 Dataset3 Dataset3

# test for both dset and attr with same type but with different size
# ( HDDFV-7942 )
@@ -733,7 +733,7 @@
@@ -728,7 +728,7 @@


# 6.0: Check if the command line number of arguments is less than 3
+# TOOLTEST h5diff_600.txt h5diff_basic1.h5
-TOOLTEST h5diff_600.txt h5diff_basic1.h5
+# TOOLTEST h5diff_600.txt h5diff_basic1.h5

# 6.1: Check if non-exist object name is specified
TOOLTEST h5diff_601.txt h5diff_basic1.h5 h5diff_basic1.h5 nono_obj
@@ -1169,7 +1169,7 @@
@@ -1161,7 +1161,7 @@
# test to verify HDFFV-8625
TOOLTEST h5diff_8625.txt -v --enable-error-stack h5diff_comp_vl_strs.h5 h5diff_comp_vl_strs.h5 /group/Compound_dset1 /group_copy/Compound_dset3
# test to verify HDFFV-8639
+# TOOLTEST h5diff_8639.txt -v h5diff_attr3.h5 h5diff_attr2.h5 /g1
-TOOLTEST h5diff_8639.txt -v h5diff_attr3.h5 h5diff_attr2.h5 /g1
+# TOOLTEST h5diff_8639.txt -v h5diff_attr3.h5 h5diff_attr2.h5 /g1
TOOLTEST h5diff_vlstr.txt -v tvlstr.h5 tvlstr2.h5

# ##############################################################################
16 changes: 8 additions & 8 deletions recipe/patches/testpar_pflush.sh.in.openmpi.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
--- hdf5-1.14.4-3.orig/testpar/testpflush.sh.in 2024-05-22 20:43:17.000000000 +0200
+++ hdf5-1.14.4-3/testpar/testpflush.sh.in 2024-09-04 11:34:34.999254199 +0200
@@ -49,7 +49,7 @@
--- hdf5-1.12.0.orig/testpar/testpflush.sh.in 2020-07-18 17:38:20.176820078 -0500
+++ hdf5-1.12.0/testpar/testpflush.sh.in 2020-07-19 08:43:07.332270170 -0500
@@ -52,7 +52,7 @@
echo "called MPI_Finalize(). This is an intended characteristic of the"
echo "test and should not be considered an error."
echo "test and should not be considered an error."
echo "********************************************************************"
+#eval ${RUNPARALLELSCRIPT} ./t_pflush1
-eval ${RUNPARALLELSCRIPT} ./t_pflush1
+#eval ${RUNPARALLELSCRIPT} ./t_pflush1


# ===========================================
@@ -57,5 +57,5 @@
@@ -60,5 +60,5 @@
# The return code of this call is the return
# code of the script.
# ===========================================
+#eval ${RUNPARALLELSCRIPT} ./t_pflush2
+exit 0
-eval ${RUNPARALLELSCRIPT} ./t_pflush2
-
+#eval ${RUNPARALLELSCRIPT} ./t_pflush2
+exit 0

0 comments on commit e11914a

Please sign in to comment.