[ros-users] [Discourse.ros.org] [Next Generation ROS] Library not loaded: libfastcdr.dylib

mch ros.discourse at gmail.com
Tue Jul 11 23:32:45 UTC 2017



**Operating System:** OSX 10.12.5
**Installation type:** binary
**Version or commit hash:** beta 1; version: 148df7e841b91da488ec3bb4abd295a2bccdb728
**DDS implementation:** Fast-RTPS
**Client library (if applicable):** boost, restcpp

**Steps to reproduce issue**
ament test --only-packages skynet

**Expected behavior**
test runs normally

**Actual behavior**
Failed with output:
<pre>
+++ Testing 'skynet'
==> '. /Users/mc/skynet-edge/core_ws/build/skynet/cmake__test.sh && /usr/bin/make test ARGS=-V -D ExperimentalTest --no-compress-output' in '/Users/mc/skynet-edge/core_ws/build/skynet'
Running tests...
UpdateCTestConfiguration  from :/Users/mc/skynet-edge/core_ws/build/skynet/DartConfiguration.tcl
Parse Config file:/Users/mc/skynet-edge/core_ws/build/skynet/DartConfiguration.tcl
   Site: mcs-MacBook-Pro.sjc.cyngn.internal
   Build name: Darwin-c++
 Add coverage exclude regular expressions.
SetCTestConfiguration:CMakeCommand:/Applications/CMake.app/Contents/bin/cmake
UpdateCTestConfiguration  from :/Users/mc/skynet-edge/core_ws/build/skynet/DartConfiguration.tcl
Parse Config file:/Users/mc/skynet-edge/core_ws/build/skynet/DartConfiguration.tcl
Test project /Users/mc/skynet-edge/core_ws/build/skynet
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
    Start 1: skynet_test

1: Test command: /usr/local/bin/python3 "-u" "/Users/mc/ros2-osx/share/ament_cmake_test/cmake/run_test.py" "/Users/mc/skynet-edge/core_ws/build/skynet/test_results/skynet/skynet_test.gtest.xml" "--output-file" "/Users/mc/skynet-edge/core_ws/build/skynet/ament_cmake_gmock/skynet_test.txt" "--command" "/Users/mc/skynet-edge/core_ws/build/skynet/test/skynet_test" "--gtest_output=xml:/Users/mc/skynet-edge/core_ws/build/skynet/test_results/skynet/skynet_test.gtest.xml"
1: Test timeout computed to be: 60
1: -- run_test.py: invoking following command in '/Users/mc/skynet-edge/core_ws/src/skynet':
1:  - /Users/mc/skynet-edge/core_ws/build/skynet/test/skynet_test --gtest_output=xml:/Users/mc/skynet-edge/core_ws/build/skynet/test_results/skynet/skynet_test.gtest.xml
1: dyld: Library not loaded: libfastcdr.dylib
1:   Referenced from: /Users/mc/ros2-osx/lib/librmw_fastrtps_cpp.dylib
1:   Reason: image not found
1: -- run_test.py: return code -6
1: -- run_test.py: generate result file '/Users/mc/skynet-edge/core_ws/build/skynet/test_results/skynet/skynet_test.gtest.xml' with failed test
1: -- run_test.py: verify result file '/Users/mc/skynet-edge/core_ws/build/skynet/test_results/skynet/skynet_test.gtest.xml'
1/1 Test #1: skynet_test ......................***Failed    0.14 sec

0% tests passed, 1 tests failed out of 1

Label Time Summary:
gmock    =   0.14 sec (1 test)

Total Test time (real) =   0.14 sec

The following tests FAILED:
      1 - skynet_test (Failed)
Errors while running CTest
make: *** [test] Error 8

<== Command '. /Users/mc/skynet-edge/core_ws/build/skynet/cmake__test.sh && /usr/bin/make test 'ARGS=-V -D ExperimentalTest --no-compress-output'' failed in '/Users/mc/skynet-edge/core_ws/build/skynet' with exit code '2'
</pre>

**Additional information**
My project compiles fine. I created a ROS2 test for my project and want to run it. The same test works fine on Ubuntu. I only have this problem on OSX. 

As message says, the system can't find libfastcdr.dylib. That is weird, because I can see the library in ~/ros2-osx/lib dir. I assume it should be visible after I sourced ROS2. I tried source scripts setup.bash, setup.sh, local_setup.bash, local_setup.sh. Nothing helped.

If I manually create symbol link in /usr/local/lib pointing to  ~/ros2-osx/lib/libfastcdr.dylib, everything works fine. It doesn't feels the right fix though.

Could someone hint how should it work normally?





---
[Visit Topic](https://discourse.ros.org/t/library-not-loaded-libfastcdr-dylib/2195/1) or reply to this email to respond.




More information about the ros-users mailing list