Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake ERROR: PETSC could not be found #35

Open
JanssensNick opened this issue Nov 14, 2019 · 3 comments
Open

CMake ERROR: PETSC could not be found #35

JanssensNick opened this issue Nov 14, 2019 · 3 comments

Comments

@JanssensNick
Copy link

Dear,
When using ccmake to install bitpit, I get the following error:

CMake Error at
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137
(message):
PETSc could not be found. Be sure to set PETSC_DIR and PETSC_ARCH.
(missing: PETSC_INCLUDES PETSC_LIBRARIES PETSC_EXECUTABLE_RUNS)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378
(_FPHSA_FAILURE_MESSAGE)
external/PETSc/cmake/FindPETSc.cmake:348
(find_package_handle_standard_args)
CMakeLists.txt:524 (find_package)

However, I have set all environmental variables (PETSC_DIR, PETSC_ARCH, PETSC_INCLUDES, PETSC_LIBRARIES and PETSC_EXECUTABLE_RUNS). Does anybody know how to solve this?
Note: my os is ubuntu 18.04

@jedbrown
Copy link
Owner

For recent versions of PETSc, I would use CMake's pkg-config support. If you need debugging help here, please send CMakeFiles/CMakeOutput.log and CMakeFiles/CMakeError.log.

@JanssensNick
Copy link
Author

How do I use CMake's pkg-config support?
Here are the lg files:
CMakeError.log
CMakeOutput.log

@jedbrown
Copy link
Owner

Unfortunately, no useful output in those log files. Note that PETSC_INCLUDES, PETSC_LIBRARIES and PETSC_EXECUTABLE_RUNS are not environment variables and should not be set by you. They're intended to be set by FindPETSc.cmake.

But I recommend this: https://cmake.org/cmake/help/latest/module/FindPkgConfig.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants