[petsc-users] CMake error

Jed Brown jed at jedbrown.org
Thu Sep 20 11:35:49 CDT 2018


I recommend using pkg-config these days if you're using CMake, but the
error from FindPETSc.cmake indicates either an environment problem or an
issue with your install.

David Sommer <david97sommer at gmail.com> writes:

> Hi,
> i am trying to build my project with CMake. For PETSc i use the
> FindPETSc.cmake Module from Barry's repository. Unfortunately
> FindPackage(PETSc) fails with
> "(missing: PETSC_EXECUTABLE_RUNS)"
> In CMakeError.log i have
> "error while loading shared libraries: libpetsc.so.3.9: cannot open shared
> object file: No such file or directory"
> So i manually set $LD_LIBRARY_PATH and $LIBRARY_PATH, both to
> $PETSC_DIR/$PETSC_ARCH. Additionally, because of
> http://jacobmerson.com/2016/01/17/cmake-petsc2.html
> i ran CMake with
> cmake .. -D CMAKE_C_COMPILER=$(which mpicc) -D CMAKE_CXX_COMPILER=$(which
> mpicxx)
> Where did i go wrong?
>
> Thanks
> David Sommer


More information about the petsc-users mailing list