Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No setup.bash #87

Closed
davetcoleman opened this issue Jul 22, 2014 · 13 comments · Fixed by #276
Closed

No setup.bash #87

davetcoleman opened this issue Jul 22, 2014 · 13 comments · Fixed by #276

Comments

@davetcoleman
Copy link
Contributor

I have a workspace that has 1 catkin package and 1 non-catkin package (OMPL). After building the workspace (catkin build) it only has as setup.sh file, not a setup.bash file. Why is this? Is something wrong? All my other workspaces have a setup.bash file which is what Im used to sourcing on Ubuntu 12.04.

@davetcoleman
Copy link
Contributor Author

I just realized that the workspace had actually just 1 non-catkin package and NO catkin packages in it. A while back I removed the catkin package because of dependency issues and I had forgotten. As a result, the workspace did not behave correctly when I rebuilt everything today. I think we might want to put an error/warning if this happens, because it squandered a day for me.

@wjwwood
Copy link
Member

wjwwood commented Jul 22, 2014

I don't know why this is happening off-hand, I guess non-catkin packages may not have setup.bash generated for them and we never noticed because building one, non-catkin package in a workspace is sort of odd since you could just build it without the workspace.

Either way this is probably a bug, you should be able to build a single package (regardless of the build type) in a workspace correctly.

I think we might want to put an error/warning if this happens

I think the correct solution is not make sure it doesn't happen.

because it squandered a day for me.

Surely you are being hyperbolic...

@jbohren
Copy link
Contributor

jbohren commented Jul 22, 2014

I don't know why this is happening off-hand, I guess non-catkin packages may not have setup.bash generated for them and we never noticed because building one, non-catkin package in a workspace is sort of odd since you could just build it without the workspace.

Yeah, as far as I understand it after patching that race condition is that the setup.* files are generated by the Catkin CMake code, which doesn't get run if you don't have a catkin package in your workspace.

I suggest that we run CMake in executable mode from catkin build to directly call the catkin CMake functions which generate these things.

@wjwwood
Copy link
Member

wjwwood commented Jul 22, 2014

I suggest that we run CMake in executable mode from catkin build to directly call the catkin CMake functions which generate these things.

That might work, but I'm not 100% sure that will work, because those functions may require things not provided by a non-catkin package. If it doesn't work we will just have to build a generic setup.bash file for non-catkin packages.

@davetcoleman
Copy link
Contributor Author

because it squandered a day for me.

It was a combination of this particular bug and other catkin issues that did take an entire day to fix. When I moved the catkin packages in said workspace into another workspace, due to a dependency change, I never rebuilt everything (delete devel and build) and so I had some really weird ghost linking issues and runtime crashes that I thought were caused by bugs in my code.

@scpeters
Copy link
Contributor

scpeters commented May 8, 2015

I've noticed the same problem, since I use catkin_tools for plain cmake packages quite often. I don't know why it happens either, but a solution is to clone https://github.com/ros/catkin.git into the workspace src folder. This is what I will recommend to users building gazebo using catkin, unless this issue is someday resolved.

@davetcoleman
Copy link
Contributor Author

I believe you could just use an empty catkin package, e.g. catkin_create_pkg dummy roscpp

@scpeters
Copy link
Contributor

scpeters commented May 8, 2015

Note that cloning catkin into the workspace src folder doesn't require ROS to be installed or sourced.

@davetcoleman
Copy link
Contributor Author

ah good point

@jbohren
Copy link
Contributor

jbohren commented May 9, 2015

@scpeters @davetcoleman As an aside, my "linked-devel" prototype that supports cleaning individual packages will automatically generate setup files in the devel / install space even if you don't have a catkin package in your workspace.

@scpeters
Copy link
Contributor

@jbohren thanks for the heads-up; that sounds like a nice set of new features that would resolve this issue. I'll keep my eye on it.

@davetcoleman
Copy link
Contributor Author

I'm setting up a new workspace and just re-ran into this problem, I'm going to re-open atleast until #196 is merged in

@davetcoleman davetcoleman reopened this May 31, 2015
@scpeters
Copy link
Contributor

scpeters commented Jun 1, 2015

Don't forget the workaround of cloning catkin into the workspace src folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants