[petsc-users] Trouble finding PETSc with cmake

Alice Raeli aliraeli at math.u-bordeaux1.fr
Fri Feb 27 12:57:12 CST 2015


I have set PkgConfig CMake module and it changed the error with the same result

-- checking for one of the modules 'PETSc'
CMake Error at /usr/local/homebrew/Cellar/cmake/3.1.3/share/cmake/Modules/FindPkgConfig.cmake:548 (message):
  None of the required 'PETSc' found
Call Stack (most recent call first):
  CMakeLists.txt:25 (pkg_search_module)


 cmake module path /Users/Alice/Documents/Work/Programmazione/TEST_AUTOMATIZZAZIONE/ParallelOrder/Penalizzazione/cmake-modules
-- checking for one of the modules 'PETSc'
CMake Error at /usr/local/homebrew/Cellar/cmake/3.1.3/share/cmake/Modules/FindPkgConfig.cmake:548 (message):
  None of the required 'PETSc' found
Call Stack (most recent call first):
  test/CMakeLists.txt:10 (pkg_search_module)


-- Configuring incomplete, errors occurred!
See also "/Users/Alice/Documents/Work/Programmazione/TEST_AUTOMATIZZAZIONE/ParallelOrder/Penalizzazione/build/CMakeFiles/CMakeOutput.log".
CMake Error: Unable to open check cache file for write. /Users/Alice/Documents/Work/Programmazione/TEST_AUTOMATIZZAZIONE/ParallelOrder/Penalizzazione/build/CMakeFiles/cmake.check_cache


> Il giorno 27 févr. 2015, alle ore 19:05, Jed Brown <jed at jedbrown.org> ha scritto:
> 
> Alice Raeli <alice.raeli at math.u-bordeaux1.fr> writes:
> 
>> Hi all,
>> 
>> i’m trying to build my project using cmake.
>> PETSc is already installed and its tests runned but when I try cmake .. for my project it appears that it doesn’t find PETSc. The error message is:
> 
> CMake insists on sequestering all the useful information in
> CMakeFiles/CMakeError.log and CMakeFiles/CMakeOutput.log.  Can you check
> those files for details about the error?  Send the output here if it
> doesn't make sense to you.
> 

