Open busybeaver42 opened 3 years ago
make: *** [Makefile:103: all] Fehler 2 I met the same problem as you, have you solved it?pls
make: *** [Makefile:103: all] Fehler 2 I met the same problem as you, have you solved it?pls I solved installing FLANN1.8.0-src tag from https://github.com/flann-lib/flann.git
seems that on ubuntu 20.04 this is a common issue https://github.com/robotsthatdream/Lib_image_processing/commit/80ab9f84b9f9c65381379654339f2f5cf4902c6a
add "-llz4" at thed end of ${NICP_ROOT}/build/nicp/nicp/CMakeFiles/nicp.dir/link.txt" as below:
/usr/bin/c++ -fPIC -Wall -W -llz4 -fopenmp -D_NICP_USE_OPENMP_ -DEIGEN_DONT_PARALLELIZE -fPIC -llz4 -O3 -DNDEBUG -O3 -msse4.2 -fopenmp -std=gnu++17 -llz4 -shared -Wl,-soname,libnicp.so -o ../../../lib/libnicp.so CMakeFiles/nicp.dir/imageutils.cpp.o CMakeFiles/nicp.dir/aligner.cpp.o CMakeFiles/nicp.dir/alignernn.cpp.o CMakeFiles/nicp.dir/alignerprojective.cpp.o CMakeFiles/nicp.dir/correspondencefinder.cpp.o CMakeFiles/nicp.dir/correspondencefindernn.cpp.o CMakeFiles/nicp.dir/correspondencefinderprojective.cpp.o CMakeFiles/nicp.dir/depthimageconverter.cpp.o CMakeFiles/nicp.dir/depthimageconverterintegralimage.cpp.o CMakeFiles/nicp.dir/cloud.cpp.o CMakeFiles/nicp.dir/gaussian3.cpp.o CMakeFiles/nicp.dir/informationmatrixcalculator.cpp.o CMakeFiles/nicp.dir/linearizer.cpp.o CMakeFiles/nicp.dir/merger.cpp.o CMakeFiles/nicp.dir/pinholepointprojector.cpp.o CMakeFiles/nicp.dir/pointintegralimage.cpp.o CMakeFiles/nicp.dir/pointprojector.cpp.o CMakeFiles/nicp.dir/se3_prior.cpp.o CMakeFiles/nicp.dir/parallelcylindricalpointprojector.cpp.o CMakeFiles/nicp.dir/statscalculator.cpp.o CMakeFiles/nicp.dir/statscalculatorintegralimage.cpp.o CMakeFiles/nicp.dir/sphericalpointprojector.cpp.o CMakeFiles/nicp.dir/voxelcalculator.cpp.o -L/usr/local/lib/libflann.so -Wl,-rpath,/usr/local/lib/libflann.so:/usr/local/lib /usr/lib/x86_64-linux-gnu/libopencv_stitching.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_aruco.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_bgsegm.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_bioinspired.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_ccalib.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_dnn_objdetect.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_dnn_superres.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_dpm.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_face.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_freetype.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_fuzzy.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_hdf.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_hfs.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_img_hash.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_line_descriptor.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_quality.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_reg.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_rgbd.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_saliency.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_shape.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_stereo.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_structured_light.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_superres.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_surface_matching.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_tracking.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_videostab.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_viz.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_xobjdetect.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_xphoto.so.4.2.0 /usr/local/lib/libflann.so /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_datasets.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_plot.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_text.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_ml.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_phase_unwrapping.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_optflow.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_ximgproc.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_video.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_videoio.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_features2d.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_flann.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_photo.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.2.0 -llz4
I have solved this problem. You can add following code in CMakeLists.txt with suitable location(I add in the line 78). find_library(LZ4_LIBRARIES NAMES liblz4.so HINTS "lz4/lib") link_libraries(${LZ4_LIBRARIES})
add "-llz4" at thed end of ${NICP_ROOT}/build/nicp/nicp/CMakeFiles/nicp.dir/link.txt" as below:
/usr/bin/c++ -fPIC -Wall -W -llz4 -fopenmp -D_NICP_USE_OPENMP_ -DEIGEN_DONT_PARALLELIZE -fPIC -llz4 -O3 -DNDEBUG -O3 -msse4.2 -fopenmp -std=gnu++17 -llz4 -shared -Wl,-soname,libnicp.so -o ../../../lib/libnicp.so CMakeFiles/nicp.dir/imageutils.cpp.o CMakeFiles/nicp.dir/aligner.cpp.o CMakeFiles/nicp.dir/alignernn.cpp.o CMakeFiles/nicp.dir/alignerprojective.cpp.o CMakeFiles/nicp.dir/correspondencefinder.cpp.o CMakeFiles/nicp.dir/correspondencefindernn.cpp.o CMakeFiles/nicp.dir/correspondencefinderprojective.cpp.o CMakeFiles/nicp.dir/depthimageconverter.cpp.o CMakeFiles/nicp.dir/depthimageconverterintegralimage.cpp.o CMakeFiles/nicp.dir/cloud.cpp.o CMakeFiles/nicp.dir/gaussian3.cpp.o CMakeFiles/nicp.dir/informationmatrixcalculator.cpp.o CMakeFiles/nicp.dir/linearizer.cpp.o CMakeFiles/nicp.dir/merger.cpp.o CMakeFiles/nicp.dir/pinholepointprojector.cpp.o CMakeFiles/nicp.dir/pointintegralimage.cpp.o CMakeFiles/nicp.dir/pointprojector.cpp.o CMakeFiles/nicp.dir/se3_prior.cpp.o CMakeFiles/nicp.dir/parallelcylindricalpointprojector.cpp.o CMakeFiles/nicp.dir/statscalculator.cpp.o CMakeFiles/nicp.dir/statscalculatorintegralimage.cpp.o CMakeFiles/nicp.dir/sphericalpointprojector.cpp.o CMakeFiles/nicp.dir/voxelcalculator.cpp.o -L/usr/local/lib/libflann.so -Wl,-rpath,/usr/local/lib/libflann.so:/usr/local/lib /usr/lib/x86_64-linux-gnu/libopencv_stitching.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_aruco.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_bgsegm.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_bioinspired.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_ccalib.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_dnn_objdetect.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_dnn_superres.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_dpm.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_face.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_freetype.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_fuzzy.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_hdf.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_hfs.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_img_hash.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_line_descriptor.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_quality.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_reg.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_rgbd.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_saliency.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_shape.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_stereo.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_structured_light.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_superres.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_surface_matching.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_tracking.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_videostab.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_viz.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_xobjdetect.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_xphoto.so.4.2.0 /usr/local/lib/libflann.so /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_datasets.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_plot.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_text.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_dnn.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_ml.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_phase_unwrapping.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_optflow.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_ximgproc.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_video.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_videoio.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_features2d.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_flann.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_photo.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.4.2.0 /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.2.0 -llz4
Thank you so much, I added the path for liblz4 and successfully compiled it as well. /usr/lib/x86_64-linux-gnu/liblz4.so.1.9.2
Scanning dependencies of target nicp_aligner [ 89%] Building CXX object nicp/nicp/CMakeFiles/nicp_aligner.dir/nicp_aligner.cpp.o [ 92%] Linking CXX executable ../../../bin/nicp_aligner /usr/bin/ld: ../../../lib/libnicp.so: undefined reference to
LZ4_resetStreamHC' /usr/bin/ld: ../../../lib/libnicp.so: undefined reference to
LZ4_setStreamDecode' /usr/bin/ld: ../../../lib/libnicp.so: undefined reference toLZ4_decompress_safe' /usr/bin/ld: ../../../lib/libnicp.so: undefined reference to
LZ4_decompress_safe_continue' /usr/bin/ld: ../../../lib/libnicp.so: undefined reference to `LZ4_compress_HC_continue' collect2: error: ld returned 1 exit status make[2]: [nicp/nicp/CMakeFiles/nicp_aligner.dir/build.make:118: ../bin/nicp_aligner] Fehler 1 make[1]: [CMakeFiles/Makefile2:135: nicp/nicp/CMakeFiles/nicp_aligner.dir/all] Fehler 2 make: *** [Makefile:103: all] Fehler 2I have found following hint: https://github.com/flann-lib/flann/issues/384 ---> the lz4 stuff is only included in C_SOURCES, which on Windows is only built into flann_s. Is it right, is your source code for windows OS, only?