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

Install Indigo on Ubuntu 16.04 from source: can't build pcl_ros

asked 2016-09-17 14:24:13 -0600

Baichuan gravatar image

updated 2016-09-17 15:00:52 -0600

gvdhoorn gravatar image

As Indigo does not support debian packages for Ubuntu 16.04, I'm trying to build it from source following http://wiki.ros.org/indigo/Installati... Everything goes well until I'm trying to build the catkin workspace. I can't build the pcl_ros package. The log is shown as below:

[ 25%] Built target geometry_msgs_generate_messages_lisp
[ 25%] Built target tf_generate_messages_lisp
/usr/bin/ld: cannot find -lvtkproj4
collect2: error: ld returned 1 exit status
CMakeFiles/convert_pointcloud_to_image.dir/build.make:443: recipe for target '/home/ziri/catkin_ws/devel_isolated/pcl_ros/lib/pcl_ros/convert_pointcloud_to_image' failed
[ 25%] Built target nodelet_generate_messages_py
make[2]: *** [/home/ziri/catkin_ws/devel_isolated/pcl_ros/lib/pcl_ros/convert_pointcloud_to_image] Error 1
CMakeFiles/Makefile2:178: recipe for target 'CMakeFiles/convert_pointcloud_to_image.dir/all' failed
make[1]: *** [CMakeFiles/convert_pointcloud_to_image.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 25%] Built target roscpp_generate_messages_cpp
[ 25%] Built target actionlib_msgs_generate_messages_py
/usr/bin/ld: cannot find -lvtkproj4
collect2: error: ld returned 1 exit status
CMakeFiles/pcd_to_pointcloud.dir/build.make:443: recipe for target '/home/ziri/catkin_ws/devel_isolated/pcl_ros/lib/pcl_ros/pcd_to_pointcloud' failed
make[2]: *** [/home/ziri/catkin_ws/devel_isolated/pcl_ros/lib/pcl_ros/pcd_to_pointcloud] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/pcd_to_pointcloud.dir/all' failed
make[1]: *** [CMakeFiles/pcd_to_pointcloud.dir/all] Error 2
[ 25%] Built target nodelet_topic_tools_gencfg
/usr/bin/ld: cannot find -lvtkproj4
collect2: error: ld returned 1 exit status
CMakeFiles/pointcloud_to_pcd.dir/build.make:443: recipe for target '/home/ziri/catkin_ws/devel_isolated/pcl_ros/lib/pcl_ros/pointcloud_to_pcd' failed
make[2]: *** [/home/ziri/catkin_ws/devel_isolated/pcl_ros/lib/pcl_ros/pointcloud_to_pcd] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pointcloud_to_pcd.dir/all' failed
make[1]: *** [CMakeFiles/pointcloud_to_pcd.dir/all] Error 2
[ 25%] Built target pcl_msgs_generate_messages_py
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

It seems to be related with -lvtkproj4, so I've tried to install vtk, but nothing changes after that. There are some related issues posted: https://github.com/PointCloudLibrary/... https://bugs.debian.org/cgi-bin/bugre... Someone say it is due to the bug of vtk6.

Anyone can help me? Much appreciation!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-07-09 13:26:35 -0600

onasafari gravatar image

I ran into this same issue. I used apt-get to install libpcl-dev, libvtk6.2 and libproj-dev. Then, I followed the hacky symbolic linking trick mentioned here: https://askubuntu.com/questions/97914... and was able to compile the package. The code for creating the symbolic link is shown below:

ln -s /usr/lib/x86_64-linux-gnu/libvtkCommonCore-6.2.so /usr/lib/libvtkproj4.so

If/when this doesn't work during runtime, I plan to build the pcl_ros without using rosinstall, but directly from source. You can augment the CMakeLists.txt to not use any of vtk packages as shown on the ros-perception github.

edit flag offensive delete link more

Comments

similar issue, this solved it! Also need to :

ln -s /usr/lib/libvtkproj4.so /usr/lib/x86_64-linux-gnu/libvtkproj4-6.2.so.6.2.0

From: https://answers.ros.org/question/3668...

aureliokta gravatar image aureliokta  ( 2021-01-09 14:41:24 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-09-17 14:24:13 -0600

Seen: 794 times

Last updated: Sep 17 '16