For some reason, catkin build
does not always generate the various setup.sh
files when I run it.
Running catkin build
once, the contents of the devel
directory is as follows:
cmake.lock etc include lib share
Running catkin build
again:
cmake.lock include local_setup.sh setup.sh share
env.sh lib local_setup.zsh _setup_util.py
etc local_setup.bash setup.bash setup.zsh
Running catkin build
yet again:
cmake.lock etc include lib share
Why is this happening?
I am using catkin_tools 0.6.1
with ROS melodic.
Edit 2 (SSCCE)
- Create and cd to an empty directory
catkin config -s .
catkin build
ls devel
, observe that various setup files are createdcatkin build
againls devel
, observe that setup files are gone
Running the following seems to solve the issue
rm -r .catkin_tools
mkdir src
catkin build
ls devel
, observe that various setup files are createdcatkin build
againls devel
, setup files are still present
Originally posted by Rufus on ROS Answers with karma: 1083 on 2020-07-08
Post score: 0
Original comments
Comment by mgruhler on 2020-07-09:
What versions do you experience this with? Can you reproduce this on another system/workspace?
Comment by Rufus on 2020-07-12:
@mgruhler This is happening on ros melodic, it's happening on multiple PCs and multiple workspaces
Comment by mgruhler on 2020-07-13:
@Rufus I meant what versions of catkin-tools. run apt-cache policy <PKG>
or apt-cache madison <PKG>
for all relevant packages. Or specify the commit version if cloned from source.
I'm assuming you don't have any build errors when running catkin build
and that everything is set up correctly.
As this is something very basic, I'm assuming it has something to do with your particular setup rather than with the package itself. Would be interesting to see if you can reproduce this with an empty workspace and only extending /opt/ros/melodic
....
If this is actually reproducible with a vanilla OS, vanilla ROS install, vanilla from-apt catkin-tools, you should probably file a bug on github (and link to/from this Q&A).
Comment by Rufus on 2020-07-13:
@mgruhler i'm using catkin_tools 0.6.1
. There are no build errors.
Comment by mgruhler on 2020-07-13:
@Rufus, I cannot reproduce this. I guess you'd need to create an SSCCE with which reproducing this is possible. If you can reproduce this over multiple machines and workspaces, you need to find the smallest common set of packages/whatever that leads to this.
Also, please confirm that this issue is also present with an empty workspace!
Comment by Rufus on 2020-07-13:
@mgruhler The problem does not appear with a blank newly created workspace.
However, when I CATKIN_IGNORE all the packages in my workspace, the problem still occurs. I updated the question with the output of the build when the problem occurs
Comment by mgruhler on 2020-07-13:
Have you tried cleaning the workspace?
Comment by mgruhler on 2020-07-13:
@Rufus good find. I can reproduce this now. Seems there is an issue if the config is generated in the source directory. This is something that could be expected behavior (i.e. the config should not be in the source directory). But with this find, I'd suggest you post this as a bug on github.
If I understand you correctly, you've fixed your issue by adding the src
subdirectory. It might make sense to add this as an answer here and mark it as answered (or close the question). thank you.
Comment by Rufus on 2020-07-13:
Issue created at https://github.com/catkin/catkin_tools/issues/621, thx for the assistance!