Why does sourcing my workspace cause the error "catkin_make: command not found"?
I've been messing around with my catkin workspace in an attempt to get QtCreator working with ROS (Indigo Igloo, Ubuntu 14.04, QtCreator 5.9.1), and somewhere along the way I've messed up something important. So now, if I run:
$ source /opt/ros/indigo/setup.bash
$ cd repo/workspace/
$ catkin_make
Everything builds properly, but if I source my workspace between sourcing the ROS distro and running catkin_make
then the command fails. I.e. if I run:
$ source /opt/ros/indigo/setup.bash
$ source /home/user/repo/workspace/devel/setup.bash
$ cd repo/workspace/
$ catkin_make
Then I get the following error
catkin_make: command not found
Does anyone know why this is the case? Obviously, there is something wrong with my setup but I don't understand enough about CMake to figure it out. I'm also not sure what diagnostic info I need to post here to help others, so if there is something specific about my setup that I should post here, let me know. Thanks in advance for any help or advice.
Updates
As per @psammut's comments, I tried copying all the source code into a new workspace. I can run catkin_make
in the new workspace just fine, regardless of whether it is sourced or not. But the minute I source my original workspace, catkin_make
throws an error in either workspace.
As per @ahendrix's answer. If I build my workspace with Qt (or try to since it fails when Qt tries) and the Qt CMAKE_PREFIX_PATH
is set to "/home/user/Qt/5.9.1/gcc_64", my PATH
variable looks like this before and after sourcing the workspace:
Before:
/opt/ros/indigo/bin:/home/user/.nvm/versions/...
After:
/home/user/Qt/5.9.1/gcc_64/bin:/home/user/.nvm/versions/...
Hate to be that guy, but if you installed ros from the binaries, have you tried just uninstalling and re-installing?
Also, another suggestion, if you didn't touch the ros files and re-installing is not the cause of the problem, simply make a new workspace and just transfer over the source files to it. Then rebuild and try again.
No worries, re-installing is definitely an option (done it before). But I'd like to leave it as a last resort, if only because I'll (hopefully) learn something if I can solve the underlying problem. I'll try your suggestion of a new workspace and report back.
So... HOW IN THE WORLD DO WE PROPERLY SET UP QT 5 LIBS!?!?!
@DrewHamilton You should create a new question and reference this one. That'll give your issue more visibility