ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Invoking "make -j4 -l4" failed


#1

Hi all
I was following the manual to install ros on Ubuntu 16.04
http://emanual.robotis.com/docs/en/platform/turtlebot3/pc_setup/#pc-setup
When I reach this command : cd ~/catkin_ws && catkin_make
I get this error
Base path: /home/basma/catkin_ws
Source space: /home/basma/catkin_ws/src
Build space: /home/basma/catkin_ws/build
Devel space: /home/basma/catkin_ws/devel
Install space: /home/basma/catkin_ws/install

Running command: “make cmake_check_build_system” in “/home/basma/catkin_ws/build”

Running command: “make -j4 -l4” in “/home/basma/catkin_ws/build”

[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target sensor_msgs_generate_messages_lisp
[ 0%] Built target _turtlebot3_msgs_generate_messages_check_deps_Sound
[ 0%] Built target _turtlebot3_msgs_generate_messages_check_deps_PanoramaImg
[ 0%] Built target _turtlebot3_msgs_generate_messages_check_deps_TakePanorama
[ 0%] Built target _turtlebot3_msgs_generate_messages_check_deps_SensorState
[ 0%] Built target sensor_msgs_generate_messages_py
[ 0%] Built target std_msgs_generate_messages_py
[ 0%] Built target _turtlebot3_msgs_generate_messages_check_deps_SetFollowState
[ 0%] Built target sensor_msgs_generate_messages_eus
[ 0%] Built target _turtlebot3_msgs_generate_messages_check_deps_VersionInfo
[ 0%] Built target sensor_msgs_generate_messages_cpp
[ 0%] Built target std_msgs_generate_messages_eus
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target sensor_msgs_generate_messages_nodejs
[ 1%] Building CXX object my_first_pkg/CMakeFiles/hello_node.dir/src/hello.cpp.o
[ 1%] Built target std_msgs_generate_messages_nodejs
/home/basma/catkin_ws/src/my_first_pkg/src/hello.cpp:2:21: fatal error: ros/ros.h: No such file or directory
compilation terminated.
[ 1%] Built target diagnostic_msgs_generate_messages_lisp
[ 1%] Built target geometry_msgs_generate_messages_cpp
[ 1%] Built target geometry_msgs_generate_messages_eus
[ 1%] Built target geometry_msgs_generate_messages_lisp
[ 1%] Built target geometry_msgs_generate_messages_nodejs
my_first_pkg/CMakeFiles/hello_node.dir/build.make:62: recipe for target ‘my_first_pkg/CMakeFiles/hello_node.dir/src/hello.cpp.o’ failed
make[2]: *** [my_first_pkg/CMakeFiles/hello_node.dir/src/hello.cpp.o] Error 1
CMakeFiles/Makefile2:1625: recipe for target ‘my_first_pkg/CMakeFiles/hello_node.dir/all’ failed
make[1]: *** [my_first_pkg/CMakeFiles/hello_node.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 1%] Built target geometry_msgs_generate_messages_py
[ 1%] Built target roscpp_generate_messages_nodejs
[ 1%] Built target roscpp_generate_messages_lisp
Makefile:138: recipe for target ‘all’ failed
make: *** [all] Error 2
Invoking “make -j4 -l4” failed
Can anybody help me???


#2

Thanks for your question. However we ask that you please ask questions on http://answers.ros.org following our support guidelines: http://wiki.ros.org/Support

In short, this is not a turtlebot3 issue. You have a problem with my_first_pkg’s ‘hello.cpp’ file. Removing the ‘my_first_pkg’ package in the ‘catkin_ws/src/’ directory will solve this problem. :slight_smile:


#3

I did and my problem is solved
Thanks a lot