+4
−1
+77
−15
+1
−0
Loading
The first Rust program linked against Rust dylibs (rustc built by rustc,
stage 3 of the rust package: rustc_binary NEEDs librustc_driver.so and
libstd.so) found neither: the loader had no LD_LIBRARY_PATH at all, and it
opened RUNPATH "$ORIGIN/../lib" literally. A NEEDED library it couldn't
find was skipped silently, so the process died later with "undefined
symbol" on the first function from it.
- LD_LIBRARY_PATH (ignored under AT_SECURE), searched before the
referrer's RUNPATH/RPATH, as glibc does with DT_RUNPATH
- $ORIGIN / ${ORIGIN} in both: the referrer's directory, the main
program's from AT_EXECFN
- a NEEDED library of the program that can't be found: "error while
loading shared libraries: X: cannot open shared object file", exit 127
- dladdr()'s dli_fname is the path the object was loaded from (glibc's
l_name), not its DT_NEEDED name: rustc locates its sysroot from
librustc_driver.so's path
Checked with the stage-3 rustc in the RC5 chroot: -vV and --print sysroot
work. ctest 172/172.
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>