ths-rwth/smtrat

cmake fails on MacOS 12.6.2 with Homebrew

rpgoldman opened this issue · 5 comments

Trying to build SMT-RAT on MacOS I get the following error:

CMake Error at build/resources/src/CArL-EP/cmake/carlmacros.cmake:239 (add_custom_target):
  Cannot find source file:

    /Users/rpg/src/smtrat/build/src/smtrat-modules/CMakeFiles/smtrat-module-NewCADModule-NewCADSettings_POlD

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
Call Stack (most recent call first):
  src/smtrat-modules/CMakeLists.txt:64 (add_new_libraries)

Is there any chance this is another CArL version mismatch error?

Did you try deleting the CMakeCache.txt?

I will check again to see if that is the problem, and report back.

New results

No CMakeCache

~/src/smtrat $ find . -name 'CMakeCache.txt'
rpg@RPG-MacBook-Pro: ~/src/smtrat $

cmake configuration fails

Here's the error:

CMake Error at build/resources/src/CArL-EP/cmake/carlmacros.cmake:239 (add_custom_target):
  Cannot find source file:

    /Users/rpg/src/smtrat/build/src/smtrat-modules/CMakeFiles/smtrat-module-NewCADModule-NewCADSettings_POlD

Looking in that directory I see NewCADSettings_ for POD, POLD, POPD and POSD but no POID.

I cannot find any cmake file (*.cmake or CMake*) that contains the substring "POID" so I have not been able to figure out what is wrong.

Full cmake transcript

$ cmake -DCLI_ENABLE_PREPROCESSOR=ON ..
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Did not find clang-tidy, target tidy is disabled.
-- Using clang 14.0.0.14000029 on apple
-- CXX Flags:  -pthread
-- CXX Debug Flags: -g -O1
-- CXX Release Flags: -O3 -DNDEBUG -O3 -fomit-frame-pointer -msse -msse2 -funroll-loops
-- Build type: RELEASE
CMake Warning at resources/resources.cmake:52 (find_package):
  Could not find a configuration file for package "carl" that is compatible
  with requested version "22.12".

  The following configuration files were considered but not accepted:

    /Users/rpg/src/carl/build/carlConfig.cmake, version: 22.06

Call Stack (most recent call first):
  CMakeLists.txt:104 (include)


-- Making sure CArL is available.
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/rpg/src/smtrat/build/resources/src/CArL-config-EP-build
[ 12%] Creating directories for 'CArL-EP-download'
[ 25%] Performing download step (git clone) for 'CArL-EP-download'
Cloning into 'CArL-EP'...
Already on 'master'
Your branch is up to date with 'origin/master'.
[ 37%] Performing update step for 'CArL-EP-download'
[ 50%] No patch step for 'CArL-EP-download'
[ 62%] Performing configure step for 'CArL-EP-download'
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version: carl 22.12
-- Using clang 14.0.0.14000029 on apple
-- CXX Flags:  -pthread
-- CXX Debug Flags: -g -O1
-- CXX Release Flags: -O3 -DNDEBUG -O3 -fomit-frame-pointer -msse -msse2 -funroll-loops
-- Build type: RELEASE
-- GMP / GMPXX 6.2.1 was found at /opt/homebrew/include and /opt/homebrew/lib/libgmp.dylib
-- Boost 1.80.0 was found at /opt/homebrew/include and Boost_system_SHARED;Boost_program_options_SHARED;Boost_unit_test_framework_SHARED;Boost_timer_SHARED;Boost_chrono_SHARED;Boost_serialization_SHARED
-- Eigen3 3.4.0 was found at /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/include
-- Bliss 0.74 was found at /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/include and /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/lib/libbliss.dylib
-- CLN is disabled
-- CoCoA 0.99800 was found at /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/include and /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/lib/libcocoa.a
-- GiNaC is disabled
-- GTest 1.12.1 was found at /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/include and /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/lib/libgtest.a
-- GBenchmark 1.7.1 was found at /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/include and /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/lib/libbenchmark.a
-- LibPoly 0.1.11 was found at /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/include and /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build/resources/lib/libpolyxx.a
-- Doxygen was not found.
-- Did not find clang-tidy, target tidy is disabled.
-- Did not find clang-format, target format is disabled.
-- Doxygen not available, no documentation can be built.
-- Found PythonInterp: /opt/homebrew/bin/python (found version "3.10.9")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/rpg/src/smtrat/build/resources/src/CArL-EP-build
[ 75%] No build step for 'CArL-EP-download'
[ 87%] No install step for 'CArL-EP-download'
[100%] Completed 'CArL-EP-download'
[100%] Built target CArL-EP-download
-- Use shipped version of carl 22.12 (required 22.12)
-- Doxygen was not found.
-- Doxygen not available, no documentation can be built.
-- Did not find libssh, disabled SSH backend.
-- Did not find libssh_threads. If you have a libssh version < 0.8, then this is an error. Beginning from 0.8, libssh_threads is not required.
-- Configuring done
CMake Error at build/resources/src/CArL-EP/cmake/carlmacros.cmake:239 (add_custom_target):
  Cannot find source file:

    /Users/rpg/src/smtrat/build/src/smtrat-modules/CMakeFiles/smtrat-module-NewCADModule-NewCADSettings_POlD

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
Call Stack (most recent call first):
  src/smtrat-modules/CMakeLists.txt:64 (add_new_libraries)


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

I am sorry, we do not have any MacOS machine available to debug this. Of course, we would be happy to merge a fix for this issue.

This seems related to my issue in the Dockerfile that somehow cmake is not getting the right version of CArL.

Is there some reason not to make CArL a git submodule of SMTRAT? If you do that, you could more easily ensure that the version of CArL and the version of SMTRAT are coordinated. That may just be me, but even though git submodules are complicated, they seem a lot less complicated than recursive cmake scripts.