dpOptTrans
dpOptTrans copied to clipboard
build errors on ubuntu 16.04
The configuration of my machine is ubuntu16.04, cuda8.0. I installed pcl-1.8 successfully with the deb file provided by this website: https://larrylisky.com/2016/11/03/point-cloud-library-on-ubuntu-16-04-lts/. As to opencv, I am using the 3.2 version. I have replaced the opencv_cntrib library with features2d and objdetect, and imgproc sicne these are the headers files included in contrib.hpp. Meanwhile, target_link_libraries(... opencv_contrib ...) in the cudaPcl CMakeLists are also replaced with the corresponding libraries. Now, I still cannot make cudaPcl successfully. Detailedly, the following errors are reported:
-- cudaPcl
[ 25%] Built target cudaPcl [ 32%] Built target testSurfelRender [ 42%] Built target renderPcFromPc [ 46%] Linking CXX executable bin/openniPyramid /usr/bin/ld: CMakeFiles/openniPyramid.dir/src/openniPyramid.o: undefined reference to symbol '_ZN2cv7imwriteERKNS_6StringERKNS_11_InputArrayERKSt6vectorIiSaIiEE' /media/hlei/research/opencv/release/lib/libopencv_imgcodecs.so.3.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status CMakeFiles/openniPyramid.dir/build.make:105: recipe for target 'bin/openniPyramid' failed make[4]: *** [bin/openniPyramid] Error 1 CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/openniPyramid.dir/all' failed make[3]: *** [CMakeFiles/openniPyramid.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make[2]: *** [all] Error 2 Makefile:31: recipe for target 'all' failed make[1]: *** [all] Error 2 Makefile:30: recipe for target 'main' failed make: *** [main] Error 2
I installed openni on my machine with sudo apt-get install libopenni-dev. In addition, my machine has openni2 as well. Do you have any suggestions?
needs opencv_imgcodecs lib. After adding this into the target_link_libraries, now the compilation goes to this:
-- Configuring done WARNING: Target "testSurfelRender" requests linking to directory "/usr/local/lib". Targets may link only to libraries. CMake is dropping the item. -- Generating done -- Build files have been written to: /media/hlei/research/tip_revise/dpOptTrans/cudaPcl/pod-build [ 3%] Linking CXX shared library lib/libcudaPcl.so [ 25%] Built target cudaPcl [ 28%] Linking CXX executable bin/testSurfelRender [ 32%] Built target testSurfelRender [ 42%] Built target renderPcFromPc Scanning dependencies of target openniPyramid [ 46%] Building CXX object CMakeFiles/openniPyramid.dir/src/openniPyramid.o In file included from /media/hlei/research/tip_revise/dpOptTrans/cudaPcl/src/openniPyramid.cpp:12:0: /media/hlei/research/tip_revise/dpOptTrans/cudaPcl/pod-build/include/cudaPcl/openniPyramid.hpp: In member function ‘virtual void cudaPcl::OpenniPyramid::depth_cb(const uint16_t*, uint32_t, uint32_t)’: /media/hlei/research/tip_revise/dpOptTrans/cudaPcl/pod-build/include/cudaPcl/openniPyramid.hpp:143:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(dC_pyr.cols > w) ^ /media/hlei/research/tip_revise/dpOptTrans/cudaPcl/pod-build/include/cudaPcl/openniPyramid.hpp:145:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(gray_pyr_.cols > w) ^ [ 50%] Linking CXX executable bin/openniPyramid [ 50%] Built target openniPyramid Scanning dependencies of target openniSmoothNormals_file [ 53%] Building CXX object CMakeFiles/openniSmoothNormals_file.dir/src/openniSmoothNormals_file.o In file included from /media/hlei/research/tip_revise/dpOptTrans/build/include/jsCore/gpuMatrix.hpp:12:0, from /media/hlei/research/tip_revise/dpOptTrans/cudaPcl/pod-build/include/cudaPcl/depthGuidedFilter.hpp:14, from /media/hlei/research/tip_revise/dpOptTrans/cudaPcl/src/openniSmoothNormals_file.cpp:19: /media/hlei/research/tip_revise/dpOptTrans/build/include/nvidia/helper_cuda.h: In function ‘const char* _cudaGetErrorEnum(cudaError_t)’: /media/hlei/research/tip_revise/dpOptTrans/build/include/nvidia/helper_cuda.h:68:12: warning: enumeration value ‘cudaErrorNvlinkUncorrectable’ not handled in switch [-Wswitch] switch (error) ^ [ 57%] Linking CXX executable bin/openniSmoothNormals_file [ 57%] Built target openniSmoothNormals_file Scanning dependencies of target rndTransformPc [ 60%] Building CXX object CMakeFiles/rndTransformPc.dir/src/randomlyTransformPointClouds.o [ 64%] Linking CXX executable bin/rndTransformPc [ 64%] Built target rndTransformPc Scanning dependencies of target openniSmoothDepth [ 67%] Building CXX object CMakeFiles/openniSmoothDepth.dir/src/openniSmoothDepth.o In file included from /media/hlei/research/tip_revise/dpOptTrans/build/include/jsCore/gpuMatrix.hpp:12:0, from /media/hlei/research/tip_revise/dpOptTrans/cudaPcl/pod-build/include/cudaPcl/depthGuidedFilter.hpp:14, from /media/hlei/research/tip_revise/dpOptTrans/cudaPcl/pod-build/include/cudaPcl/openniSmoothDepthGpu.hpp:14, from /media/hlei/research/tip_revise/dpOptTrans/cudaPcl/src/openniSmoothDepth.cpp:12: /media/hlei/research/tip_revise/dpOptTrans/build/include/nvidia/helper_cuda.h: In function ‘const char* _cudaGetErrorEnum(cudaError_t)’: /media/hlei/research/tip_revise/dpOptTrans/build/include/nvidia/helper_cuda.h:68:12: warning: enumeration value ‘cudaErrorNvlinkUncorrectable’ not handled in switch [-Wswitch] switch (error) ^ [ 71%] Linking CXX executable bin/openniSmoothDepth [ 71%] Built target openniSmoothDepth Scanning dependencies of target pclNormals [ 75%] Building CXX object CMakeFiles/pclNormals.dir/src/pclNormals.o [ 78%] Linking CXX executable bin/pclNormals /usr/bin/ld: cannot find -lXnVNite collect2: error: ld returned 1 exit status CMakeFiles/pclNormals.dir/build.make:100: recipe for target 'bin/pclNormals' failed make[4]: *** [bin/pclNormals] Error 1 CMakeFiles/Makefile2:358: recipe for target 'CMakeFiles/pclNormals.dir/all' failed make[3]: *** [CMakeFiles/pclNormals.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make[2]: *** [all] Error 2 Makefile:31: recipe for target 'all' failed make[1]: *** [all] Error 2 Makefile:30: recipe for target 'main' failed make: *** [main] Error 2