Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771681 - sci-libs/gmsh-4.6.0[mpi,petsc] with petsc[-mpi]: error: conflicting declaration 'typedef int MPI_Comm'
Summary: sci-libs/gmsh-4.6.0[mpi,petsc] with petsc[-mpi]: error: conflicting declarati...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-19 21:23 UTC by Bernd
Modified: 2021-04-09 18:26 UTC (History)
2 users (show)

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


Attachments
gmsh-4.6.0:20210219-203606.log (gmsh-4.6.0:20210219-203606.log,190.15 KB, text/plain)
2021-02-19 21:23 UTC, Bernd
Details
emerge-info-gmsh-4.6.0.txt (emerge-info-gmsh-4.6.0.txt,14.14 KB, text/plain)
2021-02-19 21:24 UTC, Bernd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd 2021-02-19 21:23:17 UTC
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.
Comment 1 Bernd 2021-02-19 21:23:53 UTC
Created attachment 687678 [details]
gmsh-4.6.0:20210219-203606.log

build log
Comment 2 Bernd 2021-02-19 21:24:28 UTC
Created attachment 687681 [details]
emerge-info-gmsh-4.6.0.txt

output of emerge --info sci-libs/gmsh
Comment 3 Bernd 2021-02-19 22:56:43 UTC
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.
Comment 4 Ionen Wolkens gentoo-dev 2021-02-19 23:00:51 UTC
Can reproduce if have petsc with -mpi (works for me as well otherwise), so having petsc[mpi?] sounds right to me.
Comment 5 Bernd 2021-02-20 09:40:24 UTC
Agreed, that's what I actually meant in my initial report with 'pass[ing] the mpi USE flag to petsc'
Comment 6 Matthias Maier gentoo-dev 2021-02-20 16:23:37 UTC
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.
Comment 7 Larry the Git Cow gentoo-dev 2021-04-09 18:26:47 UTC
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(-)