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

consider including own glibc in toolchains #5329

Open
boegel opened this issue Nov 11, 2017 · 1 comment
Open

consider including own glibc in toolchains #5329

boegel opened this issue Nov 11, 2017 · 1 comment

Comments

@boegel
Copy link
Member

boegel commented Nov 11, 2017

Some useful info on this I just ran into: https://stackoverflow.com/questions/847179/multiple-glibc-libraries-on-a-single-host/851229#851229

@bartoldeman
Copy link
Contributor

See also the prefix-standalone method used by Gentoo prefix: https://wiki.gentoo.org/wiki/Project:Prefix/Technical_Documentation#Search_pathes

The main thing to consider is that you cannot set LD_LIBRARY_PATH to a 2nd glibc as that breaks system binaries such as /bin/bash. You can set the path using rpath, or probably more naturally by using the dynamic loader e.g. ld-linux-x86-64.so.2 that comes with that glibc, and uses its prefix instead of /lib64 or /usr/lib64 to search for libraries as the last place to look.

Note that glibc can be compiled using user-defined-trusted-dirs=... as a make flag to define additional search paths for shared libraries. Note trusted here comes from the fact they are considered by suid binaries too, which ignore LD_LIBRARY_PATH. Such default dirs are also then considered for indirect library dependencies, like RPATH but unlike RUNPATH.

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