2016-12-28 95 views
0

我正在使用Arch機器並試圖編譯ROS桌面全部來自。當image_proc正試圖鏈接可執行文件時,生成失敗。從源代碼編譯ROS Kinetec在構建opencv時失敗

以下是錯誤日誌:

[ 23%] Built target image_proc_gencfg 
[ 84%] Built target image_proc 
[ 92%] Linking CXX executable /home/alphayed/ROS/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc 
/home/alphayed/ROS/ros_catkin_ws/install_isolated/lib/libopencv_viz3.so.3.1.0: undefined reference to `vtkSTLReader::New()' 
/home/alphayed/ROS/ros_catkin_ws/install_isolated/lib/libopencv_viz3.so.3.1.0: undefined reference to `vtkOBJReader::New()' 
collect2: error: ld returned 1 exit status 
make[2]: *** [CMakeFiles/image_proc_exe.dir/build.make:219: /home/alphayed/ROS/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc] Error 1 
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/image_proc_exe.dir/all] Error 2 
make: *** [Makefile:139: all] Error 2 

我認爲這個問題是關係到opencv3。我從系統中刪除它,並從源代碼重新編譯它,但沒有解決問題。你能幫忙嗎?

回答

0

我發現按照此thread修復。您需要修改opencv3/cmake/OpenCVDetectVTK.cmake,每find_package(VTK QUIET COMPONENTS ...添加一個條目vtkIOGeometry