_install TARGETS given no LIBRARY DESTINATION for shared library target simExtROS2Interface

Report crashes, strange behaviour, or apparent bugs
Post Reply
Filipe Rocha
Posts: 14
Joined: 28 May 2017, 20:51

_install TARGETS given no LIBRARY DESTINATION for shared library target simExtROS2Interface

Post by Filipe Rocha »

Hi everyone.

I am trying to compile the ROS2 interface .so in ROS2 Dashing on Ubuntu 18.04. By just following the steps on the Github repo (https://github.com/CoppeliaRobotics/simExtROS2Interface) I get the following error:

Code: Select all

> colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DLIBPLUGIN_DIR=$COPPELIASIM_ROOT_DIR/programming/libPlugin
Starting >>> sim_ros2_interface
--- stderr: sim_ros2_interface                         
CMake Error at /opt/ros/dashing/share/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_targets.cmake:50 (_install):
  _install TARGETS given no LIBRARY DESTINATION for shared library target
  "simExtROS2Interface".
Call Stack (most recent call first):
  /opt/ros/dashing/share/ament_cmake_core/cmake/symlink_install/install.cmake:37 (ament_cmake_symlink_install_targets)
  CMakeLists.txt:128 (install)


---
Failed   <<< sim_ros2_interface	[ Exited with code 1 ]

Summary: 0 packages finished [1.50s]
  1 package failed: sim_ros2_interface
  1 package had stderr output: sim_ros2_interface

I think I made a workaround by adding

Code: Select all

set(LIBPLUGIN_DIR ${COPPELIASIM_ROOT_DIR}/programming/libPlugin)
to the <ros2_ws>/src/sim_ros2_interface/CMakeLists.txt . Well, I think because the error has changed after that hahaha:

Code: Select all

> colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DLIBPLUGIN_DIR=$COPPELIASIM_ROOT_DIR/programming/libPlugin
Starting >>> sim_ros2_interface
--- stderr: sim_ros2_interface                         
CMake Error at CMakeLists.txt:56 (find_package):
  By not providing "FindCoppeliaSim.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "CoppeliaSim", but CMake did not find one.

  Could not find a package configuration file provided by "CoppeliaSim"
  (requested version 4.0.0.0) with any of the following names:

    CoppeliaSimConfig.cmake
    coppeliasim-config.cmake

  Add the installation prefix of "CoppeliaSim" to CMAKE_PREFIX_PATH or set
  "CoppeliaSim_DIR" to a directory containing one of the above files.  If
  "CoppeliaSim" provides a separate development package or SDK, be sure it
  has been installed.


---
Failed   <<< sim_ros2_interface	[ Exited with code 1 ]

Summary: 0 packages finished [0.69s]
  1 package failed: sim_ros2_interface
  1 package had stderr output: sim_ros2_interface
After that, I have added the redundant

Code: Select all

set(CoppeliaSim_DIR ${COPPELIASIM_ROOT_DIR})
to CMakeLists.txt... nothing have changed. I have also searched for the CoppeliaSimConfig.cmake and coppeliasim-config.cmake files on my computer, but did not found them.

I am not an expert on CMake, so this hard time has been a good time to study some concepts. hahaha
I kindly appreciate any suggestions on how to manage that. :)

Best regards.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Failing on building ROS2 interface on Ubuntu 18.04

Post by fferri »

You don't need to change CMakeLists.txt or other files.

Make sure the value of $COPPELIASIM_ROOT_DIR is correct.

Filipe Rocha
Posts: 14
Joined: 28 May 2017, 20:51

Re: Failing on building ROS2 interface on Ubuntu 18.04

Post by Filipe Rocha »

Thank you for the quick response.
I see there is no need for modifying CMakeLists. I am probably doing something wrong on my own.

Starting from the beginning for a re-check purpose, I have just downloaded CoppeliaSim 4.0.0. (rev4) and cloned to `<ros2_ws>/src` the ROS2 interface using

Code: Select all

