Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 417

catkin_make error when compiling cuda code on TK1

$
0
0
I am trying to compile a package that has C++, C, and Cuda code. I've been able to successfully compile the package on a TX1 with cuda 7.0 but I get a strange compilation error when compiling on my TK1 with cuda 6.5. Here is the error: ubuntu@tegra-ubuntu:~/catkin_ws$ catkin_make Base path: /home/ubuntu/catkin_ws Source space: /home/ubuntu/catkin_ws/src Build space: /home/ubuntu/catkin_ws/build Devel space: /home/ubuntu/catkin_ws/devel Install space: /home/ubuntu/catkin_ws/install #### #### Running command: "make cmake_check_build_system" in "/home/ubuntu/catkin_ws/build" #### #### #### Running command: "make -j1 -l1" in "/home/ubuntu/catkin_ws/build" #### [ 0%] Building NVCC (Device) object darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o -- Removing /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o /usr/bin/cmake -E remove /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o -- Generating dependency file: /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.NVCC-depend /usr/local/cuda-6.5/bin/nvcc -M -D__CUDACC__ /home/ubuntu/catkin_ws/src/darknet_ros/src/yolo_kernels.cu -o /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.NVCC-depend -ccbin /usr/bin/cc -m32 -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"darknet_ros\" -DROSCONSOLE_BACKEND_LOG4CXX -DGPU -DOPENCV -Xcompiler ,\"-g\" -arch=sm_32 -O3 -gencode arch=compute_20,code=sm_20 -DNVCC -I/usr/local/cuda-6.5/include -I/home/ubuntu/catkin_ws/devel/include -I/usr/include/opencv -I/usr/include -I/usr/local/cuda/include -I/home/ubuntu/catkin_ws/src/darknet_ros/src -I/opt/ros/indigo/include -I/usr/local/cuda-6.5/include -- Generating temporary cmake readable file: /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp /usr/bin/cmake -D input_file:FILEPATH=/home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.NVCC-depend -D output_file:FILEPATH=/home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp -P /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake -- Copy if different /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp to /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend /usr/bin/cmake -E copy_if_different /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend -- Removing /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp and /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.NVCC-depend /usr/bin/cmake -E remove /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.depend.tmp /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/ROS_interface_generated_yolo_kernels.cu.o.NVCC-depend -- Generating /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o /usr/local/cuda-6.5/bin/nvcc /home/ubuntu/catkin_ws/src/darknet_ros/src/yolo_kernels.cu -c -o /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o -ccbin /usr/bin/cc -m32 -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"darknet_ros\" -DROSCONSOLE_BACKEND_LOG4CXX -DGPU -DOPENCV -Xcompiler ,\"-g\" -arch=sm_32 -O3 -gencode arch=compute_20,code=sm_20 -DNVCC -I/usr/local/cuda-6.5/include -I/home/ubuntu/catkin_ws/devel/include -I/usr/include/opencv -I/usr/include -I/usr/local/cuda/include -I/home/ubuntu/catkin_ws/src/darknet_ros/src -I/opt/ros/indigo/include -I/usr/local/cuda-6.5/include /opt/ros/indigo/include/ros/service_client.h(185): error: expected a ")" /opt/ros/indigo/include/ros/service_client.h(185): error: too few arguments in function call /opt/ros/indigo/include/sensor_msgs/image_encodings.h(179): warning: statement is unreachable /opt/ros/indigo/include/sensor_msgs/image_encodings.h(231): warning: statement is unreachable 2 errors detected in the compilation of "/tmp/tmpxft_000009e5_00000000-9_yolo_kernels.compute_20.cpp1.ii". -- Removing /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o /usr/bin/cmake -E remove /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o CMake Error at ROS_interface_generated_yolo_kernels.cu.o.cmake:264 (message): Error generating file /home/ubuntu/catkin_ws/build/darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o make[2]: *** [darknet_ros/CMakeFiles/ROS_interface.dir/src/./ROS_interface_generated_yolo_kernels.cu.o] Error 1 make[1]: *** [darknet_ros/CMakeFiles/ROS_interface.dir/all] Error 2 make: *** [all] Error 2 Invoking "make -j1 -l1" failed And here is the CMakeLists.txt: cmake_minimum_required(VERSION 2.8.12) project(darknet_ros) find_package(CUDA REQUIRED) find_package(OpenCV REQUIRED) find_package(catkin REQUIRED COMPONENTS cv_bridge roscpp rospy std_msgs image_transport message_generation ) add_message_files( FILES bbox.msg bbox_array.msg ) generate_messages( DEPENDENCIES std_msgs ) set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}; -O3 -gencode arch=compute_20,code=sm_20 ) add_definitions(-DGPU -DOPENCV) catkin_package( CATKIN_DEPENDS message_runtime ) include_directories( /usr/local/cuda/include src ${catkin_INCLUDE_DIRS} ) link_directories( /usr/local/cuda/lib ) cuda_add_executable(ROS_interface src/ROS_interface.cpp src/gemm.c src/utils.c src/cuda.c src/deconvolutional_layer.c src/convolutional_layer.c src/list.c src/image.c src/activations.c src/im2col.c src/col2im.c src/blas.c src/crop_layer.c src/dropout_layer.c src/maxpool_layer.c src/softmax_layer.c src/data.c src/matrix.c src/network.c src/connected_layer.c src/cost_layer.c src/parser.c src/option_list.c src/detection_layer.c src/tag.c src/imagenet.c src/captcha.c src/route_layer.c src/writing.c src/box.c src/nightmare.c src/normalization_layer.c src/avgpool_layer.c src/coco.c src/dice.c src/yolo.c src/layer.c src/compare.c src/classifier.c src/local_layer.c src/shortcut_layer.c src/activation_layer.c src/cifar.c src/coco_demo.c src/swag.c src/crnn_layer.c src/go.c src/rnn.c src/rnn_layer.c src/rnn_vid.c src/convolutional_kernels.cu src/deconvolutional_kernels.cu src/activation_kernels.cu src/im2col_kernels.cu src/col2im_kernels.cu src/blas_kernels.cu src/crop_layer_kernels.cu src/dropout_layer_kernels.cu src/maxpool_layer_kernels.cu src/softmax_layer_kernels.cu src/network_kernels.cu src/avgpool_layer_kernels.cu src/yolo_kernels.cu) cuda_add_executable(yolo_object_detector src/YOLO_object_detector.cpp src/gemm.c src/utils.c src/cuda.c src/deconvolutional_layer.c src/convolutional_layer.c src/list.c src/image.c src/activations.c src/im2col.c src/col2im.c src/blas.c src/crop_layer.c src/dropout_layer.c src/maxpool_layer.c src/softmax_layer.c src/data.c src/matrix.c src/network.c src/connected_layer.c src/cost_layer.c src/parser.c src/option_list.c src/detection_layer.c src/tag.c src/imagenet.c src/captcha.c src/route_layer.c src/writing.c src/box.c src/nightmare.c src/normalization_layer.c src/avgpool_layer.c src/yolo_obj_detector.c src/layer.c src/compare.c src/classifier.c src/local_layer.c src/shortcut_layer.c src/activation_layer.c src/cifar.c src/crnn_layer.c src/go.c src/rnn.c src/rnn_layer.c src/rnn_vid.c src/convolutional_kernels.cu src/deconvolutional_kernels.cu src/activation_kernels.cu src/im2col_kernels.cu src/col2im_kernels.cu src/blas_kernels.cu src/crop_layer_kernels.cu src/dropout_layer_kernels.cu src/maxpool_layer_kernels.cu src/softmax_layer_kernels.cu src/network_kernels.cu src/avgpool_layer_kernels.cu src/yolo_kernels_ROSobj_detector.cu) target_link_libraries(ROS_interface m pthread stdc++ cuda cudart cublas curand ${catkin_LIBRARIES} ) target_link_libraries(yolo_object_detector m pthread stdc++ cuda cudart cublas curand ${catkin_LIBRARIES} ) Based on the error message, there is something wrong the /opt/ros/indigo/include/ros/service_client.h file but when I look at the line where the error is, it is simply a ROS_ERROR message line. Anyone have any suggestions?

Viewing all articles
Browse latest Browse all 417

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>