I updated Ubuntu version from 14.04 lts to 16.04 lts and got problems when building projects that utilizes point cloud library. (It used to work well on Ubuntu 14.04 and I build my projects with qtcreator)
The warning messages I have are :
warning: libboost_system.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_common.so, may conflict with libboost_system.so.1.58.0
warning: libboost_thread.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_common.so, may conflict with libboost_thread.so.1.58.0
warning: libboost_filesystem.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so, may conflict with libboost_filesystem.so.1.58.0
warning: libboost_iostreams.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so, may conflict with libboost_iostreams.so.1.58.0
warning: libboost_chrono.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so, may conflict with libboost_chrono.so.1.58.0
and the errors are :
~/main.cpp:-1: error: undefined reference to `pcl::visualization::PCLVisualizer::PCLVisualizer(std::__cxx11::basic_string, std::allocator > const&, bool)'
~/main.cpp:-1: error: undefined reference to `pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties(int, double, std::__cxx11::basic_string, std::allocator > const&, int)'
~/main.cpp:-1: error: undefined reference to `pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties(int, double, std::__cxx11::basic_string, std::allocator > const&, int)'
~/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1: In function `pcl::search::OrganizedNeighbor::OrganizedNeighbor(bool, float, unsigned int)':
~/main.cpp:-1: error: undefined reference to `pcl::search::Search::Search(std::__cxx11::basic_string, std::allocator > const&, bool)'
~/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1: In function `pcl::search::OrganizedNeighbor::OrganizedNeighbor(bool, float, unsigned int)':
~/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1: In function `pcl::search::OrganizedNeighbor::OrganizedNeighbor(bool, float, unsigned int)':
I can see there's conflict between libboost_system.so.1.54.0
and libboost_system.so.1.58.0
but how can I solve it?
Maybe you should download this file PCL-1.8-linux.deb,
And run this code:
For building pcl from source on 16.04, please follow this tutorial. But there is then no reason to not build PCL 1.8 instead of 1.7.x, as it is downward compatible.
In addition the Jochen Sprieckerhof repository for 1.7.2 is outdated for 1.7.2, as in Ubuntu 16.04 there is a native repository. You can simply do
I recommend a clean un- and reinstall in one of the proposed ways.