catkin_make fails to build executables ROS indigo
I face a problem using catkin_make
. It seems that the c compiler cannot be found. the final error I am getting is is Invoking "cmake" failed.
The environment variables seem ok:
ROS_PACKAGE_PATH=/home/thanos/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks
and the installed version of the compiler is: cmake version 2.8.12.2
I have edited the .bashrc
file as follows:
source /opt/ros/indigo/setup.bash
source ~/catkin_ws/devel/setup.bash
Please any help would be more than welcome!
The result I get from catkin_make is :
Base path: /home/thanos/catkin_ws
Source space: /home/thanos/catkin_ws/src
Build space: /home/thanos/catkin_ws/build
Devel space: /home/thanos/catkin_ws/devel
Install space: /home/thanos/catkin_ws/install
####
#### Running command: "cmake /home/thanos/catkin_ws/src
-DCATKIN_DEVEL_PREFIX=/home/thanos/catkin_ws/devel
-DCMAKE_INSTALL_PREFIX=/home/thanos/catkin_ws/install -G Unix Makefiles" in "/home/thanos/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/thanos/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/thanos/catkin_ws/devel;/opt/ros/indigo
-- This workspace overlays: /home/thanos/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/thanos/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.14
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 34 packages in topological order:
-- ~~ - joystick_drivers (metapackage)
-- ~~ - navigation (metapackage)
-- ~~ - p2os_doc
-- ~~ - p2os_launch
-- ~~ - static_localizer
-- ~~ - move_base_msgs
-- ~~ - p2os_msgs
-- ~~ - ps3joy
-- ~~ - spacenav_node
-- ~~ - joy
-- ~~ - teleop_twist_joy
-- ~~ - fake_localization
-- ~~ - following
-- ~~ - map_server
-- ~~ - amcl
-- ~~ - p2os_driver
-- ~~ - p2os_teleop
-- ~~ - robot_pose_ekf
-- ~~ - rosaria
-- ~~ - p2os_urdf
-- ~~ - urg_node
-- ~~ - voxel_grid
-- ~~ - costmap_2d
-- ~~ - nav_core
-- ~~ - base_local_planner
-- ~~ - carrot_planner
-- ~~ - clear_costmap_recovery
-- ~~ - dwa_local_planner
-- ~~ - move_slow_and_clear
-- ~~ - navfn
-- ~~ - global_planner
-- ~~ - rotate_recovery
-- ~~ - move_base
-- ~~ - wiimote
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin metapackage: 'joystick_drivers'
-- ==> add_subdirectory(joystick_drivers/joystick_drivers)
-- +++ processing catkin metapackage: 'navigation'
-- ==> add_subdirectory(navigation/navigation)
-- +++ processing catkin package: 'p2os_doc'
-- ==> add_subdirectory(p2os/p2os_doc)
-- +++ processing catkin package: 'p2os_launch'
-- ==> add_subdirectory(p2os/p2os_launch)
-- +++ processing catkin package: 'static_localizer'
-- ==> add_subdirectory(static_localizer)
... Finds all the packages and creates all the subdirectories..
-- +++ processing catkin package: 'wiimote'
-- ==> add_subdirectory(joystick_drivers/wiimote)
-- Using these message generators: gencpp;genlisp;genpy
-- wiimote: 3 messages, 0 services
-- Configuring incomplete, errors occurred! See also "/home/thanos/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/thanos/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
In the CMakeErrors.log I get the following errors:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/thanos/catkin_ws/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec997468529/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec997468529.dir/build.make CMakeFiles/cmTryCompileExec997468529.dir/build
make[1]: Entering directory `/home/thanos/catkin_ws/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/thanos/catkin_ws/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec997468529.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTryCompileExec997468529.dir/CheckSymbolExists.c.o -c /home/thanos/catkin_ws/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec997468529
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec997468529.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTryCompileExec997468529.dir/CheckSymbolExists.c.o -o cmTryCompileExec997468529 -rdynamic
CMakeFiles/cmTryCompileExec997468529.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned ...
Slightly reformatted your question, to make it readable.
To update your question with more information, don't post anwers, but edit your question. There is an edit link (or button) right beneath where your question is displayed. Please use that for future updates.
Just a note: console output is easier to read if you format it as preformatted text. Use the button with
101010
on it: select the text, then click the button (orctrl+k
).The problem seems to be on separate packages. I followed the procedure mentioned in the answer and some packages are compiled properly and some others don't. Thank you for your precious help! I will try to fix the problem in the packages.