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

catkin_make fails to build executables ROS indigo

$
0
0
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 1 exit status make[1]: *** [cmTryCompileExec997468529] Error 1 make[1]: Leaving directory `/home/thanos/catkin_ws/build/CMakeFiles/CMakeTmp' make: *** [cmTryCompileExec997468529/fast] Error 2 Determining if the include file FL/Fl.H exists failed with the following output: Change Dir: /home/thanos/catkin_ws/build/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec2890154973/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec2890154973.dir/build.make CMakeFiles/cmTryCompileExec2890154973.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 CXX object CMakeFiles/cmTryCompileExec2890154973.dir/CheckIncludeFile.cxx.o /usr/bin/c++ -Wno-deprecated -o CMakeFiles/cmTryCompileExec2890154973.dir/CheckIncludeFile.cxx.o -c /home/thanos/catkin_ws/build/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx /home/thanos/catkin_ws/build/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx:1:19: fatal error: FL/Fl.H: No such file or directory #include ^ compilation terminated. make[1]: *** [CMakeFiles/cmTryCompileExec2890154973.dir/CheckIncludeFile.cxx.o] Error 1 make[1]: Leaving directory `/home/thanos/catkin_ws/build/CMakeFiles/CMakeTmp' make: *** [cmTryCompileExec2890154973/fast] Error 2 Please any help would be more than welcome! --- Edit: The conclusion was derived from the fact that there are no lines about the C/C++ compiler anywhere in the `catkin_make`, as you mentioned. You are right about the CMake. The `catkin_make` command was working properly about a month ago. I have these problems without and significant changes in the system except for the regular updates. I installed ROS using this tutorial: http://wiki.ros.org/indigo/Installation/Ubuntu After facing this problem I re-initialized the workspace using the following tutorial: http://wiki.ros.org/catkin/Tutorials/create_a_workspace **os version:** Distributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS Release: 14.04 Codename: trusty **kernel version** 3.13.0-63-generic The output of `which gcc` is: `/usr/bin/gcc` **Edit:** The output of `catkin_make` in `/tmp/catkin_test/` is the following: Base path: /tmp/catkin_test Source space: /tmp/catkin_test/src Build space: /tmp/catkin_test/build Devel space: /tmp/catkin_test/devel Install space: /tmp/catkin_test/install Creating symlink "/tmp/catkin_test/src/CMakeLists.txt" pointing to "/opt/ros/indigo/share/catkin/cmake/toplevel.cmake" #### #### Running command: "cmake /tmp/catkin_test/src -DCATKIN_DEVEL_PREFIX=/tmp/catkin_test/devel -DCMAKE_INSTALL_PREFIX=/tmp/catkin_test/install -G Unix Makefiles" in "/tmp/catkin_test/build" #### -- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Using CATKIN_DEVEL_PREFIX: /tmp/catkin_test/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/indigo -- This workspace overlays: /opt/ros/indigo -- Found PythonInterp: /usr/bin/python (found version "2.7.6") -- 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: /tmp/catkin_test/build/test_results -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- 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 -- Configuring done -- Generating done -- Build files have been written to: /tmp/catkin_test/build #### #### Running command: "make -j8 -l8" in "/tmp/catkin_test/build" #### The output of `cmake --system-information`: Avoid ctest truncation of output: CTEST_FULL_OUTPUT MAIN VARIABLES CMAKE_STATIC_LIBRARY_PREFIX == "lib" CMAKE_STATIC_LIBRARY_SUFFIX == ".a" CMAKE_SHARED_LIBRARY_PREFIX == "lib" CMAKE_SHARED_LIBRARY_SUFFIX == ".so" CMAKE_SHARED_MODULE_PREFIX == "lib" CMAKE_SHARED_MODULE_SUFFIX == ".so" CMAKE_DL_LIBS == "dl" CMAKE_LIBRARY_PATH_FLAG == "-L" CMAKE_LINK_LIBRARY_FLAG == "-l" CMAKE_SKIP_RPATH == "NO" CMAKE_SYSTEM_INFO_FILE == "Platform/Linux" CMAKE_SYSTEM_NAME == "Linux" CMAKE_SYSTEM == "Linux-3.13.0-63-generic" CMAKE_CXX_COMPILER == "/usr/bin/c++" CMAKE_C_COMPILER == "/usr/bin/cc" CMAKE_COMPILER_IS_GNUCC == "1" CMAKE_COMPILER_IS_GNUCXX == "1" **Edit:** As I mentioned previously in my question I followed this tutorial [http://wiki.ros.org/catkin/Tutorials/create_a_workspace] (http://wiki.ros.org/catkin/Tutorials/create_a_workspace) in order to initialize my workspace. So after having this problem I saved the src folder of catkin_ws in another path and I erased everything under catkin_ws folder. The next step was to follow the instructions of the tutorial: source /opt/ros/indigo/setup.bash mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src catkin_init_workspace cd ~/catkin_ws/ catkin_make source devel/setup.bash Finally, I edited the `.bashrc` as mentioned previously, copied back the src folder, but nothing changed. **Output** of `env | grep -i ros` : ROS_ROOT=/opt/ros/indigo/share/ros ROS_PACKAGE_PATH=/home/thanos/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks ROS_MASTER_URI=http://localhost:11311 LD_LIBRARY_PATH=/home/thanos/catkin_ws/devel/lib:/home/thanos/catkin_ws/devel/lib/x86_64-linux-gnu:/opt/ros/indigo/lib/x86_64-linux-gnu:/opt/ros/indigo/lib CPATH=/home/thanos/catkin_ws/devel/include:/opt/ros/indigo/include PATH=/home/thanos/catkin_ws/devel/bin:/opt/ros/indigo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games ROSLISP_PACKAGE_DIRECTORIES=/home/thanos/catkin_ws/devel/share/common-lisp ROS_DISTRO=indigo PYTHONPATH=/home/thanos/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/indigo/lib/python2.7/dist-packages PKG_CONFIG_PATH=/home/thanos/catkin_ws/devel/lib/pkgconfig:/home/thanos/catkin_ws/devel/lib/x86_64-linux-gnu/pkgconfig:/opt/ros/indigo/lib/x86_64-linux-gnu/pkgconfig:/opt/ros/indigo/lib/pkgconfig CMAKE_PREFIX_PATH=/home/thanos/catkin_ws/devel:/opt/ros/indigo ROS_ETC_DIR=/opt/ros/indigo/etc/ros **Edit 4:** I removed both lines from the `.bashrc` and I opened a new 'clean' terminal I followed again the instructions from the tutorial mentioned above in order to initialize the workspace. With an empty src folder (without the packages) I ran the `catkin_make` command and the output is the following: 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" #### -- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Using CATKIN_DEVEL_PREFIX: /home/thanos/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/indigo -- This workspace overlays: /opt/ros/indigo -- Found PythonInterp: /usr/bin/python (found version "2.7.6") -- 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 -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- 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 -- Configuring done -- Generating done -- Build files have been written to: /home/thanos/catkin_ws/build #### #### Running command: "make -j8 -l8" in "/home/thanos/catkin_ws/build" #### The next step is to run the `source devel/setup.bash` command of the tutorial and the last command echo $ROS_PACKAGE_PATH /home/thanos/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks So I am at this point right now.

Viewing all articles
Browse latest Browse all 417

Trending Articles



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