#904301 libpetsc-real3.9-dev: Include paths to mpi header missing from petscvariables (and pkgconfig)

Package:
src:petsc
Source:
petsc
Submitter:
Mikael Öhman
Date:
2021-02-11 15:51:02 UTC
Severity:
normal
Tags:
#904301#5
Date:
2018-07-23 00:16:13 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

Building a CMake based code using FindPETSc.cmake (which is made by a petsc
dev), it refused to use the petsc3.9 installation, as it failed to build a
small test code.

After some digging, I found that it was only missing the include path to the
mpi headers.
petsc-dev-3.7.5 included the path -I/usr/lib/x86_64-linux-gnu/openmpi/include,
which is gone from the 3.8 and 3.9 packages.

It's missing from petscvariables, but it's also missing from the pkgconfig
file.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Hacking in -I/usr/lib/x86_64-linux-gnu/openmpi/include into PETSC_CC_INCLUDES
resolved the issues with FindPETSc.cmake.

Best regards, Mikael

#904301#10
Date:
2018-07-23 10:23:07 UTC
From:
To:
On Mon, 23 Jul 2018 02:16:13 +0200 =?utf-8?q?Mikael_=C3=96hman?= <micke teer@gmail.com> wrote:
...
petsc
build a
to the
gnu/openmpi/include,
pkgconfig


Thanks for the report Mikael.

Hopefully won't be too hard to find why the path disappeared in 3.8.

Drew

#904301#15
Date:
2018-09-18 09:51:18 UTC
From:
To:
Upstream suggested that the --with-mpi-dir configuration options does
not need to be (and should not be) invoked if compilation is done with
mpicc and friends. And use of mpicc is recommended to get the flags
right.

The short workaround for you is to set mpicc as your CC. mpicc sets
the include dirs that you're missing.

Let me know if that fits in with the intentions of the PETSc developer
who made the FindPETSc.cmake that you're using.  If not, we can
discuss it further with them and the other PETSc developers.

Drew