If you have mpi and cxx both enabled, it will build without the cxx flag. This is a problem because another package depending on the cxx use flag will then assume it's satisfied when it is not and compilation will fail when the hdf5_cpp library can't be linked to. Reproducible: Always
(In reply to comment #0) > If you have mpi and cxx both enabled, it will build without the cxx flag. It's impossible to build hdf5 with both of them enabled. Instead of just "dying" ebuild disables cxx support, it's a compromise... > This is a problem because another package depending on the cxx use flag will > then assume it's satisfied when it is not and compilation will fail when the > hdf5_cpp library can't be linked to. Which package has dependecy on sci-libs/hdf5[cxx]?
REQUIRED_USE="cxx? ( !mpi ) mpi? ( !cxx )" could be used.
The package mentioned is a part of ROS (ros.org) which is not in portage currently. Ros has it's own package dependency manager, rosdep, for it's many components. Rosdep will use 'portageq match' to check if packages are installed with the needed use flags. So when it runs "portageq match / sci-libs/hdf5[cxx]" it will get told that hdf5 is installed with cxx, and will attempt to build against it and then that build fails.
(In reply to comment #3) > The package mentioned is a part of ROS (ros.org) which is not in portage > currently. Ros has it's own package dependency manager, rosdep, for it's many > components. Sorry but I'm unable to support things outside of portage. Moreover I want to keep current state, i.e. package not failing with contradicting use flags and using sane defaults instead. You can work around it by depending on sci-libs/hdf5[-mpi,cxx] in your package. > Rosdep will use 'portageq match' to check if packages are installed with the > needed use flags. So when it runs "portageq match / sci-libs/hdf5[cxx]" it will > get told that hdf5 is installed with cxx, and will attempt to build against it > and then that build fails.
I gave it a bit of thought and you're right. I shouldn't fool portage to give user sane defaults. HDF5 now dies on contradicting use flags. Thanks! + 05 Dec 2011; Kacper Kowalik <xarthisius@gentoo.org> hdf5-1.8.8.ebuild: + Use REQUIRED_USE instead of providing sane defaults wrt #392683 by Murph + <MattFinn@gmail.com>
now that ROS package is in portage