Closed KarthiAru closed 6 months ago
Note: I updated the boost version to 1.81.0 in /pcl/cmake/pcl_find_boost.cmake file in the find_packages function.
That is not necessary. The 1.65.0 in the find_package is just the minimum Boost version. Since 1.81.0 is specified in the Boost_ADDITIONAL_VERSIONS
, PCL will accept it.
I found this issue, which describes a similar problem: https://github.com/PointCloudLibrary/pcl/issues/5834 Please have a look there. Note that VTK depends on Boost, and if you install VTK via apt, it will also install Boost via apt. Then you will have two Boost installations (one from source and one from apt), which can get messy, especially if they are different versions. If you really need to install Boost from source, I would recommend to first build and install Boost, then build and install VTK from source, and finally PCL.
Thanks @mvieth It looks like I had boost 1.74.0 installed via apt as a dependency for flann and vtk. These both are missing now after removing boost 1.74.0.
(base) pcl/build cmake -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Performing Test LIBATOMIC_NOT_NEEDED
-- Performing Test LIBATOMIC_NOT_NEEDED - Failed
-- Found ClangFormat: /usr/bin/clang-format-14 (found suitable version "14.0.0", minimum required is "14")
-- Adding target 'format'
-- Performing Test HAVE_MARCH
-- Performing Test HAVE_MARCH - Success
-- Performing Test HAVE_MM_MALLOC
-- Performing Test HAVE_MM_MALLOC - Success
-- Performing Test HAVE_POSIX_MEMALIGN
-- Performing Test HAVE_POSIX_MEMALIGN - Success
-- Performing Test HAVE_SSE4_2_EXTENSIONS
-- Performing Test HAVE_SSE4_2_EXTENSIONS - Success
-- Using CPU native flags for SSE optimization: -msse4.2 -mfpmath=sse -march=native
-- Performing Test HAVE_AVX2
-- Performing Test HAVE_AVX2 - Success
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5") found components: C CXX
-- Found OpenMP, spec date 201511
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Checking for module 'flann>=1.9.1'
-- No package 'flann' found
-- Could NOT find FLANN (missing: FLANN_LIBRARY FLANN_INCLUDE_DIR) (Required is at least version "1.9.1")
CMake Warning at CMakeLists.txt:330 (message):
Flann was not found, so many PCL modules will not be built!
-- Checking for module 'libusb-1.0'
-- Found libusb-1.0, version 1.0.25
-- Found libusb: /usr/lib/x86_64-linux-gnu/libusb-1.0.so
-- Found OpenNI: /usr/lib/libOpenNI.so;libusb::libusb (found version "1.5.4.0")
-- OpenNI found (version: 1.5.4.0, include: /usr/include/ni, lib: /usr/lib/libOpenNI.so;libusb::libusb)
-- Found OpenNI2: /usr/lib/x86_64-linux-gnu/libOpenNI2.so;libusb::libusb (found version "2.2.0.33")
-- OpenNI2 found (version: 2.2.0.33, include: /usr/include/openni2, lib: /usr/lib/x86_64-linux-gnu/libOpenNI2.so;libusb::libusb)
-- Could NOT find Ensenso (missing: ENSENSO_LIBRARIES ENSENSO_INCLUDE_DIRS)
-- IDS-Imaging Ensenso camera support: not building because Ensenso not found
-- Could NOT find davidSDK (missing: DAVIDSDK_LIBRARY DAVIDSDK_INCLUDE_DIR)
-- David Vision Systems SDK support: not building because davidSDK not found
-- Could NOT find DSSDK (missing: DSSDK_LIBRARIES DSSDK_INCLUDE_DIRS)
-- DepthSense SDK support: not building because DSSDK not found
-- Could NOT find RSSDK (missing: RSSDK_LIBRARIES RSSDK_INCLUDE_DIRS)
-- RealSense SDK support: not building because RSSDK not found
-- Could NOT find RSSDK2
-- RealSense SDK 2.0 (librealsense) support: not building because RSSDK2 not found
-- Checking for module 'metslib'
-- No package 'metslib' found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.37")
-- Found Qhull version 8.0.2
CMake Warning at cmake/pcl_find_vtk.cmake:31 (find_package):
By not providing "FindVTK.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "VTK", but
CMake did not find one.
Could not find a package configuration file provided by "VTK" with any of
the following names:
VTKConfig.cmake
vtk-config.cmake
Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
to a directory containing one of the above files. If "VTK" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:399 (include)
-- Qt version: 5.15.3
-- Found Pcap: /usr/lib/x86_64-linux-gnu/libpcap.so
-- Checking for module 'glut'
-- No package 'glut' found
-- Found Boost: /usr/lib/cmake/Boost-1.81.0/BoostConfig.cmake (found suitable version "1.81.0", minimum required is "1.65.0") found components: filesystem iostreams system
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found GLEW: /usr/include
-- DOXYGEN_FOUND
-- HTML_HELP_COMPILER
-- Found CPack generators: DEB
-- PCL build with following flags:
-- -Wabi=11 -Wall -Wextra -fno-strict-aliasing -msse4.2 -mfpmath=sse -march=native -mavx2 -fopenmp
-- The following subsystems will be built:
-- common
-- octree
-- geometry
-- io
-- ml
-- stereo
-- tools
-- The following subsystems will not be built:
-- kdtree: Requires external library flann.
-- search: Requires external library flann.
-- sample_consensus: Requires search.
-- filters: Requires kdtree.
-- 2d: Requires filters.
-- features: Requires 2d.
-- segmentation: Requires filters.
-- visualization: VTK was not found.
-- surface: Requires kdtree.
-- registration: Requires filters.
-- keypoints: Requires filters.
-- tracking: Requires filters.
-- recognition: Requires sample_consensus.
-- apps: Disabled by default
-- benchmarks: Disabled by default
-- outofcore: Disabled manually.
-- examples: Code examples are disabled by default.
-- people: Disabled manually.
-- simulation: Disabled by default.
-- global_tests: Disabled by default
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ka/Downloads/pcl/build
Confirming that I was able to successfully build and install pcl 1.14.0 after building and installing flann and vtk from source.
Describe the error I'm unable to build from source due to boost dependency errors. I've tried different boost versions like 1.74, 1.85, 1.83, etc. But the error persists. I've installed boost only from source and not via apt packages.
Please paste the compilation results/errors.
To Reproduce I had built Boost 1.81.0 from source. Rest all were installed from apt packages. Download the tar.gz file from the pcl releases and unzip it cd pcl mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release .. make -j2
Note: I updated the boost version to 1.81.0 in /pcl/cmake/pcl_find_boost.cmake file in the find_packages function.
Your Environment (please complete the following information):