Undefined references to boost
Hi, i tried to compile OTB from 8.1.2 tag and from develop branch on Ubuntu 22.04, but i've always this cmake error:
/usr/bin/ld: CMakeFiles/OTBMetadata.dir/otbTerraSarXSarImageMetadataInterface.cxx.o: in function otb::ExtractXMLFiles::GetXMLFilesInDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) [clone .localalias]': otbTerraSarXSarImageMetadataInterface.cxx:(.text+0x29ec): undefined reference to boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, unsigned int, boost::filesystem::detail::directory_iterator_params*, boost::system::error_code*)' /usr/bin/ld: otbTerraSarXSarImageMetadataInterface.cxx:(.text+0x2ade): undefined reference to `boost::filesystem::detail::path_algorithms::extension_v3(boost::filesystem::path const&)' /usr/bin/ld: CMakeFiles/OTBMetadata.dir/otbTerraSarXSarImageMetadataInterface.cxx.o: in function `otb::ExtractXMLFiles::GetResourceFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)': otbTerraSarXSarImageMetadataInterface.cxx:(.text+0x308e): undefined reference to `boost::filesystem::detail::path_algorithms::filename_v3(boost::filesystem::path const&)' /usr/bin/ld: CMakeFiles/OTBMetadata.dir/otbTerraSarXSarImageMetadataInterface.cxx.o: in function `boost::iterator_range_detail::iterator_range_base<boost::filesystem::directory_iterator, boost::iterators::incrementable_traversal_tag>::~iterator_range_base()': otbTerraSarXSarImageMetadataInterface.cxx:(.text._ZN5boost21iterator_range_detail19iterator_range_baseINS_10filesystem18directory_iteratorENS_9iterators27incrementable_traversal_tagEED2Ev[_ZN5boost21iterator_range_detail19iterator_range_baseINS_10filesystem18directory_iteratorENS_9iterators27incrementable_traversal_tagEED5Ev]+0x30): undefined reference to `boost::filesystem::detail::dir_itr_imp::~dir_itr_imp()' /usr/bin/ld: otbTerraSarXSarImageMetadataInterface.cxx:(.text._ZN5boost21iterator_range_detail19iterator_range_baseINS_10filesystem18directory_iteratorENS_9iterators27incrementable_traversal_tagEED2Ev[_ZN5boost21iterator_range_detail19iterator_range_baseINS_10filesystem18directory_iteratorENS_9iterators27incrementable_traversal_tagEED5Ev]+0x54): undefined reference to `boost::filesystem::detail::dir_itr_imp::~dir_itr_imp()' /usr/bin/ld: otbTerraSarXSarImageMetadataInterface.cxx:(.text._ZN5boost21iterator_range_detail19iterator_range_baseINS_10filesystem18directory_iteratorENS_9iterators27incrementable_traversal_tagEED2Ev[_ZN5boost21iterator_range_detail19iterator_range_baseINS_10filesystem18directory_iteratorENS_9iterators27incrementable_traversal_tagEED5Ev]+0x5c): undefined reference to `boost::filesystem::detail::dir_itr_imp::operator delete(void*)' /usr/bin/ld: otbTerraSarXSarImageMetadataInterface.cxx:(.text._ZN5boost21iterator_range_detail19iterator_range_baseINS_10filesystem18directory_iteratorENS_9iterators27incrementable_traversal_tagEED2Ev[_ZN5boost21iterator_range_detail19iterator_range_baseINS_10filesystem18directory_iteratorENS_9iterators27incrementable_traversal_tagEED5Ev]+0x3e): undefined reference to `boost::filesystem::detail::dir_itr_imp::operator delete(void*)' /usr/bin/ld: CMakeFiles/OTBMetadata.dir/otbTerraSarXSarImageMetadataInterface.cxx.o: in function `void boost::sp_adl_block::intrusive_ptr_release<boost::filesystem::detail::dir_itr_imp, boost::sp_adl_block::thread_safe_counter>(boost::sp_adl_block::intrusive_ref_counter<boost::filesystem::detail::dir_itr_imp, boost::sp_adl_block::thread_safe_counter> const*)': otbTerraSarXSarImageMetadataInterface.cxx:(.text._ZN5boost12sp_adl_block21intrusive_ptr_releaseINS_10filesystem6detail11dir_itr_impENS0_19thread_safe_counterEEEvPKNS0_21intrusive_ref_counterIT_T0_EE[_ZN5boost12sp_adl_block21intrusive_ptr_releaseINS_10filesystem6detail11dir_itr_impENS0_19thread_safe_counterEEEvPKNS0_21intrusive_ref_counterIT_T0_EE]+0x25): undefined reference to `boost::filesystem::detail::dir_itr_imp::~dir_itr_imp()' /usr/bin/ld: otbTerraSarXSarImageMetadataInterface.cxx:(.text._ZN5boost12sp_adl_block21intrusive_ptr_releaseINS_10filesystem6detail11dir_itr_impENS0_19thread_safe_counterEEEvPKNS0_21intrusive_ref_counterIT_T0_EE[_ZN5boost12sp_adl_block21intrusive_ptr_releaseINS_10filesystem6detail11dir_itr_impENS0_19thread_safe_counterEEEvPKNS0_21intrusive_ref_counterIT_T0_EE]+0x2e): undefined reference to `boost::filesystem::detail::dir_itr_imp::operator delete(void*)' /usr/bin/ld: CMakeFiles/OTBMetadata.dir/otbRadarsat2ImageMetadataInterface.cxx.o: in function `otb::Radarsat2ImageMetadataInterface::CreateCalibrationLookupData(otb::SARCalib&, otb::ImageMetadata const&, otb::MetadataSupplierInterface const&, bool) const': otbRadarsat2ImageMetadataInterface.cxx:(.text+0x29e6): undefined reference to `boost::filesystem::detail::path_algorithms::remove_filename_v3(boost::filesystem::path&)' /usr/bin/ld: otbRadarsat2ImageMetadataInterface.cxx:(.text+0x29f9): undefined reference to `boost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const*, char const*)' /usr/bin/ld: otbRadarsat2ImageMetadataInterface.cxx:(.text+0x2b21): undefined reference to `boost::filesystem::detail::path_algorithms::remove_filename_v3(boost::filesystem::path&)' /usr/bin/ld: otbRadarsat2ImageMetadataInterface.cxx:(.text+0x2b34): undefined reference to `boost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const*, char const*)' /usr/bin/ld: otbRadarsat2ImageMetadataInterface.cxx:(.text+0x2cd5): undefined reference to `boost::filesystem::detail::path_algorithms::remove_filename_v3(boost::filesystem::path&)' /usr/bin/ld: otbRadarsat2ImageMetadataInterface.cxx:(.text+0x2ce8): undefined reference to `boost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const*, char const*)' /usr/bin/ld: CMakeFiles/OTBMetadata.dir/otbRadarsat2ImageMetadataInterface.cxx.o: in function `otb::Radarsat2ImageMetadataInterface::ParseGeom(otb::ImageMetadata&)': otbRadarsat2ImageMetadataInterface.cxx:(.text+0x51c0): undefined reference to `boost::filesystem::detail::path_algorithms::remove_filename_v3(boost::filesystem::path&)' /usr/bin/ld: otbRadarsat2ImageMetadataInterface.cxx:(.text+0x51d6): undefined reference to `boost::filesystem::detail::path_algorithms::append_v3(boost::filesystem::path&, char const*, char const*)' /usr/bin/ld: otbRadarsat2ImageMetadataInterface.cxx:(.text+0x5201): undefined reference to `boost::filesystem::detail::path_algorithms::remove_filename_v3(boost::filesystem::path&)' /usr/bin/ld: otbRadarsat2ImageMetadataInterface.cxx:(.text+0x5210): 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]: *** [Modules/Core/Metadata/src/CMakeFiles/OTBMetadata.dir/build.make:837: lib/libOTBMetadata-8.1.so.1] Errore 1 make[1]: *** [CMakeFiles/Makefile2:4991: Modules/Core/Metadata/src/CMakeFiles/OTBMetadata.dir/all] Errore 2 make: *** [Makefile:136: all] Errore 2
What could it be?