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

setup.zsh corrupts PATH #1005

Closed
janEbert opened this issue Apr 30, 2019 · 2 comments
Closed

setup.zsh corrupts PATH #1005

janEbert opened this issue Apr 30, 2019 · 2 comments

Comments

@janEbert
Copy link

Hey, I am on Kinetic using Zsh with oh-my-zsh on a netboot machine.
When sourcing the setup.zsh in my catkin devel space, my PATH gets all messed up.

$ catkin clean --force --yes && catkin b
$ source [...]/devel/setup.zsh
/opt/ros/kinetic/etc/catkin/profile.d/00.rtt.sh:10: command not found: grep
/opt/ros/kinetic/etc/catkin/profile.d/00.rtt.sh:10: command not found: grep
/opt/ros/kinetic/etc/catkin/profile.d/00.rtt.sh:10: command not found: grep
/opt/ros/kinetic/etc/catkin/profile.d/00.rtt.sh:10: command not found: grep
/opt/ros/kinetic/etc/catkin/profile.d/1.ros_package_path.sh:4: command not found: cat
/opt/ros/kinetic/etc/catkin/profile.d/99.roslisp.sh:4: command not found: cat
/opt/ros/kinetic/etc/catkin/profile.d/99.roslisp.sh:21: command not found: python
prompt_status:5: command not found: wc
$ echo $PATH
/opt/ros/kinetic/share/euslisp/jskeus/eus//Linux64/bin:/opt/ros/kinetic
prompt_status:5: command not found: wc

This comment in #686 (and consequent PR #688) fixes the problem again but was not merged in favor of #692.

At least for me, the previously proposed solution (#688) works where the second (#692) doesn't. :)

I have also tried multiple ways of emulating other shells using Zsh, some of which did not end in an error, but which did not correctly set all environment variables.
For example, emulate sh -c 'source [...]/devel/setup.sh' did not add the catkin devel space's Python site-packages to PYTHONPATH although other paths were not missing from it.

@dirk-thomas
Copy link
Member

I tried to reproduce the problem with the ROS Melodic Debian packages and I was able to source /opt/ros/melodic/setup.zsh in a zsh shell just fine.

Please try to reproduce the problem with the current ROS distro, with either the binaries or a build using catkin_make(_isolated) and no additional packages (e.g. the one which provides 00.rtt.sh) in order to narrow down where the problem is.

@janEbert
Copy link
Author

We switched to Melodic now and everything works fine just like you said. :)
Thanks!

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

No branches or pull requests

2 participants