Ask Your Question

Problem using PCL 1.8 with ROS Indigo

asked 2016-02-12 05:29:53 -0600

Caba gravatar image

Hi all,

I am trying to compile a package based on the lccp_segmentation algorithm available in the pcl-trunk. The compilation and installation of the pcl-trunk were fine since I have the same version of the package in a simple .cpp file (not in ROS), and I can compile everything with no problems. But when I try to compile my ROS package it seems to be a conflict between PCL 1.7 and 1.8, since the output in the terminal is something like:

link library [] in /usr/lib may be hidden by files in:  /usr/local/lib

Which I guess it yields to the following error:

*** No rule to make target `/usr/lib/', needed by `/home/nicola/ros_ws/master_thesis/devel/lib/segmentation_lccp/segmentationLCCP'

My setup is: - Ubuntu 14.04.3 LTS - Ros indigo - PCL (1.7 and 1.8 are both installed)

I have just a very basic knowledge about the linking stuff and cmake, I also surfed a lot in the internet but none had my same problem. I hope to have gave you enough information, below there are the outputs of the catkin_make and cmake commands of the above commented source codes.

Thanks in advance,

Here the output of the catkin_make command:

catkin_make --only-pkg-with-deps segmentation_lccp
Base path: /home/nicola/ros_ws/master_thesis
Source space: /home/nicola/ros_ws/master_thesis/src
Build space: /home/nicola/ros_ws/master_thesis/build
Devel space: /home/nicola/ros_ws/master_thesis/devel
Install space: /home/nicola/ros_ws/master_thesis/install
Whitelisted packages: segmentation_lccp
#### Running command: "make cmake_check_build_system" in "/home/nicola/ros_ws/master_thesis/build"
-- Using CATKIN_DEVEL_PREFIX: /home/nicola/ros_ws/master_thesis/devel
-- Using CMAKE_PREFIX_PATH: /home/nicola/ros_ws/master_thesis/devel;/opt/ros/indigo
-- This workspace overlays: /home/nicola/ros_ws/master_thesis/devel;/opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/nicola/ros_ws/master_thesis/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests
-- catkin 0.6.16
-- Using CATKIN_WHITELIST_PACKAGES: segmentation_lccp
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - segmentation_lccp
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'segmentation_lccp'
-- ==> add_subdirectory(grasping_novel_objects/segmentation_lccp)
-- Using these message generators: gencpp;genlisp;genpy
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   iostreams
--   serialization
-- checking for module 'libopenni2'
--   package 'libopenni2' not found
-- Could NOT find OpenNI2 (missing:  OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS) 
** WARNING ** io features related to openni2 will be disabled
-- Could NOT find ensenso (missing:  ENSENSO_LIBRARY ENSENSO_INCLUDE_DIR) 
** WARNING ** io features related to ensenso will be disabled
** WARNING ** io features related to davidSDK will be disabled
-- Could NOT find DSSDK (missing:  _DSSDK_LIBRARIES) 
** WARNING ** io features related to dssdk will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** io features related to libusb-1.0 will be disabled
-- checking for module 'libopenni2'
--   package 'libopenni2' not found
-- Could NOT find OpenNI2 (missing:  OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS) 
** WARNING ** visualization features related to openni2 will be ...
edit retag flag offensive close merge delete


I'm getting the same problem, except I compiled pcl 1.8 from source and make install'd it. I tried uninstalling pcl 1.7 completely sudo apt-get uninstall libpcl-1.7-all and sudo apt-get uninstall libpcl-1.7-all-dev but then I get errors because I have no pcl_ros nor pcl_conversions...

buckley.toby gravatar imagebuckley.toby ( 2017-09-30 14:48:18 -0600 )edit

I managed to make it work with both 1.7 and 1.8 libraries installed. However I guess that you can simply installed that ros packages you deleted and that's all: sudo apt-get install ros-indigo-pcl*

Caba gravatar imageCaba ( 2017-10-01 04:27:00 -0600 )edit

If it may helps here there is a simple C++ library based on PCL 1.8 and here the ROS pkg that uses it.

Caba gravatar imageCaba ( 2017-10-01 04:28:48 -0600 )edit

got it to work by switching the order I call dependencies in my CMakelists.txt, basically I had to look at pcl BEFORE pcl_ros, that way it found the correct pcl 1.8 libraries

buckley.toby gravatar imagebuckley.toby ( 2017-10-08 21:59:47 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-15 05:48:34 -0600

Caba gravatar image

I just resolved it by removing the Cmake Cache, then it compiled correctly.

Although I still don't understand why it was not working fine the first time.

edit flag offensive delete link more


I need to do something similar. I followed some of your lead about how to set up the CMakeLists.txt. But I end up with lots of warnings like CMake Warning at CMakeLists.txt:149 (add_executable): Cannot generate a safe linker search path for target <snip>

NStiurca gravatar imageNStiurca ( 2016-07-08 08:31:46 -0600 )edit

And lots of repetitions similar to link library [] in /usr/lib may be hidden by files in: /usr/local/lib

NStiurca gravatar imageNStiurca ( 2016-07-08 08:32:10 -0600 )edit

Did you remove everything in the "build" folder of the workspace and then recompiled all the packages you have? That is what I did, I m sorry but I have just a very basic knowledge of cmake and I actually do not know why deleting the cache and recompiling everything works, but it works.

Caba gravatar imageCaba ( 2016-07-08 16:02:20 -0600 )edit

Otherwise create a new workspace and try compiling there your package, I am pretty sure it is not problem of the CMakeLists.txt file. More than this I cannot help, sorry.

Caba gravatar imageCaba ( 2016-07-08 16:05:56 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-02-12 05:29:53 -0600

Seen: 3,457 times

Last updated: Feb 15 '16