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

Incorrect PYTHONPATH on gentoo #632

Closed
Antagonistic opened this issue May 14, 2014 · 7 comments
Closed

Incorrect PYTHONPATH on gentoo #632

Antagonistic opened this issue May 14, 2014 · 7 comments

Comments

@Antagonistic
Copy link

Recently gone though the ROS from source install process for gentoo. Biggest issue I've hit (so far) is a pathing problem for the installed python scripts.

Running the command:

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space=/opt/ros/hydro

installs the catkin (and actually all future) python scripts into:

/opt/ros/hydro/lib64/python2.7/site-packages

while _setup_util.py adds a path to:

lib/python2.7/site-packages

which results in a lot of python module not found errors.

Worked around in my case by running:

PYTHONPATH="/opt/ros/hydro/lib64/python2.7/site-packages/" ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space=/opt/ros/hydro

As an aside, there are a lot of .so files being installed into /opt/ros/hydro/lib, including opencv, so this seems only a python installation issue.

@wjwwood
Copy link
Member

wjwwood commented May 14, 2014

Probably a similar to #604 and #545.

@wyc
Copy link
Member

wyc commented May 22, 2014

Narrowed down the issue to these two lines:
https://github.com/ros/catkin/blob/indigo-devel/python/catkin/builder.py#L273
https://github.com/ros/catkin/blob/indigo-devel/cmake/python.cmake#L35

There needs to be a platform-agnostic way of specifying lib vs. lib64. Could we use something like this in both scripts?

# gentoo
 $ python -c 'import site; print("/".join(site.getsitepackages()[0].split("/")[-3:]));'
lib64/python2.7/site-packages

# debian
$ python -c 'import site; print("/".join(site.getsitepackages()[0].split("/")[-3:]));'
lib/python2.7/dist-packages

The script would have to be Unix-only or amended to support windows too.

Thanks to @wjwwood for suggesting to ask Python.

@wyc
Copy link
Member

wyc commented May 22, 2014

Please see #636

@spaghetti-
Copy link

spaghetti- commented Oct 16, 2016

still a broken on current kinetic. I can verify that #636 works on Gentoo (Portage 2.2.28 (python 2.7.10-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.22-r4, 4.4.6-gentoo x86_64)).

@dirk-thomas
Copy link
Member

Since #636 has been closed I just want to mentioned the follow up PR #831 here.

cwecht pushed a commit to cwecht/catkin that referenced this issue Mar 20, 2018
@dirk-thomas
Copy link
Member

Closing due to inactivity.

@allenh1
Copy link
Contributor

allenh1 commented Aug 12, 2019

For anyone looking here for this issue, you don't need to use catkin_make_isolated to build your setup because the ROS Overlay now has generated ebuilds for most packages (there's a few with dependency problems, but most of these are few in number).

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

6 participants