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

LD_LIBRARY_PATH stripped when explicitly extending workspace #350

Closed
mikepurvis opened this issue Apr 20, 2016 · 7 comments · Fixed by #353
Closed

LD_LIBRARY_PATH stripped when explicitly extending workspace #350

mikepurvis opened this issue Apr 20, 2016 · 7 comments · Fixed by #353

Comments

@mikepurvis
Copy link
Member

mikepurvis commented Apr 20, 2016

System Info

  • Operating System: Linux 3.16.0-69-generic x86_64 x86_64 x86_64 GNU/Linux
  • Python Version: Python 2.7.6
  • Version of catkin_tools: 0.4.2-1
  • ROS Distro: indigo

Build / Run Issue

I'm building two catkin workspace inside a dpkg-buildpackage environment, one which extends the other. The first one (which starts with catkin) succeeds, and then the second one bails out right at the beginning, with the first thing it tries to build, which is catkin_tools_prebuild for a linked develspace or the first actual package with isolated develspace.

Error is:

ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
@jbohren
Copy link
Contributor

jbohren commented Apr 20, 2016

@mikepurvis Does this happen if both workspaces have merged or isolated develspaces?

@mikepurvis
Copy link
Member Author

Both workspaces are merged installspaces, and the second extends the first's installspace. I'm working on a MWE for you.

@jbohren jbohren modified the milestone: 0.4.x - Beta 2 Patches Apr 20, 2016
@mikepurvis
Copy link
Member Author

The issue is that the --extend option is wiping out LD_LIBRARY_PATH. On the first build, I get:

echo ${LD_PRELOAD}
libfakeroot-sysv.so
echo ${LD_LIBRARY_PATH}
/usr/lib/x86_64-linux-gnu/libfakeroot:/usr/lib64/libfakeroot:/usr/lib32/libfakeroot:

After sourcing that, I still have LD_PRELOAD set, but now:

echo $LD_LIBRARY_PATH
/home/mpurvis/rosbundles/build/clearpath-1.7pre/clearpath-1.7pre_20160420205118/debian/tmp/opt/clearpath/1.7pre/demo1/lib

So I can no longer find the specified library. I can probably hack around this by mangling the path post-sourcing, but this is something catkin_tools needs to handle better.

@jbohren
Copy link
Contributor

jbohren commented Apr 20, 2016

The issue is that the --extend option is wiping out LD_LIBRARY_PATH.

So if you build with an implicit underlay do you see the same problem?

@mikepurvis
Copy link
Member Author

I believe so, yeah (but I don't see the problem with 0.3.x, with either explicit or implicit extension).

@jbohren
Copy link
Contributor

jbohren commented Apr 20, 2016

but I don't see the problem with 0.3.x, with either explicit or implicit extension

Alright. It would be great to have a complete out-of-the-box repro, when you have time to put it together. I suspect the resultspace loading is cleaning out variables that should be making it through.

@mikepurvis
Copy link
Member Author

mikepurvis commented Apr 21, 2016

Here you are:

git clone --recursive https://github.com/mikepurvis/catkin_tools_350.git
cd catkin_tools_350
./run  # happiness
git clean -fdx
fakeroot ./run  # sadness

EDIT: Interesting— if I change the overlay to extend implicitly, it actually does succeed. So that may be an acceptable workaround for now.

@mikepurvis mikepurvis changed the title LD_PRELOAD issue with catkin build inside dpkg-buildpackage LD_LIBRARY_PATH stripped when explicitly extending workspace Apr 21, 2016
jbohren added a commit that referenced this issue Apr 21, 2016
…environment if there are no env hooks in the resultspace (fixes #350)
wjwwood pushed a commit that referenced this issue Apr 22, 2016
* resultspace: Fixing environment cache checking which could blow away environment if there are no env hooks in the resultspace (fixes #350)

* resultspace: Base loaded resultspace env off of current environment, unless otherwise specified

* resultspace: Avoid caching issue when loading the same resultspace with different base environments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants