Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS cannot run rclcpp::init in tests #81

Open
piraka9011 opened this issue Feb 11, 2020 · 4 comments
Open

macOS cannot run rclcpp::init in tests #81

piraka9011 opened this issue Feb 11, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@piraka9011
Copy link

The ros2_control repo recently added GH actions.

Any of the tests that use rclcpp::init() in the setup fail on macOS with the following stack trace:

unknown file: Failure
  2: C++ exception with description
"failed to initialized rcl init options: failed to find shared library of rmw implementation.
Searched rmw_fastrtps_cpp,
at /Users/runner/runners/2.164.0/work/ros2_control/ros2_control/ros_ws/src/ros2/rmw_implementation/rmw_implementation/src/functions.cpp:61,
at /Users/runner/runners/2.164.0/work/ros2_control/ros2_control/ros_ws/src/ros2/rcl/rcl/src/rcl/init_options.c:55"
thrown in SetUpTestCase()

An example stacktrace can be found in the run here.

The error cannot be reproduced locally on both Ubuntu and macOS systems. This seems to be a GH Action specific issue.

@thomas-moulard
Copy link
Member

I actually ran into it in the past, but didn't have the bandwidth to actually go and understand/fix the underlying issue.

@emersonknapp emersonknapp added the bug Something isn't working label Mar 6, 2020
@Karsten1987
Copy link

Is there any news on this? It's still holding back the use of github actions on repos such as ros2_control, ros2_controllers and diagnostics.

@thomas-moulard if you could give me a few pointers on where to start digging into it, I am happy to help here.

@thomas-moulard
Copy link
Member

No progress here, unfortunately. A PR would be very much appreciated.

The problem happens here: https://github.com/ros-tooling/action-ros-ci/blob/master/src/action-ros-ci.ts#L252-L256

Somehow, it seems that the environment is not properly setup on OS X, when we invoke colcon test. I'd probably start by adding env && on my fork, open a PR from my fork to my fork, to get the CI running (don't forget to update the TS code by running npm run build, you should modify the TS code in src/, but the JS code in dist/ is what's getting used).

Happy to jump on a call if you have the bandwidth to take a look at it.

@piraka9011
Copy link
Author

I've found this action to be helpful for debugging: mxschmitt/action-tmate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants