I am trying to build ROS Indigo from source on Debian Jessie, following these instructions. So far, I have successfully built the ros_comm
variant and can run roscore
. I'm now trying to build the robot
variant. 20 of 116 packages get built successfully, but the build fails when it gets to 'orocos_kdl'. Here is the full error output:
==> Processing plain cmake package: 'orocos_kdl'
==> Creating build directory: 'build_isolated/orocos_kdl/install'
==> Building with env: '/opt/ros/indigo/env.sh'
==> cmake /home/larics/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl -DCMAKE_INSTALL_PREFIX=/opt/ros/indigo -DCMAKE_BUILD_TYPE=Release -G Unix Makefiles in '/home/larics/ros_catkin_ws/build_isolated/orocos_kdl/install'
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- 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
Orocos KDL version (1.3.0)
Build type set to 'Release' by user.
-- Eigen found (include: /usr/include/eigen3)
-- Performing Test HAVE_STL_CONTAINER_INCOMPLETE_TYPES
-- Performing Test HAVE_STL_CONTAINER_INCOMPLETE_TYPES - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/larics/ros_catkin_ws/build_isolated/orocos_kdl/install
==> make -j2 -l2 in '/home/larics/ros_catkin_ws/build_isolated/orocos_kdl/install'
Scanning dependencies of target orocos-kdl
[ 3%] [ 3%] Building CXX object src/CMakeFiles/orocos-kdl.dir/segment.cpp.o
Building CXX object src/CMakeFiles/orocos-kdl.dir/chainiksolvervel_pinv_givens.cpp.o
c++: error: CMakeFiles/orocos-kdl.dir/segment.cpp.o: No such file or directory
c++: error: CMakeFiles/orocos-kdl.dir/chainiksolvervel_pinv_givens.cpp.o: No such file or directory
src/CMakeFiles/orocos-kdl.dir/build.make:54: recipe for target 'src/CMakeFiles/orocos-kdl.dir/chainiksolvervel_pinv_givens.cpp.o' failed
make[2]: *** [src/CMakeFiles/orocos-kdl.dir/chainiksolvervel_pinv_givens.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
src/CMakeFiles/orocos-kdl.dir/build.make:77: recipe for target 'src/CMakeFiles/orocos-kdl.dir/segment.cpp.o' failed
make[2]: *** [src/CMakeFiles/orocos-kdl.dir/segment.cpp.o] Error 1
CMakeFiles/Makefile2:121: recipe for target 'src/CMakeFiles/orocos-kdl.dir/all' failed
make[1]: *** [src/CMakeFiles/orocos-kdl.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'orocos_kdl':
Command '['/opt/ros/indigo/env.sh', 'make', '-j2', '-l2']' returned non-zero exit status 2
Reproduce this error by running:
==> cd /home/larics/ros_catkin_ws/build_isolated/orocos_kdl && /opt/ros/indigo/env.sh make -j2 -l2
Command failed, exiting.
I can't really understand what went wrong, seems like segment.cpp.o
and chainiksolvervel_pinv_givens.cpp.o
do not get built correctly, but I don't understand why. Copying the whole orocos_kdl
folder to my other machine running Ubuntu Precise and building it there works flawlessly. I'm suspecting it might have something to do with the CMake version (Debian has CMake 3.0, while Ubuntu has 2.8.9).
Any help will be greately appreciated!
EDIT 1:
I have been digging around a bit and found out the following. Passing VERBOSE=1
to make
indicates that
/usr/bin/c++ -Dorocos_kdl_EXPORTS -O3 -DNDEBUG -fPIC -I/home/larics/testing/orocos_kinematics_dynamics-master/orocos_kdl/build/src -I -o CMakeFiles/orocos-kdl.dir/chainiksolvervel_pinv_givens.cpp.o -c /home/larics/testing/orocos_kinematics_dynamics-master/orocos_kdl/src/chainiksolvervel_pinv_givens.cpp
is the line that fails. If I change this so that the output name flag is at the end of the compiler command line:
/usr/bin/c++ -Dorocos_kdl_EXPORTS -O3 -DNDEBUG -fPIC -I/home/larics/testing/orocos_kinematics_dynamics-master/orocos_kdl/build/src -I -c /home/larics/testing/orocos_kinematics_dynamics-master/orocos_kdl/src/chainiksolvervel_pinv_givens.cpp -o CMakeFiles/orocos-kdl.dir/chainiksolvervel_pinv_givens.cpp.o
this gets me one step further, i.e. the compilation of chainiksolvervel_pinv_givens.cpp
starts. It then fails immediately for failing to find Eigen/Core
which is weird, because Eigen/Core
is installed, but I think this is a separate issue.
In short, I seem to be having a variation of this problem, but affecting the compiler. I could not find any reference on the web of such behavior. Could this be due to some error in the way my build environment is configured?
Originally posted by damjan on ROS Answers with karma: 446 on 2015-05-31
Post score: 0
Original comments
Comment by ahendrix on 2015-05-31:
That's a rather strange error; it suggests that the directory that the build system is expecting hasn't been created for some reason; perhaps your disk is full?
Comment by damjan on 2015-06-01:
The disk is only 30% used, the directory is created. Also, CMake version doesn't seem to be the issue. I have tried CMake 2.8.9 and 3.0.2, both work on Ubuntu Precise, none work on Debian Jessie. The one difference I notice is that the file build order is different on the two systems. I'm stumped
Comment by ahendrix on 2015-06-01:
It looks like you've narrowed it down to the compiler. Perhaps Debian is using a different compiler or a different version of gcc than Ubuntu? Do you have distcc or ccache turned on?
Comment by damjan on 2015-06-01:
I would say no, unless they are turned on automatically by CMake/catkin, because I haven't turned them on manually, but I'll check tomorrow when I get back to work. Thanks for helping me out with this!
Comment by damjan on 2015-06-02:
Ubuntu 12.04 is using gcc 4.6, Ubuntu 14.04 is using gcc 4.8 and Debian Jessie is using 4.9. I can build orocos_kdl on both Ubuntu versions without problems, but the build fails on Debian. I have also installed gcc 4.8 on Debian and tried building with that, but I get the same error.
Comment by damjan on 2015-06-02:
Neither distcc nor ccache are installed on the Debian machine.