Can not compile ROS 2: CMake Error: INSTALL(EXPORT) given unknown export "HAS_LIBRARY_TARGET"
Hi, I follow the instructions at https://github.com/ros2/ros2/wiki/Lin... . I would want to have ardent on xenial, but the setup fails at
$ colcon build --symlink-install
The output ends with
...
Finished <<< python_cmake_module [1.90s]
Starting >>> gmock_vendor
Finished <<< ament_cmake_ros [1.77s]
Starting >>> rosidl_generator_c
Finished <<< gmock_vendor [2.45s]
Starting >>> launch_testing
--- stderr: ament_index_cpp
CMake Error: INSTALL(EXPORT) given unknown export "HAS_LIBRARY_TARGET"
---
Failed <<< ament_index_cpp [ Exited with code 1 ]
Aborted <<< rosidl_generator_c
Aborted <<< fastrtps
Aborted <<< launch_testing
Summary: 52 packages finished [1min 13s]
1 package failed: ament_index_cpp
3 packages aborted: fastrtps launch_testing rosidl_generator_c
1 package had stderr output: ament_index_cpp
133 packages not processed
I sourced the following before:
source /opt/ros/ardent/setup.bash
source /opt/rti.com/rti_connext_dds-5.3.1/setenv_ros2rti.bash
Can something be done with that? Thanks.
I would suspect you are using an outdated version of the
ament_cmake
repository. Can you share the hash of your cloned repository?Dirk, see an update in the question, thanks.
If updating the source to the latest master solved the problem for you please post that as an answer and accept that answer. So future readers can find it. The new problem sounds very different and probably warrants a separate question (since it is not related to the title).
No it does not - the build is parallel and asynchronous, sometimes the same error shows up also with master. All in all, I could not compile any of the two versions.
If you experience non-determinism please post the exact steps you perform as well as full logs from both invocations (the one with the failure and the one without).
I wil upgrade my OS, try Bouncy and post. I guess that the nondeterminism comes from two errors, whichever comes first is caused by the relative speed of threads in a parallel compilation.
You can process packages sequentially with
--executor sequential
and debug / report one problem at at time.