0
$\begingroup$

Rosanswers logo

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)

  1. Create and cd to an empty directory
  2. catkin config -s .
  3. catkin build
  4. ls devel, observe that various setup files are created
  5. catkin build again
  6. ls devel, observe that setup files are gone

Running the following seems to solve the issue

  1. rm -r .catkin_tools
  2. mkdir src
  3. catkin build
  4. ls devel, observe that various setup files are created
  5. catkin build again
  6. ls 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!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It seems to be an issue with using catkin in a workspace without a src directory (i.e. configured with catkin config -s). Issue reported at https://github.com/catkin/catkin_tools/issues/621

The workaround is to create the src directory and remove .catkin_tool so catkin uses its default configs (which expects packages to live inside the src directory)


Originally posted by Rufus with karma: 1083 on 2020-07-13

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.