ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

catkin_make error, build files are written in the wrong folder

asked 2014-11-21 09:23:59 -0500

eo gravatar image

updated 2014-11-24 02:07:01 -0500


I have a problem compiling my packages. When running catkin_make, it crashes with:

-- Generating done
-- Build files have been written to: /home/..../catkin_ws/src
#### Running command: "make -j4 -l4" in "/home/.../catkin_ws/build"
make: *** No targets specified and no makefile found.  Stop.
Invoking "make" failed

Does anybody have any suggestion what the cause could be?

Thank you in advance!


Hi, I apologize for the little info. I created a catkin work-space as described by the tutorial, I have a src directory in it with the corresponding packages, and the necessary files. I actually had already everything up and running = I had all my packages compiled and up and running. After a git update and some compilation errors I deleted the build and the devel directories in order to build everything again. In the catkin-workspace I used catkin_make to build the packages. It states that the build directory is .....\build and the src directory is...\src so it has the right structure but than it crashes with the error that it does not find the makefiles etc in ...\build. It actually generated all the makefiles but it copied them in the src folder. I have no idea why :(

Thank you for any help!


Base path: /home/pr/catkin_ws
Source space: /home/pr/catkin_ws/src
Build space: /home/pr/catkin_ws/build
Devel space: /home/pr/catkin_ws/devel
Install space: /home/pr/catkin_ws/install
#### Running command: "cmake /home/pr/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/pr/catkin_ws/devel -
DCMAKE_INSTALL_PREFIX=/home/pr/catkin_ws/install" in "/home/pr/catkin_ws/build"
[ ....]
Build files have been written to: /home/pr/catkin_ws/src
edit retag flag offensive close merge delete


There isn't enough information, how are you invoking catkin_make?

William gravatar image William  ( 2014-11-21 13:09:45 -0500 )edit

You have certainly diverged from the tutorial since the reference of "/home/..../" is wrong. Please post all exact steps you do starting from the very beginning. Only then we can point you to what might be the problem.

Dirk Thomas gravatar image Dirk Thomas  ( 2014-11-23 12:15:12 -0500 )edit

Did you do catkin_init_workspace in your catkin_ws/src folder? Also catkin_make should be executed in catkin_ws folder. Please describe the exact steps followed so that we can know where you went wrong.

Bhargav gravatar image Bhargav  ( 2014-11-23 12:46:53 -0500 )edit

Hi, I have performed catkin_init_workspace in the src directory and also performed catkin_make in the workspace directory. Please see output in the second update of my post. I will create a new workspace and see if it solves the issue. thank you!

eo gravatar image eo  ( 2014-11-24 02:12:52 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-11-23 20:51:34 -0500

sukha gravatar image

If files in your ./src folder are right, I don't the operation you take will lead this kind of crash. Have you ever try to recreate another workspace and build? I think it maybe is a quick way to solve the problem.

edit flag offensive delete link more

answered 2014-11-24 07:45:29 -0500

eo gravatar image


meanwhile i managed to solve the issue. I cannot tell exactly why the error occured. I had a couple of Makefiles in the src directory which apparently caused the entire mess. I deleted them and everything works as expected. Thank you for all suggestions!

edit flag offensive delete link more


This was my problem also, thanks a bunch!

kotoko gravatar image kotoko  ( 2016-08-09 04:38:10 -0500 )edit

Question Tools


Asked: 2014-11-21 09:23:59 -0500

Seen: 2,218 times

Last updated: Nov 24 '14