PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
10.03k stars 4.62k forks source link

[compile error] undefined reference to boost::filesystem #6044

Closed KarthiAru closed 6 months ago

KarthiAru commented 6 months ago

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.

(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'
--   Found flann, version 1.9.1
-- Found FLANN: /usr/lib/x86_64-linux-gnu/libflann_cpp.so (Required is at least version "1.9.1") 
-- FLANN found (include: /usr/include, lib: /usr/lib/x86_64-linux-gnu/libflann_cpp.so)
-- 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
-- Found GLEW: /usr/lib/x86_64-linux-gnu/libGLEW.so  
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so  found components: OpenGL GLX 
-- Found Python3: /usr/bin/python3.10 (found suitable version "3.10.12", minimum required is "3.10") found components: Interpreter Development.Module Development.Embed 
-- Found MPI_C: /usr/lib/x86_64-linux-gnu/libmpi.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1") found components: C 
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libcrypto.so;/usr/lib/x86_64-linux-gnu/libcurl.so;/usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.a;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.7") found components: C HL 
-- Found NetCDF: /usr/include (found version "4.8.1") 
-- Found OGG: /usr/lib/x86_64-linux-gnu/libogg.so  
-- Found THEORA: /usr/lib/x86_64-linux-gnu/libtheora.so  
-- Found JsonCpp: /usr/lib/x86_64-linux-gnu/libjsoncpp.so (found suitable version "1.9.5", minimum required is "0.7.0") 
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.13") 
-- Found GL2PS: /usr/lib/x86_64-linux-gnu/libgl2ps.so (found suitable version "1.4.2", minimum required is "1.4.2") 
-- Found SQLite3: /usr/include (found version "3.37.2") 
-- Found LibPROJ: /usr/lib/x86_64-linux-gnu/libproj.so (found version "8.2.1") 
-- Found Eigen3: /usr/include/eigen3 (found version "3.4.0") 
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found version "2.4.7") 
-- Found double-conversion: /usr/lib/x86_64-linux-gnu/libdouble-conversion.so  
-- Found LZ4: /usr/lib/x86_64-linux-gnu/liblz4.so (found version "1.9.3") 
-- Found LZMA: /usr/lib/x86_64-linux-gnu/liblzma.so (found version "5.2.5") 
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "80") 
-- Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (found version "4.3.0")  
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.11.1") 
-- Found utf8cpp: /usr/include/utf8cpp  
-- VTK version: 9.1.0
-- VTK rendering backend: OpenGL2
-- VTK Qt support: YES
-- VTK libs: VTK::WrappingTools;VTK::ViewsQt;VTK::ViewsInfovis;VTK::CommonColor;VTK::Java;VTK::ViewsContext2D;VTK::loguru;VTK::TestingRendering;VTK::TestingCore;VTK::vtksys;VTK::RenderingTk;VTK::RenderingQt;VTK::PythonContext2D;VTK::RenderingVolumeOpenGL2;VTK::glew;VTK::opengl;VTK::PythonInterpreter;VTK::Python;VTK::RenderingLabel;VTK::octree;VTK::RenderingLOD;VTK::RenderingImage;VTK::RenderingContextOpenGL2;VTK::ParallelMPI4Py;VTK::mpi;VTK::IOVeraOut;VTK::hdf5;VTK::IOTecplotTable;VTK::IOSegY;VTK::IOParallelXML;VTK::IOParallelNetCDF;VTK::netcdf;VTK::IOPLY;VTK::IOOggTheora;VTK::theora;VTK::ogg;VTK::IONetCDF;VTK::IOMotionFX;VTK::pegtl;VTK::IOMPIParallel;VTK::IOParallel;VTK::jsoncpp;VTK::IOMPIImage;VTK::IOMINC;VTK::IOLSDyna;VTK::IOInfovis;VTK::libxml2;VTK::zlib;VTK::IOImport;VTK::IOIOSS;VTK::ioss;VTK::exodusII;VTK::cgns;VTK::IOHDF;VTK::IOVideo;VTK::IOMovie;VTK::IOExportPDF;VTK::libharu;VTK::IOExportGL2PS;VTK::RenderingGL2PSOpenGL2;VTK::gl2ps;VTK::png;VTK::IOExport;VTK::RenderingVtkJS;VTK::IOGeometry;VTK::RenderingSceneGraph;VTK::IOExodus;VTK::IOEnSight;VTK::IOCityGML;VTK::pugixml;VTK::IOChemistry;VTK::IOCONVERGECFD;VTK::IOCGNSReader;VTK::IOAsynchronous;VTK::IOAMR;VTK::InteractionImage;VTK::ImagingStencil;VTK::ImagingStatistics;VTK::ImagingMorphological;VTK::ImagingMath;VTK::ImagingFourier;VTK::IOSQL;VTK::sqlite;VTK::GUISupportQt;VTK::GeovisCore;VTK::libproj;VTK::InfovisLayout;VTK::ViewsCore;VTK::InteractionWidgets;VTK::RenderingVolume;VTK::RenderingAnnotation;VTK::ImagingHybrid;VTK::ImagingColor;VTK::InteractionStyle;VTK::FiltersTopology;VTK::FiltersSelection;VTK::FiltersSMP;VTK::FiltersPython;VTK::FiltersProgrammable;VTK::FiltersPoints;VTK::FiltersParallelVerdict;VTK::FiltersVerdict;VTK::verdict;VTK::FiltersParallelImaging;VTK::FiltersParallelGeometry;VTK::FiltersImaging;VTK::ImagingGeneral;VTK::FiltersHyperTree;VTK::FiltersGeneric;VTK::FiltersFlowPaths;VTK::eigen;VTK::FiltersAMR;VTK::DomainsParallelChemistry;VTK::FiltersParallelMPI;VTK::FiltersParallel;VTK::FiltersTexture;VTK::FiltersModeling;VTK::FiltersHybrid;VTK::ParallelMPI;VTK::DomainsChemistryOpenGL2;VTK::RenderingOpenGL2;VTK::RenderingUI;VTK::DomainsChemistry;VTK::CommonPython;VTK::WrappingPythonCore;VTK::ChartsCore;VTK::InfovisCore;VTK::FiltersExtraction;VTK::ParallelDIY;VTK::diy2;VTK::IOXML;VTK::IOXMLParser;VTK::expat;VTK::ParallelCore;VTK::IOLegacy;VTK::IOCore;VTK::doubleconversion;VTK::lz4;VTK::lzma;VTK::FiltersStatistics;VTK::ImagingSources;VTK::IOImage;VTK::DICOMParser;VTK::jpeg;VTK::metaio;VTK::tiff;VTK::RenderingContext2D;VTK::RenderingFreeType;VTK::freetype;VTK::kwiml;VTK::RenderingCore;VTK::FiltersSources;VTK::ImagingCore;VTK::FiltersGeometry;VTK::FiltersGeneral;VTK::fmt;VTK::CommonComputationalGeometry;VTK::FiltersCore;VTK::CommonExecutionModel;VTK::CommonDataModel;VTK::CommonSystem;VTK::CommonMisc;VTK::exprtk;VTK::CommonTransforms;VTK::CommonMath;VTK::kissfft;VTK::CommonCore;VTK::utf8
-- 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.81.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
--   kdtree
--   octree
--   search
--   sample_consensus
--   filters
--   2d
--   geometry
--   io
--   features
--   ml
--   segmentation
--   visualization
--   surface
--   registration
--   keypoints
--   tracking
--   recognition
--   stereo
--   outofcore
--   people
--   tools
-- The following subsystems will not be built:
--   apps: Disabled by default
--   benchmarks: Disabled by default
--   examples: Code examples are disabled by default.
--   simulation: Disabled by default.
--   global_tests: Disabled by default
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ka/Downloads/pcl/build
(base)  pcl/build  make -j2
[  0%] Building CXX object common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
[  0%] Building CXX object tools/CMakeFiles/pcl_pcd_convert_NaN_nan.dir/pcd_convert_NaN_nan.cpp.o
[  0%] Linking CXX executable ../bin/pcl_pcd_convert_NaN_nan
[  0%] Built target pcl_pcd_convert_NaN_nan
[  0%] Building CXX object common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
[  0%] Building CXX object common/CMakeFiles/pcl_common.dir/src/PCLPointCloud2.cpp.o
[  0%] Building CXX object common/CMakeFiles/pcl_common.dir/src/io.cpp.o
[  0%] Building CXX object common/CMakeFiles/pcl_common.dir/src/common.cpp.o
[  1%] Building CXX object common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o
[  1%] Building CXX object common/CMakeFiles/pcl_common.dir/src/distances.cpp.o
[  1%] Building CXX object common/CMakeFiles/pcl_common.dir/src/parse.cpp.o
[  1%] Building CXX object common/CMakeFiles/pcl_common.dir/src/poses_from_matches.cpp.o
[  1%] Building CXX object common/CMakeFiles/pcl_common.dir/src/print.cpp.o
[  2%] Building CXX object common/CMakeFiles/pcl_common.dir/src/projection_matrix.cpp.o
[  2%] Building CXX object common/CMakeFiles/pcl_common.dir/src/time_trigger.cpp.o
[  2%] Building CXX object common/CMakeFiles/pcl_common.dir/src/gaussian.cpp.o
[  2%] Building CXX object common/CMakeFiles/pcl_common.dir/src/colors.cpp.o
[  2%] Building CXX object common/CMakeFiles/pcl_common.dir/src/feature_histogram.cpp.o
[  2%] Building CXX object common/CMakeFiles/pcl_common.dir/src/bearing_angle_image.cpp.o
[  3%] Building CXX object common/CMakeFiles/pcl_common.dir/src/range_image.cpp.o
[  3%] Building CXX object common/CMakeFiles/pcl_common.dir/src/range_image_planar.cpp.o
[  3%] Building C object common/CMakeFiles/pcl_common.dir/src/fft/kiss_fft.c.o
[  3%] Building C object common/CMakeFiles/pcl_common.dir/src/fft/kiss_fftr.c.o
[  3%] Linking CXX shared library ../lib/libpcl_common.so
[  3%] Built target pcl_common
[  4%] Building CXX object kdtree/CMakeFiles/pcl_kdtree.dir/src/kdtree_flann.cpp.o
[  5%] Building CXX object octree/CMakeFiles/pcl_octree.dir/src/octree_inst.cpp.o
[  5%] Linking CXX shared library ../lib/libpcl_kdtree.so
[  5%] Built target pcl_kdtree
[  5%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac.cpp.o
[  5%] Linking CXX shared library ../lib/libpcl_octree.so
[  5%] Built target pcl_octree
[  5%] Building CXX object io/CMakeFiles/pcl_io_ply.dir/src/ply/ply_parser.cpp.o
[  5%] Linking CXX shared library ../lib/libpcl_io_ply.so
[  5%] Built target pcl_io_ply
[  6%] Building CXX object ml/CMakeFiles/pcl_ml.dir/src/point_xy_32i.cpp.o
[  6%] Building CXX object ml/CMakeFiles/pcl_ml.dir/src/point_xy_32f.cpp.o
[  7%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_circle.cpp.o
[  7%] Building CXX object ml/CMakeFiles/pcl_ml.dir/src/densecrf.cpp.o
[  7%] Building CXX object ml/CMakeFiles/pcl_ml.dir/src/pairwise_potential.cpp.o
[  7%] Building CXX object ml/CMakeFiles/pcl_ml.dir/src/permutohedral.cpp.o
[  7%] Building CXX object ml/CMakeFiles/pcl_ml.dir/src/svm_wrapper.cpp.o
[  8%] Building CXX object ml/CMakeFiles/pcl_ml.dir/src/svm.cpp.o
[  8%] Building CXX object ml/CMakeFiles/pcl_ml.dir/src/kmeans.cpp.o
[  8%] Linking CXX shared library ../lib/libpcl_ml.so
[  8%] Built target pcl_ml
[  9%] Building CXX object stereo/CMakeFiles/pcl_stereo.dir/src/stereo_grabber.cpp.o
[  9%] Building CXX object stereo/CMakeFiles/pcl_stereo.dir/src/stereo_matching.cpp.o
[  9%] Building CXX object stereo/CMakeFiles/pcl_stereo.dir/src/stereo_block_based.cpp.o
[  9%] Building CXX object stereo/CMakeFiles/pcl_stereo.dir/src/stereo_adaptive_cost_so.cpp.o
[  9%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_circle3d.cpp.o
[  9%] Building CXX object stereo/CMakeFiles/pcl_stereo.dir/src/disparity_map_converter.cpp.o
[  9%] Building CXX object stereo/CMakeFiles/pcl_stereo.dir/src/digital_elevation_map.cpp.o
[ 10%] Linking CXX shared library ../lib/libpcl_stereo.so
[ 10%] Built target pcl_stereo
[ 10%] Building CXX object tools/CMakeFiles/pcl_ply2obj.dir/ply2obj.cpp.o
[ 10%] Linking CXX executable ../bin/pcl_ply2obj
[ 10%] Built target pcl_ply2obj
[ 10%] Building CXX object tools/CMakeFiles/pcl_ply2ply.dir/ply2ply.cpp.o
[ 11%] Linking CXX executable ../bin/pcl_ply2ply
[ 11%] Built target pcl_ply2ply
[ 11%] Building CXX object tools/CMakeFiles/pcl_ply2raw.dir/ply2raw.cpp.o
[ 11%] Linking CXX executable ../bin/pcl_ply2raw
[ 11%] Built target pcl_ply2raw
[ 11%] Building CXX object tools/CMakeFiles/pcl_plyheader.dir/plyheader.cpp.o
[ 12%] Linking CXX executable ../bin/pcl_plyheader
[ 12%] Built target pcl_plyheader
[ 12%] Building CXX object search/CMakeFiles/pcl_search.dir/src/search.cpp.o
[ 12%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_cylinder.cpp.o
[ 13%] Building CXX object search/CMakeFiles/pcl_search.dir/src/kdtree.cpp.o
[ 13%] Building CXX object search/CMakeFiles/pcl_search.dir/src/brute_force.cpp.o
[ 13%] Building CXX object search/CMakeFiles/pcl_search.dir/src/organized.cpp.o
[ 13%] Building CXX object search/CMakeFiles/pcl_search.dir/src/octree.cpp.o
[ 13%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_cone.cpp.o
[ 13%] Linking CXX shared library ../lib/libpcl_search.so
[ 13%] Built target pcl_search
[ 14%] Building CXX object io/CMakeFiles/pcl_io.dir/src/debayer.cpp.o
[ 14%] Building CXX object io/CMakeFiles/pcl_io.dir/src/pcd_grabber.cpp.o
[ 14%] Building CXX object io/CMakeFiles/pcl_io.dir/src/pcd_io.cpp.o
[ 14%] Building CXX object io/CMakeFiles/pcl_io.dir/src/vtk_io.cpp.o
[ 14%] Building CXX object io/CMakeFiles/pcl_io.dir/src/ply_io.cpp.o
[ 14%] Building CXX object io/CMakeFiles/pcl_io.dir/src/ascii_io.cpp.o
[ 15%] Building CXX object io/CMakeFiles/pcl_io.dir/src/compression.cpp.o
[ 15%] Building CXX object io/CMakeFiles/pcl_io.dir/src/lzf.cpp.o
[ 15%] Building CXX object io/CMakeFiles/pcl_io.dir/src/lzf_image_io.cpp.o
[ 15%] Building CXX object io/CMakeFiles/pcl_io.dir/src/obj_io.cpp.o
[ 15%] Building CXX object io/CMakeFiles/pcl_io.dir/src/ifs_io.cpp.o
[ 15%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_line.cpp.o
[ 16%] Building CXX object io/CMakeFiles/pcl_io.dir/src/image_grabber.cpp.o
[ 16%] Building CXX object io/CMakeFiles/pcl_io.dir/src/hdl_grabber.cpp.o
[ 17%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_parallel_line.cpp.o
[ 17%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_stick.cpp.o
[ 17%] Building CXX object io/CMakeFiles/pcl_io.dir/src/vlp_grabber.cpp.o
[ 17%] Building CXX object io/CMakeFiles/pcl_io.dir/src/robot_eye_grabber.cpp.o
[ 17%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_normal_parallel_plane.cpp.o
[ 17%] Building CXX object io/CMakeFiles/pcl_io.dir/src/auto_io.cpp.o
[ 17%] Building CXX object io/CMakeFiles/pcl_io.dir/src/io_exception.cpp.o
[ 18%] Building CXX object io/CMakeFiles/pcl_io.dir/src/tim_grabber.cpp.o
[ 18%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_normal_plane.cpp.o
[ 18%] Building CXX object io/CMakeFiles/pcl_io.dir/src/vtk_lib_io.cpp.o
[ 18%] Building CXX object io/CMakeFiles/pcl_io.dir/src/png_io.cpp.o
[ 18%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_device.cpp.o
[ 18%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_device_primesense.cpp.o
[ 18%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_image_bayer_grbg.cpp.o
[ 19%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_depth_image.cpp.o
[ 19%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_ir_image.cpp.o
[ 19%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_device_kinect.cpp.o
[ 19%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_device_xtion.cpp.o
[ 19%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_device_oni.cpp.o
[ 20%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_driver.cpp.o
[ 20%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_exception.cpp.o
[ 20%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_image_yuv_422.cpp.o
[ 20%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_camera/openni_image_rgb24.cpp.o
[ 20%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_normal_sphere.cpp.o
[ 20%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni_grabber.cpp.o
[ 20%] Building CXX object io/CMakeFiles/pcl_io.dir/src/oni_grabber.cpp.o
[ 20%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_plane.cpp.o
[ 21%] Building CXX object io/CMakeFiles/pcl_io.dir/src/image_rgb24.cpp.o
[ 21%] Building CXX object io/CMakeFiles/pcl_io.dir/src/image_yuv422.cpp.o
[ 21%] Building CXX object io/CMakeFiles/pcl_io.dir/src/image_ir.cpp.o
[ 21%] Building CXX object io/CMakeFiles/pcl_io.dir/src/image_depth.cpp.o
[ 21%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni2_grabber.cpp.o
[ 22%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_registration.cpp.o
[ 23%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni2/openni2_timer_filter.cpp.o
[ 23%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni2/openni2_video_mode.cpp.o
[ 23%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni2/openni2_convert.cpp.o
[ 23%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni2/openni2_device.cpp.o
[ 23%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni2/openni2_device_info.cpp.o
[ 23%] Building CXX object io/CMakeFiles/pcl_io.dir/src/openni2/openni2_device_manager.cpp.o
[ 24%] Building CXX object io/CMakeFiles/pcl_io.dir/src/dinast_grabber.cpp.o
[ 24%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_sphere.cpp.o
[ 24%] Building CXX object io/CMakeFiles/pcl_io.dir/src/libpng_wrapper.cpp.o
[ 24%] Linking CXX shared library ../lib/libpcl_io.so
[ 24%] Built target pcl_io
[ 24%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/processing.cpp.o
[ 24%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/ear_clipping.cpp.o
[ 24%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/gp3.cpp.o
[ 24%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/grid_projection.cpp.o
[ 24%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_ellipse3d.cpp.o
[ 25%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/marching_cubes.cpp.o
[ 25%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/marching_cubes_hoppe.cpp.o
[ 25%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/marching_cubes_rbf.cpp.o
[ 25%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/bilateral_upsampling.cpp.o
[ 25%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/mls.cpp.o
[ 25%] Linking CXX shared library ../lib/libpcl_sample_consensus.so
[ 25%] Built target pcl_sample_consensus
[ 25%] Building CXX object tools/CMakeFiles/pcl_pcd2ply.dir/pcd2ply.cpp.o
[ 25%] Linking CXX executable ../bin/pcl_pcd2ply
/usr/bin/ld: ../lib/libpcl_io.so.1.14.0: undefined reference to `boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, unsigned int, boost::system::error_code*)'
/usr/bin/ld: ../lib/libpcl_io.so.1.14.0: undefined reference to `boost::filesystem::path::extension() const'
/usr/bin/ld: ../lib/libpcl_io.so.1.14.0: undefined reference to `boost::filesystem::path::parent_path() const'
/usr/bin/ld: ../lib/libpcl_io.so.1.14.0: undefined reference to `boost::filesystem::path::operator/=(char const*)'
/usr/bin/ld: ../lib/libpcl_io.so.1.14.0: undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
/usr/bin/ld: ../lib/libpcl_io.so.1.14.0: undefined reference to `boost::filesystem::path::stem() const'
/usr/bin/ld: ../lib/libpcl_io.so.1.14.0: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/CMakeFiles/pcl_pcd2ply.dir/build.make:129: bin/pcl_pcd2ply] Error 1
make[1]: *** [CMakeFiles/Makefile2:1709: tools/CMakeFiles/pcl_pcd2ply.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 25%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/organized_fast_mesh.cpp.o
[ 26%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/simplification_remove_unused_vertices.cpp.o
[ 26%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/surfel_smoothing.cpp.o
[ 26%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/texture_mapping.cpp.o
[ 26%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/vtk_smoothing/vtk_utils.cpp.o
[ 26%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/vtk_smoothing/vtk_mesh_subdivision.cpp.o
[ 27%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/vtk_smoothing/vtk_mesh_quadric_decimation.cpp.o
[ 27%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/vtk_smoothing/vtk_mesh_smoothing_laplacian.cpp.o
[ 27%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/vtk_smoothing/vtk_mesh_smoothing_windowed_sinc.cpp.o
[ 27%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/poisson.cpp.o
[ 27%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/concave_hull.cpp.o
[ 27%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/convex_hull.cpp.o
[ 28%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/3rdparty/poisson4/bspline_data.cpp.o
[ 28%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/3rdparty/poisson4/factor.cpp.o
[ 28%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/3rdparty/poisson4/geometry.cpp.o
[ 28%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/3rdparty/poisson4/marching_cubes_poisson.cpp.o
[ 28%] Linking CXX shared library ../lib/libpcl_surface.so
[ 28%] Built target pcl_surface
make: *** [Makefile:156: all] Error 2

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):

mvieth commented 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.

KarthiAru commented 6 months ago

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
KarthiAru commented 6 months ago

Confirming that I was able to successfully build and install pcl 1.14.0 after building and installing flann and vtk from source.