Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 945964 - sci-libs/vtk-9.3.1[cgns] fails to compile with sci-libs/hdf5[-cxx] CMake error: "missing: HDF5_INCLUDE_DIRS"
Summary: sci-libs/vtk-9.3.1[cgns] fails to compile with sci-libs/hdf5[-cxx] CMake erro...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Paul Zander
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 947501
  Show dependency tree
 
Reported: 2024-12-06 12:22 UTC by Christian Bricart
Modified: 2025-05-20 14:57 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,18.33 KB, text/plain)
2024-12-06 12:22 UTC, Christian Bricart
Details
build.log (vtk-9.4.2-gcc15-buildfail.log,12.09 KB, text/x-log)
2025-05-08 20:50 UTC, Joseph McElroy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Bricart 2024-12-06 12:22:00 UTC
Created attachment 913431 [details]
build.log

…
-- Found FFMPEG: /usr/include (found suitable version "6.1.2", minimum required is "2.3.3") found components: avformat avcodec avutil swscale swresample
-- Found HDF5: /usr/lib64/libhdf5.so;/usr/lib64/libsz.so;/usr/lib64/libz.so;/usr/lib64/libdl.a;/usr/lib64/libm.so (found version "1.14.4-3") found components: C HL
-- Found OGG: /usr/lib64/libogg.so
-- Found THEORA: /usr/lib64/libtheora.so
-- Found NetCDF: /usr/include (found version "4.9.2")
-- Found nlohmann_json: /usr/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.11.3")
-- Found SQLite3: /usr/include (found version "3.47.1")
-- Found LibPROJ: /usr/lib64/libproj.so (found version "9.4.1")
-- Searching for PEGTL
-- Searching for PEGTL - found target taocpp::pegtl
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.13.5")
-- Found CGNS: /usr/include (found suitable version "4.40", minimum required is "4.10")
-- Found LibHaru: /usr/lib64/libhpdf.so (found suitable version "2.4.2", minimum required is "2.4.0")
-- Found GL2PS: /usr/lib64/libgl2ps.so (found suitable version "1.4.2", minimum required is "1.4.2")
-- Could not use git to determine source version, using version 2.0.0
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find HDF5 (missing: HDF5_INCLUDE_DIRS) (found version "")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  CMake/patches/99/FindHDF5.cmake:1006 (find_package_handle_standard_args)
  ThirdParty/vtkm/vtkvtkm/vtk-m/CMakeLists.txt:128 (find_package)
Comment 1 Christian Bricart 2024-12-06 12:34:34 UTC
it *does* build correctly when sci-libs/hdf5 has been built with USE=cxx.

the ebuild of sci-libs/vtk-9.3.1 contains an unconditional RDEPEND to sci-libs/hdf5:=[mpi=]
Additionally, there is a conditional dependency on sci-libs/cgnslib[hdf5] when USE=cgns

As earlier <=vtk-9.3.0 had merged just fine with sci-libs/hdf5[-cxx], I guess it is the newly introduced USE=cgns that now would need USE=cxx enabled on hdf5.

