Bug 1948248 - Fails to build with HDF5 1.12.0
Summary: Fails to build with HDF5 1.12.0
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: med
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-11 02:51 UTC by Orion Poplawski
Modified: 2021-12-03 19:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-03 19:59:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2021-04-11 02:51:06 UTC
Description of problem:

I'm looking into updating hdf5 to 1.12.0, but med fails with:

-- HDF5_VERSION=1.12.0
CMake Error at config/cmake_files/medMacros.cmake:451 (MESSAGE):
  HDF5 version is 1.12.0.  Only versions >= 1.10.2 are supported.

Version-Release number of selected component (if applicable):
4.1.0-2

I'm not quite sure how to contact upstream to see if it's been address already.

Comment 1 Sandro Mani 2021-04-12 07:59:44 UTC
Does it build if you just change

-    IF (NOT HDF_VERSION_MAJOR_REF EQUAL 1 OR NOT HDF_VERSION_MINOR_REF EQUAL 10 OR NOT HDF_VERSION_RELEASE_REF GREATER 1)
+    IF (NOT HDF_VERSION_MAJOR_REF EQUAL 1 OR NOT HDF_VERSION_MINOR_REF GREATER_EQUAL 10 OR NOT HDF_VERSION_RELEASE_REF GREATER 1)

?

Comment 2 Orion Poplawski 2021-04-13 03:54:14 UTC
Nope.  I did:

--- med-4.1.0/config/cmake_files/medMacros.cmake.hdf5-1.12      2021-04-12 21:25:23.522751711 -0600
+++ med-4.1.0/config/cmake_files/medMacros.cmake        2021-04-12 21:26:38.869378378 -0600
@@ -447,7 +447,7 @@ MACRO(MED_FIND_HDF5)
     ##
     ## Requires 1.10.x version
     ##
-    IF (NOT HDF_VERSION_MAJOR_REF EQUAL 1 OR NOT HDF_VERSION_MINOR_REF EQUAL 10 OR NOT HDF_VERSION_RELEASE_REF GREATER 1)
+    IF ("${HDF_VERSION_REF}" VERSION_LESS "1.10.2")
         MESSAGE(FATAL_ERROR "HDF5 version is ${HDF_VERSION_REF}. Only versions >= 1.10.2 are supported.")
     ENDIF()
     ##

and

export CFLAGS="%{optflags} -DH5_USE_110_API"
export CXXFLAGS="%{optflags} -DH5_USE_110_API"

but then I get:

/builddir/build/BUILD/med-4.1.0/src/hdfi/_MEDfileCreate.c: In function '_MEDfileCreate':
/builddir/build/BUILD/med-4.1.0/src/hdfi/_MEDfileCreate.c:163:2: error: #error "Don't forget to change the compatibility version of the library !"
  163 | #error "Don't forget to change the compatibility version of the library !"
      |  ^~~~~


/builddir/build/BUILD/med-4.1.0/src/ci/MEDfileCompatibility.c:117:2: error: #error "Don't forget to check the compatibility version of the library, depending on the internal hdf model choice !"
  117 | #error "Don't forget to check the compatibility version of the library, depending on the internal hdf model choice !"
      |  ^~~~~
/builddir/build/BUILD/med-4.1.0/src/ci/MEDfileCompatibility.c:118:2: error: #error "Cf. _MEDfileCreate ..."
  118 | #error "Cf. _MEDfileCreate ..."
      |  ^~~~~


_MEDfileCreate has:

  /*
   * Cette ligne est censée obliger HDF à ne pas utiliser un modèle interne supérieur à 1.8.z
   * En HDF5-1.10.0p1 cela n'a aucun effet ! 
   * Un test autoconf permet de fixer un intervalle de version HDF à MED.
   */
#if H5_VERS_MINOR > 10
#error "Don't forget to change the compatibility version of the library !"
#endif

Comment 3 Ben Cotton 2021-08-10 12:58:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 4 Orion Poplawski 2021-11-19 01:33:06 UTC
med seems to use a weird mix of 1.6 and 1.8 API.


Note You need to log in before you can comment on or make changes to this bug.