catkin_make for pcl exits with make -j8 -l8 failed

asked 2021-04-19 10:03:30 -0600

lidiaxp gravatar image

updated 2021-04-19 10:30:40 -0600

I install this package: https://github.com/Benzarti-Ilyess/pc... and tested in another computer with ros noetic. The program worked. But when I tried run on my computer appear this error:

/usr/bin/ld: CMakeFiles/pcl_sample_visualizer_voxel.dir/src/pcl_sample_visualizer2.cpp.o: in function `bool pcl::visualization::PCLVisualizer::addPointCloud<pcl::PointXYZ>(pcl::PointCloud<pcl::PointXYZ>::ConstPtr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
pcl_sample_visualizer2.cpp:(.text._ZN3pcl13visualization13PCLVisualizer13addPointCloudINS_8PointXYZEEEbRKNS_10PointCloudIT_E8ConstPtrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi[_ZN3pcl13visualization13PCLVisualizer13addPointCloudINS_8PointXYZEEEbRKNS_10PointCloudIT_E8ConstPtrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi]+0x3a): undefined reference to `pcl::visualization::PointCloudGeometryHandlerXYZ<pcl::PointXYZ>::PointCloudGeometryHandlerXYZ(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&)'
/usr/bin/ld: CMakeFiles/pcl_sample_visualizer_voxel.dir/src/pcl_sample_visualizer2.cpp.o: in function `bool pcl::visualization::PCLVisualizer::fromHandlersToScreen<pcl::PointXYZ>(pcl::visualization::PointCloudGeometryHandler<pcl::PointXYZ> const&, pcl::visualization::PointCloudColorHandler<pcl::PointXYZ> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&)':
pcl_sample_visualizer2.cpp:(.text._ZN3pcl13visualization13PCLVisualizer20fromHandlersToScreenINS_8PointXYZEEEbRKNS0_25PointCloudGeometryHandlerIT_EERKNS0_22PointCloudColorHandlerIS5_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiRKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNSL_10QuaternionIfLi0EEE[_ZN3pcl13visualization13PCLVisualizer20fromHandlersToScreenINS_8PointXYZEEEbRKNS0_25PointCloudGeometryHandlerIT_EERKNS0_22PointCloudColorHandlerIS5_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiRKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNSL_10QuaternionIfLi0EEE]+0x257): undefined reference to `pcl::visualization::PCLVisualizer::createActorFromVTKDataSet(vtkSmartPointer<vtkDataSet> const&, vtkSmartPointer<vtkLODActor>&, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [pcl_manipulation/CMakeFiles/pcl_sample_visualizer_voxel.dir/build.make:409: /home/lidiaxp/workspace/devel/lib/pcl_manipulation/pcl_sample_visualizer_voxel] Error 1
make[1]: *** [CMakeFiles/Makefile2:5814: pcl_manipulation/CMakeFiles/pcl_sample_visualizer_voxel.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: CMakeFiles/pcl_sample_visual.dir/src/pcl_sample_visual.cpp.o: in function `cloudHandler::cloud_sub(sensor_msgs::PointCloud2_<std::allocator<void> > const&)':
pcl_sample_visual.cpp:(.text._ZN12cloudHandler9cloud_subERKN11sensor_msgs12PointCloud2_ISaIvEEE[_ZN12cloudHandler9cloud_subERKN11sensor_msgs12PointCloud2_ISaIvEEE]+0xd6): undefined reference to `pcl::visualization::CloudViewer::showCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [pcl_manipulation/CMakeFiles/pcl_sample_visual.dir/build.make:409: /home/lidiaxp/workspace/devel/lib/pcl_manipulation/pcl_sample_visual] Error 1
make[1]: *** [CMakeFiles/Makefile2:5868: pcl_manipulation/CMakeFiles/pcl_sample_visual.dir/all] Error 2
/usr/bin/ld: CMakeFiles/pcl_sample_visualizer.dir/src/pcl_sample_visualizer.cpp.o: in function `bool pcl::visualization::PCLVisualizer::addPointCloud<pcl::PointXYZ>(pcl::PointCloud<pcl::PointXYZ>::ConstPtr const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
pcl_sample_visualizer.cpp:(.text._ZN3pcl13visualization13PCLVisualizer13addPointCloudINS_8PointXYZEEEbRKNS_10PointCloudIT_E8ConstPtrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi[_ZN3pcl13visualization13PCLVisualizer13addPointCloudINS_8PointXYZEEEbRKNS_10PointCloudIT_E8ConstPtrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi]+0x3a): undefined reference to `pcl::visualization::PointCloudGeometryHandlerXYZ<pcl::PointXYZ>::PointCloudGeometryHandlerXYZ(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&)'
/usr/bin/ld: CMakeFiles/pcl_sample_visualizer.dir/src/pcl_sample_visualizer.cpp.o: in function `bool pcl::visualization::PCLVisualizer::fromHandlersToScreen<pcl::PointXYZ>(pcl::visualization::PointCloudGeometryHandler<pcl::PointXYZ> const&, pcl::visualization::PointCloudColorHandler<pcl::PointXYZ> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&)':
pcl_sample_visualizer.cpp:(.text._ZN3pcl13visualization13PCLVisualizer20fromHandlersToScreenINS_8PointXYZEEEbRKNS0_25PointCloudGeometryHandlerIT_EERKNS0_22PointCloudColorHandlerIS5_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiRKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNSL_10QuaternionIfLi0EEE[_ZN3pcl13visualization13PCLVisualizer20fromHandlersToScreenINS_8PointXYZEEEbRKNS0_25PointCloudGeometryHandlerIT_EERKNS0_22PointCloudColorHandlerIS5_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiRKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNSL_10QuaternionIfLi0EEE]+0x257): undefined reference to `pcl::visualization::PCLVisualizer::createActorFromVTKDataSet(vtkSmartPointer<vtkDataSet> const&, vtkSmartPointer<vtkLODActor>&, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [pcl_manipulation/CMakeFiles/pcl_sample_visualizer.dir/build.make:409: /home/lidiaxp/workspace/devel/lib/pcl_manipulation/pcl_sample_visualizer] Error 1
make[1]: *** [CMakeFiles/Makefile2:5895: pcl_manipulation/CMakeFiles/pcl_sample_visualizer.dir/all] Error 2
/usr/bin/ld: CMakeFiles/pcl_sample_voxel_grid.dir/src/pcl_sample_voxel_grid.cpp.o: in function `cloud_voxel::voxel_handler(sensor_msgs::PointCloud2_<std::allocator<void> > const&)':
pcl_sample_voxel_grid.cpp:(.text+0x489): undefined reference to `pcl::PCLBase<pcl::PointXYZ>::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&)'
/usr/bin/ld: CMakeFiles/pcl_sample_voxel_grid.dir/src/pcl_sample_voxel_grid.cpp.o:(.data.rel.ro._ZTVN3pcl9VoxelGridINS_8PointXYZEEE[_ZTVN3pcl9VoxelGridINS_8PointXYZEEE]+0x20): undefined reference to `pcl::PCLBase<pcl::PointXYZ>::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const& ...
(more)
edit retag flag offensive close merge delete

Comments

Please edit your question to reformat it:

  1. click the edit button/link under your current question text (scroll all the way to the right on this page to see it)
  2. remove the error message you have there now
  3. copy-paste the error message again from your terminal into your question
  4. select all text part of the error message
  5. press the Preformatted Text button (the one with 101010 on it), or use ctrl+k

now save your question.

The layout should now be fixed.

gvdhoorn gravatar image gvdhoorn  ( 2021-04-19 10:12:45 -0600 )edit

thx, I adjusted the text

lidiaxp gravatar image lidiaxp  ( 2021-04-19 10:31:10 -0600 )edit