Pcl: PCL Build Error

Created on 13 Jan 2020  路  7Comments  路  Source: PointCloudLibrary/pcl

  • Operating System and version: Linux Mint 19
  • PCL Version: latest version

I'm getting the following error message while trying to install PCL

[ 41%] Built target pcl_pcd2png
[ 41%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/3rdparty/poisson4/marching_cubes_poisson.cpp.o
[ 41%] Built target pcl_ply2vtk
[ 41%] Linking CXX executable ../bin/pcl_tiff2pcd
MakeFiles/pcl_surface.dir/src/3rdparty/poisson4/geometry.cpp.o
[ 41%] Built target pcl_pcd2png
[ 41%] Building CXX object surface/CMakeFiles/pcl_surface.dir/src/3rdparty/poisson4/marching_cubes_poisson.cpp.o
[ 41%] Built target pcl_ply2vtk
[ 41%] Linking CXX executable ../bin/pcl_tiff2pcd
[ 20%] Building CXX object visualization/CMakeFiles/pcl_visualization.dir/src/common/shapes.cpp.o
[ 21%] Building CXX object visualization/CMakeFiles/pcl_visualization.dir/src/common/ren_win_interact_map.cpp.o
[ 21%] Building CXX object visualization/CMakeFiles/pcl_visualization.dir/src/cloud_viewer.cpp.o
^Cvisualization/CMakeFiles/pcl_visualization.dir/build.make:179: recipe for target 'visualization/CMakeFiles/pcl_visualization.dir/src/cloud_viewer.cpp.o' failed
sample_consensus/CMakeFiles/pcl_sample_consensus.dir/build.make:218: recipe for target 'sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_registration.cpp.o' failed
make[2]: *** [visualization/CMakeFiles/pcl_visualization.dir/src/cloud_viewer.cpp.o] Interrupt
make[2]: *** [sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_registration.cpp.o] Interrupt
CMakeFiles/Makefile2:387: recipe for target 'sample_consensus/CMakeFiles/pcl_sample_consensus.dir/all' failed
make[1]: *** [sample_consensus/CMakeFiles/pcl_sample_consensus.dir/all] Interrupt
CMakeFiles/Makefile2:1142: recipe for target 'visualization/CMakeFiles/pcl_visualization.dir/all' failed
make[1]: *** [visualization/CMakeFiles/pcl_visualization.dir/all] Interrupt
Makefile:162: recipe for target 'all' failed
make: *** [all] Interrupt
stale

Most helpful comment

I have pasted the wrong logs. here is the actual log,

[ 41%] Linking CXX executable ../bin/pcl_obj2ply
[ 41%] Built target pcl_obj2ply
Scanning dependencies of target pcl_obj2vtk
[ 41%] Building CXX object tools/CMakeFiles/pcl_obj2vtk.dir/obj2vtk.cpp.o
[ 41%] Linking CXX executable ../bin/pcl_tiff2pcd
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libSM.so: undefined reference to uuid_generate@UUID_1.0' /home/stanly/anaconda3/lib/libfontconfig.so.1: undefined reference toFT_Done_MM_Var'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libSM.so: undefined reference to `uuid_unparse_lower@UUID_1.0'
collect2: error: ld returned 1 exit status
tools/CMakeFiles/pcl_tiff2pcd.dir/build.make:277: recipe for target 'bin/pcl_tiff2pcd' failed
make[2]: * [bin/pcl_tiff2pcd] Error 1
CMakeFiles/Makefile2:4581: recipe for target 'tools/CMakeFiles/pcl_tiff2pcd.dir/all' failed
make[1]:
[tools/CMakeFiles/pcl_tiff2pcd.dir/all] Error 2
make[1]:
Waiting for unfinished jobs....
[ 41%] Linking CXX executable ../bin/pcl_obj2vtk
[ 41%] Built target pcl_obj2vtk
Makefile:162: recipe for target 'all' failed
make: *
[all] Error 2

All 7 comments

There's a ^C implying a user abort in the output. Please try compilation again.

I have pasted the wrong logs. here is the actual log,

[ 41%] Linking CXX executable ../bin/pcl_obj2ply
[ 41%] Built target pcl_obj2ply
Scanning dependencies of target pcl_obj2vtk
[ 41%] Building CXX object tools/CMakeFiles/pcl_obj2vtk.dir/obj2vtk.cpp.o
[ 41%] Linking CXX executable ../bin/pcl_tiff2pcd
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libSM.so: undefined reference to uuid_generate@UUID_1.0' /home/stanly/anaconda3/lib/libfontconfig.so.1: undefined reference toFT_Done_MM_Var'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libSM.so: undefined reference to `uuid_unparse_lower@UUID_1.0'
collect2: error: ld returned 1 exit status
tools/CMakeFiles/pcl_tiff2pcd.dir/build.make:277: recipe for target 'bin/pcl_tiff2pcd' failed
make[2]: * [bin/pcl_tiff2pcd] Error 1
CMakeFiles/Makefile2:4581: recipe for target 'tools/CMakeFiles/pcl_tiff2pcd.dir/all' failed
make[1]:
[tools/CMakeFiles/pcl_tiff2pcd.dir/all] Error 2
make[1]:
Waiting for unfinished jobs....
[ 41%] Linking CXX executable ../bin/pcl_obj2vtk
[ 41%] Built target pcl_obj2vtk
Makefile:162: recipe for target 'all' failed
make: *
[all] Error 2

I'm literally copy-pasting a solution from SO so this may not work: The cause is ignoring CMake Warnings caused by Anaconda (the real culprit) (maybe due to wrong package).

The solution is here on SO, reproduced to troubleshoot in the future:

My problem was that when doing cmake .. before make it gave warnings like this:

CMake Warning at cmake/pcl_targets.cmake:194 (add_library):
Cannot generate a safe runtime search path for target pcl_io because
files in some directories may conflict with libraries in implicit directories:

All the directories that were referenced were under anaconda3/lib. I ignored it and make gave me the same error libSM.so: undefined reference to `uuid_unparse_lower@UUID_1.0' and some more :). The solution was to remove anaconda lib folder from the path, and build again. In detail:

  • delete build directory and create it again
  • echo $PATH and look for anaconda lib directory
  • Copy the PATH output from previous step and remove reference to anaconda folder
  • execute PATH=[MODIFIED_PATH] where [MODIFIED_PATH] is the result from previous step
  • Execute echo $PATH again to see that anaconda directory has been removed
  • build the project again in the same terminal window

Now the process uses system libraries, not the anaconda ones and compilation succeeds.
An example of modified PATH: if the original was /home/you/anaconda3/bin:/usr/local/bin:/usr/sbin:/usr/bin then the modified one is /usr/local/bin:/usr/sbin:/usr/bin
NB! You probably do not want to change the PATH permanently (your anaconda installation might stop working) that is why it is done from the terminal not from .bashrc file.

Another solution offered in the comments is to pick libSM from the correct source

conda install -c conda-forge xorg-libsm

Please tell us which version works, and we might add this in installation from source documentation

I have tried the above solution but still, it is throwing the same error :( .

Both of the solutions? If so, then could you create a docker and recreate the issue inside? A minimal docker would be nice

Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.

Issue hasn't been reproduced, no MVCE was provided. Labeling as unconfirmed and closing.

Was this page helpful?
0 / 5 - 0 ratings