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

.catkin file and symlinked home dir #424

Closed
hershwg opened this issue May 21, 2013 · 4 comments
Closed

.catkin file and symlinked home dir #424

hershwg opened this issue May 21, 2013 · 4 comments

Comments

@hershwg
Copy link
Member

hershwg commented May 21, 2013

I am frequently having this problem where my devel/.catkin file gets to looking like this:

/u/hersh/ros_workspace/src;/wg/stor2a/hersh/ros_workspace/src

but

hersh@spf$ ls -l /u/hersh
lrwxrwxrwx 1 root root 16 Sep 13  2010 /u/hersh -> /wg/stor2a/hersh

So /u/hersh is a symlink to /wg/stor2a/hersh.

Sometimes catkin thinks I am working from one side of the symlink and sometimes it thinks I'm working from the other side.

I wouldn't care except I get errors like this:

multiple files named [something.launch] in package [something]:
- /u/hersh/ros_workspace/src/something/something.launch
- /wg/stor2a/hersh/ros_workspace/src/something/something.launch

So clearly roslaunch could be changed to notice that they are the same file, but the more root-cause way would be to change whatever writes into .catkin and have that do the checking. Looks to me like the catkin cmake files are what writes into devel/.catkin.

Any time I get the above error I fix it by removing one of the entries from the .catkin file, but it took a long time to find that the .catkin file was the source of the problem. Removing it every time doesn't seem like a proper fix either.

Thanks

@dirk-thomas
Copy link
Member

Can you please describe the steps when both of these folders are getting added? It sounds like it does not happen always.

@hershwg
Copy link
Member Author

hershwg commented May 21, 2013

I've tried to reproduce it in an example catkin workspace but it doesn't seem to happen. In my big actual workspace it happens a few times per day, and generally seems to happen after a "catkin_make" or after a "cd build; make".

I have also noticed that after doing a catkin_make and source-ing the setup.bash and doing "roscd something", it takes me to /wg/stor2a/hersh/ros_workspace/src/something, which is the "real" location instead of /u/hersh/..., which is what $HOME is set to. I've tried running make and catkin_make from both sides of the symlink in the toy version, but it doesn't seem to be causing the problem.

@dirk-thomas
Copy link
Member

As far as I can see from the code catkin_make always uses the os.path.abspath which mean the "real" path.

The only way I could think of would be if you invoked plain cmake. Therefore you would have needed to call it with -DCATKIN_DEVEL_PREFIX=path/to/devel. Could that be what you have done before?

@hershwg
Copy link
Member Author

hershwg commented May 23, 2013

This did indeed fix my problem. Thanks for the great service! :)

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

No branches or pull requests

2 participants