[petsc-dev] Problem with petsc.pc when configured with --with-single-library=0

Barry Smith bsmith at mcs.anl.gov
Wed Mar 1 10:37:29 CST 2017


> On Mar 1, 2017, at 8:22 AM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Garth, I put a fix in 'next'.  Dolfin configures for me now.
> 
> Barry, the fact that PETSc.pc has been broken for four years is why
> someone might use FindPETSc.cmake.

    It's a chicken and egg thing. No one has ever used it hence it has been broken. Now that we have a user hopefully it can start to become usable.


>  (Garth changed their CMake to use
> pkg-config instead of the uglier logic, but then it fails with no
> debugging output.)
> 
> "Garth N. Wells" <gnw20 at cam.ac.uk> writes:
> 
>> When configuring PETSc with "--with-single-library=0", my installed 
>> petsc.pc file looks like:
>> 
>> prefix=/home/garth/local/packages/petsc-test
>> exec_prefix=${prefix}
>> includedir=${prefix}/include
>> libdir=/home/garth/local/packages/petsc-test/lib
>> ccompiler=mpicc
>> fcompiler=mpif90
>> blaslapacklibs=-llapack -lblas
>> 
>> Name: PETSc
>> Description: Library to solve ODEs and algebraic equations
>> Version: 3.7.5
>> Cflags: -I/home/garth/local/packages/petsc-test/include 
>> -I/home/garth/local/packages/petsc-test/include
>> Libs: -L/home/garth/local/packages/petsc-test/lib  -lpetsc
>> Libs.private: -llapack -lblas -lX11 -lpthread -lm 
>> -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu 
>> -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/6 
>> -L/usr/lib/gcc/x86_64-linux-gnu/6 -Wl,-rpath,/lib/x86_64-linux-gnu 
>> -L/lib/x86_64-linux-gnu -lmpichfort -lgfortran -lm -lgfortran -lm 
>> -lquadmath -lm -lmpichcxx -lstdc++ -Wl,-rpath,/usr/lib/x86_64-linux-gnu 
>> -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/6 
>> -L/usr/lib/gcc/x86_64-linux-gnu/6 -Wl,-rpath,/usr/lib/x86_64-linux-gnu 
>> -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu 
>> -L/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu 
>> -L/usr/lib/x86_64-linux-gnu -ldl -lmpich -lgcc_s -ldl
>> 
>> 
>> Note the "Libs:". It points only to petsc (which doesn't exist), 
>> whereas I would expect it to list each PETSc lib, i.e., petscdm, 
>> petscksp, etc, or provide a pkg-config file for each PETSc lib.
>> 
>> Garth




More information about the petsc-dev mailing list