git clone --recursive https://github.com/CoppeliaRobotics/simExtROS2Interface.git sim_ros2_interface
(Additionally, the github repo indicates a "libPlugin's README" link, which is broken.)

The $COPPELIASIM_ROOT_DIR var is set to

Code: Select all

> echo $COPPELIASIM_ROOT_DIR
/home/filipe/bin/coppelia
which is correctly my CoppeliaSim folder.

Now, when I run the compilation command suggested on the github repo i get:

Code: Select all

> colcon build --symlink-install
Starting >>> sim_ros2_interface
--- stderr: sim_ros2_interface                         
CMake Error at /opt/ros/dashing/share/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_targets.cmake:50 (_install):
  _install TARGETS given no LIBRARY DESTINATION for shared library target
  "simExtROS2Interface".
Call Stack (most recent call first):
  /opt/ros/dashing/share/ament_cmake_core/cmake/symlink_install/install.cmake:37 (ament_cmake_symlink_install_targets)
  CMakeLists.txt:124 (install)


---
Failed   <<< sim_ros2_interface	[ Exited with code 1 ]

Summary: 0 packages finished [1.45s]
  1 package failed: sim_ros2_interface
  1 package had stderr output: sim_ros2_interface

Changing the compilation command to the one suggested in the official CoppeliaSim website:

Code: Select all

> colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DLIBPLUGIN_DIR=$COPPELIASIM_ROOT_DIR/programming/libPlugin
Starting >>> sim_ros2_interface
--- stderr: sim_ros2_interface                         
CMake Error at /opt/ros/dashing/share/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_targets.cmake:50 (_install):
  _install TARGETS given no LIBRARY DESTINATION for shared library target
  "simExtROS2Interface".
Call Stack (most recent call first):
  /opt/ros/dashing/share/ament_cmake_core/cmake/symlink_install/install.cmake:37 (ament_cmake_symlink_install_targets)
  CMakeLists.txt:124 (install)


---
Failed   <<< sim_ros2_interface	[ Exited with code 1 ]

Summary: 0 packages finished [1.44s]
  1 package failed: sim_ros2_interface
  1 package had stderr output: sim_ros2_interface
I understand the additional parameters on the second compilation command is precisely for setting the lib folder. Still, my colcon presents a related error.

Thank you in advance for any tips on how to solve this. :)

Best regards.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Failing on building ROS2 interface on Ubuntu 18.04

Post by fferri »

Oh. I think that error is coming from here:

Code: Select all

#cmake
# sim_ros2_interface/CMakeLists.txt
install(
    TARGETS simExtROS2Interface
    EXPORT export_${PROJECT_NAME}
    ARCHIVE DESTINATION lib
    LIBRARY DESTINATION ${COPPELIASIM_PLUGINS_DIR}
    RUNTIME DESTINATION bin
)

You need to pull the latest version of libPlugin to have the ${COPPELIASIM_PLUGINS_DIR} variable properly set.

This issue will be fixed once the next release of CoppeliaSim will include also the latest version of libPlugin.

However it is a good habit to have all the CoppeliaSim libraries (include, common, libPlugin, simMath, etc...) to the latest version when building plugins from git.

whajoost
Posts: 1
Joined: 15 Oct 2020, 15:25

Re: _install TARGETS given no LIBRARY DESTINATION for shared library target simExtROS2Interface

Post by whajoost »

Hi, I have a question about the libPlugin.

Whenever I try to compile the plugin i get the error that the CoppeliaSimConfig.cmake cannot be found. I think it has to do with the fact that the set(LIBPLUGIN_DIR $ENV{COPPELIASIM_ROOT_DIR}/programming/libPlugin) described in line 43 of the cMakeLists.txt cannot be found. I tried to look for the folder but there is no /programming directory in my coppeliasim folder. Can you please help me? I have CoppeliaSim v4.1.0 on ubuntu 20.04 and want to change the plugin since i need to add extra message types to the meta/interfaces.txt file.

Post Reply