From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010917 Description of problem: We want LD_LIBRARY_PATH to override binary's rpath. We tried --enable-new-dtags linker option, to no avail. Actually, it resulted in RUNPATH entry in the binary but had no effect at runtime. -- Note OK, we are on this, it does appear to be a runtime linker (ld.so) buglet that Jakub is fixing. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.Write program 2.Link 3. Additional info:
Fixed with http://sources.redhat.com/ml/libc-hacker/2001-10/msg00027.html in CVS glibc. No errata rpms yet. Please tell me how high priority is it to get errata for this out.
A package has been requested in order to confirm that this will work as they expect. Please put building this as a high priority. Thank you.
glibc-2.2.4-19.1 is building ATM.
For QA, here is a testcase: for i in a b; do echo '#include <stdio.h>' > $i.c; echo 'void foo(void) { printf (__FILE__); }' >> $i.c; done echo 'extern void foo(void); int main () { foo (); return 0; }' > c.c; mkdir x gcc -shared -O2 -o liba.so a.c; gcc -shared -O2 -o x/liba.so b.c gcc -Wl,--rpath,`pwd` -L. -O2 -o c c.c -la gcc -Wl,--enable-new-dtags,--rpath,`pwd` -L. -O2 -o d c.c -la ./c LD_LIBRARY_PATH=`pwd`/x ./c ./d LD_LIBRARY_PATH=`pwd`/x ./d Should print a.ca.ca.cb.c, with glibc-2.2.4-19 it prints a.ca.ca.ca.c (ie. DT_RUNPATH was not overridden by LD_LIBRARY_PATH).