However, rather than extending the dependency here, it might be better suited to be built into sci-libs/cgnslib[hdf5]?
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-07 23:39:09 UTC
(In reply to Christian Bricart from comment #1)
> 
> However, rather than extending the dependency here, it might be better
> suited to be built into sci-libs/cgnslib[hdf5]?

Let's get the obvious fix in for now and worry about that later.
Comment 3 Larry the Git Cow gentoo-dev 2025-01-07 23:40:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5aac98ba33e5dee3a4cb74d451fcfde895d14c2b

commit 5aac98ba33e5dee3a4cb74d451fcfde895d14c2b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-07 23:39:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-07 23:39:39 +0000

    sci-libs/vtk: depend on sci-libs/hdf5[cxx] for USE=cgns
    
    Closes: https://bugs.gentoo.org/945964
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-libs/vtk/vtk-9.3.1.ebuild | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 4 Alex Belits 2025-01-09 03:42:05 UTC
After this change, for sci-libs/vtk to compile, sci-libs/hdf5, sci-libs/netcdf and sci-libs/vtk must have mpi USE flag disabled.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-09 03:43:25 UTC
(In reply to Alex Belits from comment #4)
> After this change, for sci-libs/vtk to compile, sci-libs/hdf5,
> sci-libs/netcdf and sci-libs/vtk must have mpi USE flag disabled.

It's not clear to me how this change could cause that. Please file a new bug with the full logs.
Comment 6 Alex Belits 2025-01-09 03:45:28 UTC
(In reply to Alex Belits from comment #4)
> After this change, for sci-libs/vtk to compile, sci-libs/hdf5,
> sci-libs/netcdf and sci-libs/vtk

also sci-libs/cgnslib

> must have mpi USE flag disabled.
Comment 7 Alex Belits 2025-01-09 03:51:02 UTC
(In reply to Sam James from comment #5)
> (In reply to Alex Belits from comment #4)
> > After this change, for sci-libs/vtk to compile, sci-libs/hdf5,
> > sci-libs/netcdf and sci-libs/vtk must have mpi USE flag disabled.
> 
> It's not clear to me how this change could cause that. Please file a new bug
> with the full logs.

sci-libs/hdf5-1.14.4_p3-r1 has

> REQUIRED_USE="
>        !unsupported? (
>                cxx? ( !mpi ) mpi? ( !cxx )
>                threads? ( !cxx !mpi !fortran !hl )

Disabling mpi for sci-libs/hdf5 requires disabling it for everything that uses hdf5, so when cxx is mandatory, mpi is broken.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-09 03:53:36 UTC
Ah, I see.
Comment 9 Paul Zander 2025-01-16 20:46:37 UTC
> REQUIRED_USE="
>        !unsupported? (
>                cxx? ( !mpi ) mpi? ( !cxx )
>                threads? ( !cxx !mpi !fortran !hl )

You can currently build it by setting USE=unsupported for sci-libs/hdf5. We could probably add that to the DEPEND of vtk if that makes the portage output easier to understand.

BUT, fixing it properly requires dealing with the changes from https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=679682fb9fad0112c1f2684241db91814a66e7e0 and that will only happen in vtk-9.4.1.

Upstream vtk doesn't seem to deal with passing --enable-unsupported when building hdf5, yet they build it with both enabled. They are also still on hdf-1.13 ( https://gitlab.kitware.com/vtk/vtk/-/issues/19527 ).

Upstream hdf5 doesn't state explicitly why it's unsupported, only thing I found is https://github.com/HDFGroup/hdf5/blob/hdf5_1.14.4.3/configure.ac#L2112-L2114 . I also get no test failures for hdf5-1.14.5 with USE="cxx mpi unsupported".

So if someone knows why it's unsupported, let me know.
Comment 10 strategy155 2025-04-29 11:26:42 UTC
(In reply to Paul Zander from comment #9)
> So if someone knows why it's unsupported, let me know.

As for the unsupported, there is a description which tells that basically all the high-level apis of the hdf5 are not thread-safe (and something similar for the parallelised version) --- thus unsupported (see https://github.com/HDFGroup/hdf5/blob/7bf340440909d468dbb3cf41f0ea0d87f5050cea/release_docs/INSTALL_CMake.txt#L925). Couldn't find anything else.
Comment 11 Joseph McElroy 2025-05-08 20:50:50 UTC
Created attachment 928192 [details]
build.log

9.4.2 also has an hdf5-related build failure.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-08 21:02:41 UTC
(In reply to Joseph McElroy from comment #11)
> Created attachment 928192 [details]
> build.log
> 
> 9.4.2 also has an hdf5-related build failure.

with what use on hdf5? if you have USE=cxx enabled there, it's not the same bug, and you should file it separately
Comment 13 Larry the Git Cow gentoo-dev 2025-05-10 00:26:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5649ecee9b131d65102b146bf28d0788544fa353

commit 5649ecee9b131d65102b146bf28d0788544fa353
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-05-10 00:24:14 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-05-10 00:25:14 +0000

    dev-build/cmake: backport FindHdf5 fix
    
    Bug: https://bugs.gentoo.org/945964
    Bug: https://bugs.gentoo.org/954327
    Bug: https://bugs.gentoo.org/954378
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-build/cmake/cmake-3.31.7-r1.ebuild        | 314 +++++++++++++++++++++++++
 dev-build/cmake/cmake-4.0.2-r1.ebuild         | 322 ++++++++++++++++++++++++++
 dev-build/cmake/files/cmake-3.31.7-hdf5.patch |  34 +++
 3 files changed, 670 insertions(+)
Comment 14 Karl Hakimian 2025-05-12 16:01:46 UTC
This is also an issue for me. I've tried fiddling around with use flags without finding the right combination. I've also updated cmake to 3.31.7-r1 with no change. I keep getting 

CMake Error at CMakeLists.txt:424 (find_package):
  Could not find a package configuration file provided by "HDF5" with any of
  the following names:

    HDF5Config.cmake
    hdf5-config.cmake

  Add the installation prefix of "HDF5" to CMAKE_PREFIX_PATH or set
  "HDF5_DIR" to a directory containing one of the above files.  If "HDF5"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!


What other information should I send to help track this down?
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-12 22:23:31 UTC
(In reply to Karl Hakimian from comment #14)
> What other information should I send to help track this down?

If you have USE=-cxx on hdf5, turn it on.
If you have USE=cxx on hdf5, your issue is separate and should be filed in a new bug with the build.log, emerge --info.
Comment 16 Karl Hakimian 2025-05-12 22:44:22 UTC
(In reply to Sam James from comment #15)
> (In reply to Karl Hakimian from comment #14)
> > What other information should I send to help track this down?
> 
> If you have USE=-cxx on hdf5, turn it on.
> If you have USE=cxx on hdf5, your issue is separate and should be filed in a
> new bug with the build.log, emerge --info.

My issue must be different. cxx is on for hdf5 and I re-emerged it this morning.
Comment 17 Alex Belits 2025-05-20 14:57:03 UTC
(In reply to Karl Hakimian from comment #14)
> This is also an issue for me. I've tried fiddling around with use flags
> without finding the right combination. I've also updated cmake to 3.31.7-r1
> with no change. I keep getting 
> 
> CMake Error at CMakeLists.txt:424 (find_package):
>   Could not find a package configuration file provided by "HDF5" with any of
>   the following names:
> 
>     HDF5Config.cmake
>     hdf5-config.cmake
> 
>   Add the installation prefix of "HDF5" to CMAKE_PREFIX_PATH or set
>   "HDF5_DIR" to a directory containing one of the above files.  If "HDF5"
>   provides a separate development package or SDK, be sure it has been
>   installed.
> 
> 
> -- Configuring incomplete, errors occurred!
> 
> 
> What other information should I send to help track this down?

This is a different issue. As far as I can tell, sci-libs/vtk-9.4.2 compilation is broken without >=sci-libs/hdf5-1.14.6-r1 because earlier versions of hdf5 do not install cmake files, and this should be updated in dependencies of sci-libs/vtk-9.4.2 .