ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can not compile ROS 2: CMake Error: INSTALL(EXPORT) given unknown export "HAS_LIBRARY_TARGET"

asked 2018-09-04 09:39:59 -0600

uthinu gravatar image

updated 2018-09-05 08:44:32 -0600

Procópio gravatar image

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.

edit retag flag offensive close merge delete

Comments

I would suspect you are using an outdated version of the ament_cmake repository. Can you share the hash of your cloned repository?

Dirk Thomas gravatar image Dirk Thomas  ( 2018-09-04 09:44:32 -0600 )edit

Dirk, see an update in the question, thanks.

uthinu gravatar image uthinu  ( 2018-09-04 16:55:42 -0600 )edit

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).

Dirk Thomas gravatar image Dirk Thomas  ( 2018-09-04 16:58:53 -0600 )edit

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.

uthinu gravatar image uthinu  ( 2018-09-05 08:43:22 -0600 )edit

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).

Dirk Thomas gravatar image Dirk Thomas  ( 2018-09-05 10:23:27 -0600 )edit

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.

uthinu gravatar image uthinu  ( 2018-09-05 10:53:27 -0600 )edit

You can process packages sequentially with --executor sequential and debug / report one problem at at time.

Dirk Thomas gravatar image Dirk Thomas  ( 2018-09-05 11:12:29 -0600 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2018-09-06 05:19:16 -0600

uthinu gravatar image

The solution which worked for me is here.

edit flag offensive delete link more
0

answered 2018-09-17 20:16:03 -0600

jacobperron gravatar image

updated 2018-09-17 20:16:56 -0600

I've experienced this error; running 16.04. Seems related to a binary Ardent installation.

Steps to reproduce with the latest Bouncy release repos in a workspace:

source /opt/ros/ardent/setup.bash
colcon build --symlink-install --packages-up-to ament_index_cpp

Output:

--- stderr: ament_index_cpp                            
CMake Error: INSTALL(EXPORT) given unknown export "HAS_LIBRARY_TARGET"
---
Failed   <<< ament_index_cpp    [ Exited with code 1 ]

Running the same build command again (without remove build/ and install/) succeeds. Not sure why.

In any case, as long as Ardent isn't sourced then there should be no issue.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-09-04 09:39:59 -0600

Seen: 1,226 times

Last updated: Sep 17 '18