[petsc-dev] petsc/master: unable to link in C++ with last night PETSC_WITH_EXTERNAL_LIB variable changes

Jed Brown jed at jedbrown.org
Sat Feb 10 11:44:23 CST 2018

"Smith, Barry F." <bsmith at mcs.anl.gov> writes:

>   Eric,
>    We need the entire link line.
>    What linker are you using C, or C++?  This is important.
>    Do you have dependencies on MPI C++ symbols? In other words, are you using C++ MPI bindings?
>     I cannot explain why all the libraries you listed would disappear from PETSC_WITH_EXTERNAL_LIB but we did recently make a change to manual pass under some circumstances less system (including MPI libraries) explicitly since they are already usually passed by the linker. This may be causing your difficulties.

According to Eric's output, -lstdc++ appears twice now, -lmpi still
appears, -ldl still appears (twice), -lm still appears (4 times),
-lpthread still appears (twice), and -lgcc_s still appears.  So the only
library actually eliminated is -lmpi_cxx which is provided by the mpicxx
(despite having been removed from the standard in 2012).

More information about the petsc-dev mailing list