My exact USE flag settings for the package are USE="blas cgns examples med metis mpi netgen opencascade petsc". Removing either of mpi or petsc from USE flags let's the build succeed. From my experience with other packages, I suppose we maybe need to pass the mpi USE flag to petsc to let the package build with both enabled. artus /etc # emerge -pqv gmsh [ebuild R ] sci-libs/gmsh-4.6.0 USE="X blas cgns examples jpeg med metis mpi netgen opencascade png python zlib -petsc" Reproducible: Always Steps to Reproduce: 1. USE="mpi petsc" emerge sci-libs/gmsh 2. 3. build log and emerge info as attachments.
Created attachment 687678 [details] gmsh-4.6.0:20210219-203606.log build log
Created attachment 687681 [details] emerge-info-gmsh-4.6.0.txt output of emerge --info sci-libs/gmsh
After hacking the sandbox issue from https://bugs.gentoo.org/721060#c7 and rebuilding sci-mathematics/petsc with USE=mpi, I can successfully build gmsh with both USE flags together.
Can reproduce if have petsc with -mpi (works for me as well otherwise), so having petsc[mpi?] sounds right to me.
Agreed, that's what I actually meant in my initial report with 'pass[ing] the mpi USE flag to petsc'
With USE=-mpi PETSc does use an internal "mpi.h" header file declaring some stub types. This makes it unfortunately incompatible with other libraries that rely on a correct "mpi.h". The only way around this is to build PETSc with USE=mpi as well. I will add a use flag constraint to make this explicit.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8802d5c036f208bf430aadfc1d14e2dbcceffc97 commit 8802d5c036f208bf430aadfc1d14e2dbcceffc97 Author: Matthias Maier <tamiko@gentoo.org> AuthorDate: 2021-04-09 16:30:47 +0000 Commit: Matthias Maier <tamiko@gentoo.org> CommitDate: 2021-04-09 18:26:27 +0000 sci-libs/gmsh: add a useflag constraint Closes: https://bugs.gentoo.org/771681 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Matthias Maier <tamiko@gentoo.org> sci-libs/gmsh/gmsh-4.6.0.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)