catkin_make fails: Invoking "make cmake_check_build_system" failed
Hello,
I just installed ROS and I'm following the beginner tutorial to get familiar with ROS. I've done until step 4 in "Creating a ROS msg and srv", I don't have any problem in the previous steps but when I try "catkin_make" it fails and I can't find the problem. Thank you for your help. Cheers, Carlos This is the message returned in the terminal:
carlos@carlos-VirtualBox:~/catkin_ws$ catkin_make
Base path: /home/carlos/catkin_ws
Source space: /home/carlos/catkin_ws/src
Build space: /home/carlos/catkin_ws/build
Devel space: /home/carlos/catkin_ws/devel
Install space: /home/carlos/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/carlos/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/carlos/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/carlos/catkin_ws/devel;/opt/ros/indigo
-- This workspace overlays: /home/carlos/catkin_ws/devel;/opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/carlos/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.11
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators: gencpp;genlisp;genpy
-- beginner_tutorials: 1 messages, 1 services
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:104 (message):
catkin_package() called with unused arguments: ...
Call Stack (most recent call first):
/opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
beginner_tutorials/CMakeLists.txt:81 (catkin_package)
-- Configuring incomplete, errors occurred!
See also "/home/carlos/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/carlos/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
while the CMakeError.log is:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/carlos/catkin_ws/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec972305253/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec972305253.dir/build.make CMakeFiles/cmTryCompileExec972305253.dir/build
make[1]: Entering directory `/home/carlos/catkin_ws/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/carlos/catkin_ws/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec972305253.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTryCompileExec972305253.dir/CheckSymbolExists.c.o -c /home/carlos/catkin_ws/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec972305253
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec972305253.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTryCompileExec972305253.dir/CheckSymbolExists.c.o -o cmTryCompileExec972305253 -rdynamic
CMakeFiles/cmTryCompileExec972305253.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0xa): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[1]: Leaving directory `/home/carlos/catkin_ws/build/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec972305253] Error 1
make: *** [cmTryCompileExec972305253/fast] Error 2
File /home/carlos/catkin_ws/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/carlos/catkin_ws ...
Can you add the contents of your
CMakeLists.txt
as well to your question? Remove all the boilerplate comments first though.