Summary: | app-misc/pax-utils: lddtree applies main ELF's rpath to all children lookups | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | gogoprog <gogoprog> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | CONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
gogoprog
2022-01-23 19:23:51 UTC
your custom patching isn't the issue. cmake is applying -rpath to the main program and lddtree is using that to find not only its own libs, but dependencies of those libs. to repro: gcc -x c - -fPIC -shared -o libB.so <<<'' gcc -x c - -fPIC -shared -o libA.so -L. -lB <<<'' gcc -x c - -o main -L. -lA -Wl,-rpath,$PWD <<<'int main(){}' ldd ./main lddtree ./main will need to change lddtree to only apply rpath/runpath settings to the immediate linkage lookup rather than all children |