MacOS: linking of unit test binary fails
Summary
make test
fails at [ 66%] Linking CXX executable bin/test_utilities
with:
dyld: Library not loaded: @rpath/libcaosdb.dylib
Referenced from: /Users/test1/software/caosdb-octavelib/test/build_test_DxPY33Zw/bin/test_utilities
Reason: image not found
CMake Error at /Users/test1/homebrew/Cellar/cmake/3.21.3/share/cmake/Modules/GoogleTestAddTests.cmake:77 (message):
Error running test executable.
Path: '/Users/test1/software/caosdb-octavelib/test/build_test_DxPY33Zw/bin/test_utilities'
Result: Subprocess aborted
Output:
Call Stack (most recent call first):
/Users/test1/homebrew/Cellar/cmake/3.21.3/share/cmake/Modules/GoogleTestAddTests.cmake:173 (gtest_discover_tests_impl)
Expected Behavior
make test
should work.
Actual Behavior
See above.
Steps to Reproduce the Problem
-
make test
intest
folder.
Specifications
- Version:
origin/f-macos
be0c8529 - Platform: MacOS
$ sw_vers ProductName: macOS ProductVersion: 11.6 BuildVersion: 20G165
Ideas for fixes
- Look into the rpath settings.
- Look into
-L
settings. - Link directory in CMakeLists.txt?