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

Build fails if the same RMW implementation appears multiple times in the AMENT_PREFIX_PATH #4

Closed
gerkey opened this issue Aug 28, 2015 · 2 comments
Assignees

Comments

@gerkey
Copy link
Member

gerkey commented Aug 28, 2015

If you have a multi-element AMENT_PREFIX_PATH that contains the same RMW implementation twice, then you can get an error like this:

CMake Error at /Users/gerkey/ros2_ws/install/share/rmw_implementation/cmake/add_executable_for_each_rmw_implementation.cmake:66 (add_executable):
  add_executable cannot create target "intrapc__rmw_opensplice_cpp" because
  another target with the same name already exists.  The existing target is
  an executable created in source directory
  "/Users/gerkey/ros2_ws/src/ros2/demos/intra_process_comms".  See
  documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  CMakeLists.txt:21 (add_executable_for_each_rmw_implementations)

I confirmed that get_available_rmw_implementations() was returning a list with duplicates: rmw_opensplice_cpp;rmw_opensplice_cpp.

In this case, my AMENT_PREFIX_PATH was:

AMENT_PREFIX_PATH=/Users/gerkey/ros2_ws/install:/Users/gerkey/ros2_install/ros2

I had previously sourced the setup file for a binary install (the ros2_install element). I had also sourced the setup file from install tree where I was building, but that shouldn't be a problem.

Now, perhaps I'm in the wrong for getting into this configuration, but it would be good to fix, or at least get a better error message.

I'm inclined to REMOVE_DUPLICATES inside get_available_rmw_implementations(), but am open to other options.

@dirk-thomas
Copy link
Member

Can you please double check that ament/ament_cmake#26 fixes the problem for you.

@dirk-thomas dirk-thomas self-assigned this Aug 28, 2015
@dirk-thomas dirk-thomas added in progress Actively being worked on (Kanban column) in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Aug 28, 2015
@gerkey
Copy link
Member Author

gerkey commented Aug 28, 2015

Confirmed, that fixes it, thanks!

@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Aug 28, 2015
mauropasse pushed a commit to mauropasse/rmw_implementation that referenced this issue Oct 14, 2020
…cutor

void return on set_events_executor_callback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants