Skip to content

exemplar build regression #141

@camio

Description

@camio

On my MacOS machine, I used to be able to run cmake --workflow --preset appleclang-release and everything worked.

Now, I get an error

(base) dsankel@Davids-Mac-Studio exemplar % cmake --workflow --preset appleclang-release
Executing workflow step 1 of 3: configure preset "appleclang-release"

Preset CMake variables:

  CMAKE_BUILD_TYPE="RelWithDebInfo"
  CMAKE_CXX_STANDARD="20"
  CMAKE_TOOLCHAIN_FILE="cmake/appleclang-toolchain.cmake"

-- 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: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found GTest: /Users/dsankel/miniconda3/lib/cmake/GTest/GTestConfig.cmake (found version "1.10.0")
-- Looking for __cpp_lib_ranges
-- Looking for __cpp_lib_ranges - not found
CMake Warning at examples/CMakeLists.txt:12 (message):
  Missing range support! Skip: identity_as_default_projection


Examples to be built: identity_direct_usage
-- Configuring done (2.2s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/dsankel/repos/bemanproject/exemplar/build/appleclang-release

Executing workflow step 2 of 3: build preset "appleclang-release"

[2/6] Linking CXX static library src/beman/exemplar/libbeman.exemplar.a
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: src/beman/exemplar/libbeman.exemplar.a the table of contents is empty (no object file members in the library define global symbols)
[6/6] Linking CXX executable tests/beman/exemplar/beman.exemplar.tests.identity
FAILED: tests/beman/exemplar/beman.exemplar.tests.identity tests/beman/exemplar/beman.exemplar.tests.identity[1]_tests.cmake /Users/dsankel/repos/bemanproject/exemplar/build/appleclang-release/tests/beman/exemplar/beman.exemplar.tests.identity[1]_tests.cmake 
: && /usr/bin/clang++ -O3  -O2 -g -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names  tests/beman/exemplar/CMakeFiles/beman.exemplar.tests.identity.dir/identity.test.cpp.o -o tests/beman/exemplar/beman.exemplar.tests.identity  src/beman/exemplar/libbeman.exemplar.a  /Users/dsankel/miniconda3/lib/libgtest_main.dylib  /Users/dsankel/miniconda3/lib/libgtest.dylib && cd /Users/dsankel/repos/bemanproject/exemplar/build/appleclang-release/tests/beman/exemplar && /opt/homebrew/Cellar/cmake/3.30.1/bin/cmake -D TEST_TARGET=beman.exemplar.tests.identity -D TEST_EXECUTABLE=/Users/dsankel/repos/bemanproject/exemplar/build/appleclang-release/tests/beman/exemplar/beman.exemplar.tests.identity -D TEST_EXECUTOR= -D TEST_WORKING_DIR=/Users/dsankel/repos/bemanproject/exemplar/build/appleclang-release/tests/beman/exemplar -D TEST_EXTRA_ARGS= -D TEST_PROPERTIES= -D TEST_PREFIX= -D TEST_SUFFIX= -D TEST_FILTER= -D NO_PRETTY_TYPES=FALSE -D NO_PRETTY_VALUES=FALSE -D TEST_LIST=beman.exemplar.tests.identity_TESTS -D CTEST_FILE=/Users/dsankel/repos/bemanproject/exemplar/build/appleclang-release/tests/beman/exemplar/beman.exemplar.tests.identity[1]_tests.cmake -D TEST_DISCOVERY_TIMEOUT=5 -D TEST_XML_OUTPUT_DIR= -P /opt/homebrew/Cellar/cmake/3.30.1/share/cmake/Modules/GoogleTestAddTests.cmake
dyld[77184]: Library not loaded: @rpath/libgtest_main.dylib
  Referenced from: <84E54742-FDDC-3A84-A810-19B850FA2CAD> /Users/dsankel/repos/bemanproject/exemplar/build/appleclang-release/tests/beman/exemplar/beman.exemplar.tests.identity
  Reason: tried: '/usr/local/lib/libgtest_main.dylib' (no such file), '/usr/lib/libgtest_main.dylib' (no such file, not in dyld cache)
CMake Error at /opt/homebrew/Cellar/cmake/3.30.1/share/cmake/Modules/GoogleTestAddTests.cmake:112 (message):
  Error running test executable.

    Path: '/Users/dsankel/repos/bemanproject/exemplar/build/appleclang-release/tests/beman/exemplar/beman.exemplar.tests.identity'
    Working directory: '/Users/dsankel/repos/bemanproject/exemplar/build/appleclang-release/tests/beman/exemplar'
    Result: Subprocess aborted
    Output:
      

Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.30.1/share/cmake/Modules/GoogleTestAddTests.cmake:226 (gtest_discover_tests_impl)


ninja: build stopped: subcommand failed.

My expectation was that the presets would still use FetchContent for dependencies because user environments are typically weird and frequently broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions