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

prefix install target with project name #1019

Merged
merged 3 commits into from
Jul 30, 2019

Conversation

kejxu
Copy link
Contributor

@kejxu kejxu commented Jul 30, 2019

catkin_make for rosserial fails to build with the current Windows wrapper implementation:

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 13 packages in topological order:
-- ~~  - rosserial (metapackage)
-- ~~  - rosserial_arduino
-- ~~  - rosserial_mbed
-- ~~  - rosserial_msgs
-- ~~  - rosserial_python
-- ~~  - rosserial_tivac
-- ~~  - rosserial_vex_cortex
-- ~~  - rosserial_xbee
-- ~~  - rosserial_client
-- ~~  - rosserial_server
-- ~~  - rosserial_embeddedlinux
-- ~~  - rosserial_test
-- ~~  - rosserial_windows
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin metapackage: 'rosserial'
-- ==> add_subdirectory(rosserial/rosserial)
-- +++ processing catkin package: 'rosserial_arduino'
-- ==> add_subdirectory(rosserial/rosserial_arduino)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- rosserial_arduino: 1 messages, 1 services
-- +++ processing catkin package: 'rosserial_mbed'
-- ==> add_subdirectory(rosserial/rosserial_mbed)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- rosserial_mbed: 1 messages, 1 services
CMake Error at catkin/cmake/platform/windows.cmake:140 (add_executable):
  add_executable cannot create target
  "make_libraries.py_executable_install_python" because another target with
  the same name already exists.  The existing target is an executable created
  in source directory
  "C:/ros/catkin_ws/dev_catkin_make/src/rosserial/rosserial_arduino".  See
  documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  catkin/cmake/catkin_install_python.cmake:52 (add_python_executable)
  rosserial/rosserial_mbed/CMakeLists.txt:27 (catkin_install_python)

this issue exists because catkin_make treats the entire workspace as a single project (all projects as subfolders), and so the Windows wrapper for _setup_util.py gets redefined for multiple times, leading to name collision. Since this leads to a fatal error message, it would terminate the build and break the entire building experience

while catkin_make is gradually getting retired, this change would still be needed as maintenance for existing CLI interface. Meantime, pre-pending with ${PROJECT_NAME} would not cause any trouble for the catkin_make_isolated usage

related issue: ms-iot/ROSOnWindows#94
related ros.answers discussion: https://answers.ros.org/question/320613/catkin_make-vs-catkin_make_isolated-which-is-preferred/

@dirk-thomas
Copy link
Member

Thanks for the patch.

I updated the comments to provide some value why the names are prefixed.

@dirk-thomas dirk-thomas merged commit 3d4fa72 into ros:kinetic-devel Jul 30, 2019
@kejxu kejxu deleted the fix_catkin_install_python branch July 30, 2019 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants