Building problem
Hi, I have tried to build FeatureBasedAlignment, but it does not work out. Can you help to fix the problem, please Thanks,
My error:
Scanning dependencies of target pcl_alignment [ 5%] Building CXX object CMakeFiles/pcl_alignment.dir/alignment.cxx.o In file included from /home/alex/Downloads/FeatureBasedAlignment-master/alignment.cxx:1:0: /home/alex/Downloads/FeatureBasedAlignment-master/alignment.h: In instantiation of ‘pcl::CorrespondencesPtr RoughFeatureAlignment::estimateCorrespondances(typename pcl::PointCloud<PointT>::Ptr&, typename pcl::PointCloud<PointT>::Ptr&, unsigned int) [with T = pcl::FPFHSignature33; pcl::CorrespondencesPtr = boost::shared_ptr<std::vector<pcl::Correspondence, Eigen::aligned_allocatorpcl::Correspondence > >; typename pcl::PointCloud<PointT>::Ptr = boost::shared_ptr<pcl::PointCloudpcl::FPFHSignature33 >]’: /home/alex/Downloads/FeatureBasedAlignment-master/alignment.cxx:28:59: required from here /home/alex/Downloads/FeatureBasedAlignment-master/alignment.h:105:3: warning: ‘void pcl::registration::CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::setInputCloud(const PointCloudSourceConstPtr&) [with PointSource = pcl::FPFHSignature33; PointTarget = pcl::FPFHSignature33; Scalar = float; pcl::registration::CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::PointCloudSourceConstPtr = boost::shared_ptr<const pcl::PointCloudpcl::FPFHSignature33 >]’ is deprecated: [pcl::registration::CorrespondenceEstimationBase::setInputCloud] setInputCloud is deprecated. Please use setInputSource instead. [-Wdeprecated-declarations] ce.setInputCloud(sourcePts); ^ In file included from /usr/local/include/pcl-1.8/pcl/registration/correspondence_estimation.h:452:0, from /home/alex/Downloads/FeatureBasedAlignment-master/util.h:5, from /home/alex/Downloads/FeatureBasedAlignment-master/alignment.h:4, from /home/alex/Downloads/FeatureBasedAlignment-master/alignment.cxx:1: /usr/local/include/pcl-1.8/pcl/registration/impl/correspondence_estimation.hpp:48:1: note: declared here pcl::registration::CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::setInputCloud (const typename pcl::registration::CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::PointCloudSourceConstPtr &cloud) ^ In file included from /usr/local/include/pcl-1.8/pcl/sample_consensus/sac_model.h:52:0, from /usr/local/include/pcl-1.8/pcl/sample_consensus/sac.h:45, from /usr/local/include/pcl-1.8/pcl/sample_consensus/ransac.h:44, from /usr/local/include/pcl-1.8/pcl/registration/icp.h:45, from /home/alex/Downloads/FeatureBasedAlignment-master/alignment.h:6, from /home/alex/Downloads/FeatureBasedAlignment-master/alignment.cxx:1: /usr/local/include/pcl-1.8/pcl/sample_consensus/model_types.h: In function ‘void __static_initialization_and_destruction_0(int, int)’: /usr/local/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: warning: ‘pcl::SAC_SAMPLE_SIZE’ is deprecated: This map is deprecated and is kept only to prevent breaking existing user code. Starting from PCL 1.8.0 model sample size is a protected member of the SampleConsensusModel class [-Wdeprecated-declarations] SAC_SAMPLE_SIZE (sample_size_pairs, sample_size_pairs + sizeof (sample_size_pairs) / sizeof (SampleSizeModel)); ^ /usr/local/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: note: declared here [ 11%] Building CXX object CMakeFiles/pcl_alignment.dir/util.cxx.o [ 17%] Linking CXX static library libpcl_alignment.a [ 17%] Built target pcl_alignment Scanning dependencies of target distance [ 23%] Building CXX object CMakeFiles/distance.dir/distance.cxx.o [ 29%] Linking CXX executable distance /usr/bin/ld: CMakeFiles/distance.dir/distance.cxx.o: undefined reference to symbol '_ZN3pcl11KdTreeFLANNINS_8PointXYZEN5flann9L2_SimpleIfEEE10setEpsilonEf' /usr/local/lib/libpcl_kdtree.so.1.8: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status CMakeFiles/distance.dir/build.make:158: recipe for target 'distance' failed make[2]: *** [distance] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/distance.dir/all' failed make[1]: *** [CMakeFiles/distance.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
I have the same problem and tried to use make -i, it compiled some executables, but not other, so it is impossible used the solution.
I have not came across the same problem, try pcl1.7.2 instead of 1.8
I have not came across the same problem, try pcl1.7.2 instead of 1.8
I got the same problem in pcl1.7.2.
In cmakefile I link ${PCL_LIBRARIES} to pcl_alignment and then it compiles well.