Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948088 - sci-libs/hdf5: add serial and parallel versions coesistence
Summary: sci-libs/hdf5: add serial and parallel versions coesistence
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-14 14:30 UTC by Fabio Rossi
Modified: 2025-03-20 12:09 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2025-01-14 14:30:31 UTC
Currently in the hdf5 ebuild we have 

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

due to upstream requirements which makes it impossible to have installed hdf5 libs supporting both cxx and mpi. Furthermore no other language wrapper is thread safe (only plain C library) but this is less important from the point of view of dependencies. I have already tried enabling unsupported USE flag but it doesn't even compile.

In portage there are packages that require sci-libs/hdf5[cxx] while for others it is mandatory sci-libs/hdf5[mpi], it is then impossible to support properly external packages depending on hdf5.

I would propose to split hdf5 in two ebuilds or to implement two multibuild variants to get something similar to what is available on debian, so we can two parallel installations

/usr/include/hdf5/serial/*
/usr/include/hdf5/mpi/*
/usr/lib64/libhdf5_serial.so
/usr/lib64/libhdf5_mpi.so
and so on
...

The naming above is just a proposal and should be analyzed more carefully. Probably it is better to have totally new names for includes to avoid that badly written code uses a mix of the two versions.

Of course this requires a lot of work to patch all packages requiring hdf5. But IMHO there is a great benefit improving/increasing the flexibility of Gentoo.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-14 14:33:47 UTC
> Of course this requires a lot of work to patch all packages requiring hdf5.

This makes it essentially a non-starter, sorry. It's already hard enough to look after sci packages without doing something like this, and also breaking anyone trying to build packages from source for development without using ebuilds w/ patches.
Comment 2 Fabio Rossi 2025-03-20 12:09:45 UTC
@sam I have recently worked in a personal overlay to implement what wished here and ported all the ebuilds in portage depending on hdf5 to a multi flavor installation like in Debian. Are you interested in looking at a PR to evaluate it? The changes to the ebuilds, required to support the new layout, are typically quite simple.