diff --git a/hdf5-wrappers.patch b/hdf5-wrappers.patch new file mode 100644 index 0000000..b822b9d --- /dev/null +++ b/hdf5-wrappers.patch @@ -0,0 +1,109 @@ +diff -up hdf5-1.10.5/c++/src/h5c++.in.wrappers hdf5-1.10.5/c++/src/h5c++.in +--- hdf5-1.10.5/c++/src/h5c++.in.wrappers 2018-09-03 20:54:43.000000000 -0600 ++++ hdf5-1.10.5/c++/src/h5c++.in 2020-01-26 19:14:11.243718498 -0700 +@@ -87,10 +87,10 @@ CXXLINKERBASE="@CXX@" + # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in + # from the hdf5 build. The order of the flags is intended to give precedence + # to the user's flags. +-H5BLD_CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@" ++H5BLD_CXXFLAGS= + H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@" +-H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" +-H5BLD_LIBS="@LIBS@" ++H5BLD_LDFLAGS= ++H5BLD_LIBS= + + CXX="${HDF5_CXX:-$CXXBASE}" + CXXLINKER="${HDF5_CLINKER:-$CXXLINKERBASE}" +@@ -103,7 +103,8 @@ LIBS="${HDF5_LIBS:-$LIBSBASE}" + # available library is shared, it will be used by default. The user can + # override either default, although choosing an unavailable library will result + # in link errors. +-STATIC_AVAILABLE="@enable_static@" ++# Fedora prefers shared libraries ++STATIC_AVAILABLE=no + if test "${STATIC_AVAILABLE}" = "yes"; then + USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}" + else +@@ -385,7 +386,7 @@ if test "x$do_link" = "xyes"; then + # from the hdf5 build. The order of the flags is intended to give precedence + # to the user's flags. + +- $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link ++ $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args + + status=$? + fi +diff -up hdf5-1.10.5/fortran/src/h5fc.in.wrappers hdf5-1.10.5/fortran/src/h5fc.in +--- hdf5-1.10.5/fortran/src/h5fc.in.wrappers 2018-09-03 20:54:44.000000000 -0600 ++++ hdf5-1.10.5/fortran/src/h5fc.in 2020-01-26 19:14:18.699761737 -0700 +@@ -83,11 +83,11 @@ FLINKERBASE="@FC@" + # libraries in $link_args, followed by any external library paths and libraries + # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build. + # The order of the flags is intended to give precedence to the user's flags. +-H5BLD_FCFLAGS="@AM_FCFLAGS@ @FCFLAGS@" ++H5BLD_FCFLAGS= + F9XMODFLAG="@F9XMODFLAG@" + F9XSUFFIXFLAG="@F9XSUFFIXFLAG@" +-H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" +-H5BLD_LIBS="@LIBS@" ++H5BLD_LDFLAGS= ++H5BLD_LIBS= + + FC="${HDF5_FC:-$FCBASE}" + FLINKER="${HDF5_FLINKER:-$FLINKERBASE}" +@@ -99,7 +99,8 @@ LIBS="${HDF5_LIBS:-$LIBSBASE}" + # available library is shared, it will be used by default. The user can + # override either default, although choosing an unavailable library will result + # in link errors. +-STATIC_AVAILABLE="@enable_static@" ++# Fedora prefers shared libraries ++STATIC_AVAILABLE=no + if test "${STATIC_AVAILABLE}" = "yes"; then + USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}" + else +@@ -363,7 +364,7 @@ if test "x$do_link" = "xyes"; then + # libraries in $link_args, followed by any external library paths and libraries + # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build. + # The order of the flags is intended to give precedence to the user's flags. +- $SHOW $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link ++ $SHOW $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args + status=$? + fi + +diff -up hdf5-1.10.5/tools/src/misc/h5cc.in.wrappers hdf5-1.10.5/tools/src/misc/h5cc.in +--- hdf5-1.10.5/tools/src/misc/h5cc.in.wrappers 2018-09-03 20:54:44.000000000 -0600 ++++ hdf5-1.10.5/tools/src/misc/h5cc.in 2020-01-26 19:13:58.079642156 -0700 +@@ -89,10 +89,10 @@ CLINKERBASE="@CC@" + # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in + # from the hdf5 build. The order of the flags is intended to give precedence + # to the user's flags. +-H5BLD_CFLAGS="@AM_CFLAGS@ @CFLAGS@" ++H5BLD_CFLAGS= + H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@" +-H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" +-H5BLD_LIBS="@LIBS@" ++H5BLD_LDFLAGS= ++H5BLD_LIBS= + + CC="${HDF5_CC:-$CCBASE}" + CLINKER="${HDF5_CLINKER:-$CLINKERBASE}" +@@ -105,7 +105,8 @@ LIBS="${HDF5_LIBS:-$LIBSBASE}" + # available library is shared, it will be used by default. The user can + # override either default, although choosing an unavailable library will result + # in link errors. +-STATIC_AVAILABLE="@enable_static@" ++# Fedora prefers shared libraries ++STATIC_AVAILABLE=no + if test "${STATIC_AVAILABLE}" = "yes"; then + USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}" + else +@@ -392,7 +393,7 @@ if test "x$do_link" = "xyes"; then + # paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in + # from the hdf5 build. The order of the flags is intended to give precedence + # to the user's flags. +- $SHOW $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link ++ $SHOW $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args + status=$? + fi + diff --git a/hdf5.spec b/hdf5.spec index 8e01161..8aed4da 100644 --- a/hdf5.spec +++ b/hdf5.spec @@ -7,7 +7,7 @@ # You need to recompile all users of HDF5 for each version change Name: hdf5 Version: 1.10.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A general purpose library and file format for storing scientific data License: BSD URL: https://portal.hdfgroup.org/display/HDF5/HDF5 @@ -25,6 +25,9 @@ Patch2: hdf5-warning.patch Patch3: hdf5-build.patch # Upstream fix for Java tests Patch4: https://jira.hdfgroup.org/secure/attachment/26110/fix-HDFFV-10745.patch +# Remove Fedora build flags from h5cc/h5c++/h5fc +# https://bugzilla.redhat.com/show_bug.cgi?id=1794625 +Patch5: hdf5-wrappers.patch BuildRequires: gcc-gfortran BuildRequires: java-devel @@ -173,6 +176,7 @@ HDF5 parallel openmpi static libraries %patch2 -p1 -b .warning %patch3 -p1 -b .build %patch4 -p1 -b .jira +%patch5 -p1 -b .wrappers # Replace jars with system versions find -name \*.jar -delete @@ -490,6 +494,9 @@ done %changelog +* Sun Jan 26 2020 Orion Poplawski - 1.10.5-5 +- Remove Fedora build flags from h5cc/h5c++/h5fc (bz#1794625) + * Mon Nov 11 2019 Orion Poplawski - 1.10.5-4 - Add upstream patch to fix 32-bit java tests