catkin only generates setup files every other build
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
What versions do you experience this with? Can you reproduce this on another system/workspace?
@mgruhler This is happening on ros melodic, it's happening on multiple PCs and multiple workspaces
@Rufus I meant what versions of catkin-tools. run
apt-cache policy <PKG>
orapt-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).
@mgruhler i'm using
catkin_tools 0.6.1
. There are no build errors.@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!
@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
Have you tried cleaning the workspace?
@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.