ANYbotics / grid_map

Universal grid map library for mobile robotic mapping
BSD 3-Clause "New" or "Revised" License
2.6k stars 798 forks source link

Invoking "make -j16 -l16" failed when building the grid map #400

Open TangYanYee opened 1 year ago

TangYanYee commented 1 year ago

Currently we are using ros noetic on the ubuntu LTS 20 version. May anyone face the same problem and willing to share how to fix? Thanks for help!!

The error msg: [ 98%] Built target octomap_to_gridmap_demo /usr/bin/ld: CMakeFiles/normal_filter_comparison_demo.dir/src/normal_filter_comparison_node.cpp.o: in function pluginlib::ClassLoader<filters::FilterBase<grid_map::GridMap> >::getCatkinLibraryPaths[abi:cxx11]()': normal_filter_comparison_node.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE21getCatkinLibraryPathsB5cxx11Ev[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE21getCatkinLibraryPathsB5cxx11Ev]+0x296): undefined reference toboost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const, char const)' /usr/bin/ld: CMakeFiles/normal_filter_comparison_demo.dir/src/normal_filter_comparison_node.cpp.o: in function pluginlib::ClassLoader<filters::FilterBase<grid_map::GridMap> >::getPackageFromPluginXMLFilePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': normal_filter_comparison_node.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x89): undefined reference toboost::filesystem::detail::path_algorithms::find_parent_path_size(boost::filesystem::path const&)' /usr/bin/ld: normal_filter_comparison_node.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x10a): undefined reference to boost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const*, char const*)' /usr/bin/ld: normal_filter_comparison_node.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1ea): undefined reference toboost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const, char const)' /usr/bin/ld: normal_filter_comparison_node.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x294): undefined reference to boost::filesystem::detail::path_algorithms::filename_v3(boost::filesystem::path const&)' /usr/bin/ld: normal_filter_comparison_node.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x32f): undefined reference toboost::filesystem::detail::path_algorithms::find_parent_path_size(boost::filesystem::path const&)' /usr/bin/ld: normal_filter_comparison_node.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x524): undefined reference to boost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const*, char const*)' collect2: error: ld returned 1 exit status make[2]: *** [grid_map/grid_map_demos/CMakeFiles/normal_filter_comparison_demo.dir/build.make:356: /home/linuxlaitang/catkin_ws/devel/lib/grid_map_demos/normal_filter_comparison_demo] Error 1 make[1]: *** [CMakeFiles/Makefile2:5323: grid_map/grid_map_demos/CMakeFiles/normal_filter_comparison_demo.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... /usr/bin/ld: CMakeFiles/filters_demo.dir/src/FiltersDemo.cpp.o: in functionpluginlib::ClassLoader<filters::FilterBase >::getCatkinLibraryPaths[abi:cxx11]()': FiltersDemo.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE21getCatkinLibraryPathsB5cxx11Ev[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE21getCatkinLibraryPathsB5cxx11Ev]+0x296): undefined reference to boost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const*, char const*)' /usr/bin/ld: CMakeFiles/filters_demo.dir/src/FiltersDemo.cpp.o: in functionpluginlib::ClassLoader<filters::FilterBase >::getPackageFromPluginXMLFilePath(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': FiltersDemo.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x89): undefined reference to `boost::filesystem::detail::path_algorithms::find_parent_path_size(boost::filesystem::path const&)' /usr/bin/ld: FiltersDemo.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x10a): undefined reference to `boost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const, char const)' /usr/bin/ld: FiltersDemo.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1ea): undefined reference to `boost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const, char const)' /usr/bin/ld: FiltersDemo.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x294): undefined reference to `boost::filesystem::detail::path_algorithms::filename_v3(boost::filesystem::path const&)' /usr/bin/ld: FiltersDemo.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x32f): undefined reference to `boost::filesystem::detail::path_algorithms::find_parent_path_size(boost::filesystem::path const&)' /usr/bin/ld: FiltersDemo.cpp:(.text._ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN9pluginlib11ClassLoaderIN7filters10FilterBaseIN8grid_map7GridMapEEEE31getPackageFromPluginXMLFilePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x524): undefined reference to `boost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const, char const)' collect2: error: ld returned 1 exit status make[2]: [grid_map/grid_map_demos/CMakeFiles/filters_demo.dir/build.make:371: /home/linuxlaitang/catkin_ws/devel/lib/grid_map_demos/filters_demo] Error 1 make[1]: [CMakeFiles/Makefile2:5357: grid_map/grid_map_demos/CMakeFiles/filters_demo.dir/all] Error 2 make: *** [Makefile:149: all] Error 2 Invoking "make -j16 -l16" failed

Welcome666Hzz commented 11 months ago

Hello, I also encountered this problem, I solved it through the following steps:First uninstall the Boost library,(sudo rm -r -f /usr/local/include/boost sudo rm -f /usr/local/lib/libboost) and then compile catkin_make again. Then install the Boost1.70.0 library again and compile without error