Example 2.8 Error - previous compiled with catkin_make

When trying to run the command
catkin build
in exercise 2.8. I keep getting back the error:
The build space at ‘/home/user/catkin_ws/build’ was previously built by ‘catkin_make’. Please remove the build space or pick a different build space.
It’s unclear what is wrong as I believe I have followed all the instructions up to this point precisely.
Any advice for fixing this error?

Hello @eschondorf ,

This error happens when mixing different compiling methods, as the error message says. In order to fix it, you need to remove the previously compiled files with:

cd ~/catkin_ws
rm -rf build/ devel/

I’ll update the instructions to avoid this confusion.



Doesn’t seem to be updated - I ran into this confusion today. (I had no idea what/where previously compiled files were)

That error is saying you cannot use catkin_make and catkin build for the same workspace. You have to choose one, and you need to remove the build and devel folders if you want to switch to the other.

Please only use catkin_make for the courses on the academy.