CMakeOutput.log produced:

  ignore line: [/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTryCompileExec251571393.dir/build.make CMakeFiles/cmTryCompileExec251571393.dir/build]
  ignore line: [/usr/local/homebrew/Cellar/cmake/3.1.3/bin/cmake -E cmake_progress_report /Users/Alice/Documents/Work/Programmazione/TEST_AUTOMATIZZAZIONE/ParallelOrder/Penalizzazione/build/CMakeFiles/CMakeTmp/CMakeFiles 1]
  ignore line: [Building CXX object CMakeFiles/cmTryCompileExec251571393.dir/CMakeCXXCompilerABI.cpp.o]
  ignore line: [/usr/bin/c++     -o CMakeFiles/cmTryCompileExec251571393.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/homebrew/Cellar/cmake/3.1.3/share/cmake/Modules/CMakeCXXCompilerABI.cpp]
  ignore line: [Linking CXX executable cmTryCompileExec251571393]
  ignore line: [/usr/local/homebrew/Cellar/cmake/3.1.3/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec251571393.dir/link.txt --verbose=1]
  ignore line: [/usr/bin/c++     -Wl,-search_paths_first -Wl,-headerpad_max_install_names -v -Wl,-v CMakeFiles/cmTryCompileExec251571393.dir/CMakeCXXCompilerABI.cpp.o  -o cmTryCompileExec251571393   ]
  ignore line: [Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)]
  ignore line: [Target: x86_64-apple-darwin14.1.0]
  ignore line: [Thread model: posix]
  link line: [ "/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o cmTryCompileExec251571393 -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTryCompileExec251571393.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lSystem /Library/Developer/CommandLineTools/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.osx.a]
    arg [/Library/Developer/CommandLineTools/usr/bin/ld] ==> ignore
    arg [-demangle] ==> ignore
    arg [-dynamic] ==> ignore
    arg [-arch] ==> ignore
    arg [x86_64] ==> ignore
    arg [-macosx_version_min] ==> ignore
    arg [10.10.0] ==> ignore
    arg [-o] ==> ignore
    arg [cmTryCompileExec251571393] ==> ignore
    arg [-search_paths_first] ==> ignore
    arg [-headerpad_max_install_names] ==> ignore
    arg [-v] ==> ignore
    arg [CMakeFiles/cmTryCompileExec251571393.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
    arg [-lc++] ==> lib [c++]
    arg [-lSystem] ==> lib [System]
    arg [/Library/Developer/CommandLineTools/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.osx.a] ==> lib [/Library/Developer/CommandLineTools/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.osx.a]
  Library search paths: [;/usr/lib;/usr/local/lib]
  Framework search paths: [;/Library/Frameworks/;/System/Library/Frameworks/]
  remove lib [System]
  collapse lib [/Library/Developer/CommandLineTools/usr/bin/../lib/clang/6.0/lib/darwin/libclang_rt.osx.a] ==> [/Library/Developer/CommandLineTools/usr/lib/clang/6.0/lib/darwin/libclang_rt.osx.a]
  collapse library dir [/usr/lib] ==> [/usr/lib]
  collapse library dir [/usr/local/lib] ==> [/usr/local/lib]
  collapse framework dir [/Library/Frameworks/] ==> [/Library/Frameworks]
  collapse framework dir [/System/Library/Frameworks/] ==> [/System/Library/Frameworks]
  implicit libs: [c++;/Library/Developer/CommandLineTools/usr/lib/clang/6.0/lib/darwin/libclang_rt.osx.a]
  implicit dirs: [/usr/lib;/usr/local/lib]
  implicit fwks: [/Library/Frameworks;/System/Library/Frameworks]

However CMakeError.log appearly has not been built yet.


Yours sincerely,
Alice

>> cmake module path /Users/Alice/Documents/Work/Programmazione/TEST_AUTOMATIZZAZIONE/ParallelOrder/Penalizzazione/cmake-modules
>> dir /usr/local/petsc arch arch-darwin-c-debug
>> CMake Warning (dev) at cmake-modules/FindPackageMultipass.cmake:48 (if):
>>  Policy CMP0054 is not set: Only interpret if() arguments as variables or
>>  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
>>  details.  Use the cmake_policy command to set the policy and suppress this
>>  warning.
>> 
>>  Quoted variables like "/usr/local/petsc" will no longer be dereferenced
>>  when the policy is set to NEW.  Since the policy is not set the OLD
>>  behavior will be used.
>> Call Stack (most recent call first):
>>  cmake-modules/FindPETSc.cmake:108 (find_package_multipass)
>>  test/CMakeLists.txt:8 (FIND_PACKAGE)
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>> 
>> CMake Error at /usr/local/homebrew/Cellar/cmake/3.1.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
>>  PETSc could not be found.  Be sure to set PETSC_DIR and PETSC_ARCH.
>>  (missing: PETSC_EXECUTABLE_RUNS)
>> Call Stack (most recent call first):
>>  /usr/local/homebrew/Cellar/cmake/3.1.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
>>  cmake-modules/FindPETSc.cmake:323 (find_package_handle_standard_args)
>>  test/CMakeLists.txt:8 (FIND_PACKAGE)
>> 
>> ______________
>> 
>> PETSC_DIR and PETSC_ARCH are: 
>> /usr/local/petsc/
>> arch-darwin-c-debug
>> 
>> but also following the given instruction it seems not reading the correct path.
>> 
>> I work on OS X Yosemite 10.10.2
>> 
>> cmake version 3.1.3
>> 
>> 
>> CmakeLists.txt […]
>> SET(CMAKE_C_COMPILER mpicc)
>> 
>> SET(CMAKE_CXX_COMPILER mpicxx)
>> 
>> SET (CMAKE_C_FLAGS_INIT                "-Wall -std=c99")
>> SET (CMAKE_C_FLAGS_DEBUG_INIT          "-g")
>> SET (CMAKE_C_FLAGS_MINSIZEREL_INIT     "-Os -DNDEBUG")
>> SET (CMAKE_C_FLAGS_RELEASE_INIT        "-O4 -DNDEBUG")
>> SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
>> 
>> SET (CMAKE_CXX_FLAGS_INIT                "-Wall")
>> SET (CMAKE_CXX_FLAGS_DEBUG_INIT          "-g")
>> SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT     "-Os -DNDEBUG")
>> SET (CMAKE_CXX_FLAGS_RELEASE_INIT        "-O4 -DNDEBUG")
>> SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
>> 
>> […]
>> 
>> Have you got a solution?
>> 
>> Thanks,
>> Alice
>> 
>> Alice Raeli
>> alice.raeli at math.u-bordeaux1.fr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150227/7c506d0a/attachment-0001.html>


More information about the petsc-users mailing list