# can not compile by catkin_make but catkin build

Hi, everyone. My environment is Ubuntu 16.04 and ROS Kinetic.

I meet a strange question about catkin_make commend. Before I could compile the packages both one package and more than one. I mean that I could run it in two types of packages:

Condition 1: workspace/src/codes. In this condition, I have not created a file fold to make the codes together and name a package name of fold.

Condition 2: workspace/src/pakage fold/codes

. There is a file fold named with package.

But today, I can only compile with condition 1 not condition 2, whatever the packages are got from github or written by myself. I am sure that the packages I have tried to compile or re-compile are all no-errors before. But the terminal only tells me that :

src/package.xml does not exist.

Is there someone who can help me? Thanks!

Update

I can use catkin build to complete the codes compiling and the packages can run normally. But catkin_make can not work yet, including those easy codes I wrote before.

edit retag close merge delete

catkin_make can only be executed in the root of your workspace. For your case this would mean in workspace, where it is then looking for an existing src folder. There must have been something set up strangely if it worked somewhere else.
catkin build actually can be executed from anywhere below (and including) workspace. So this would explain why this is working there.