Bug 55865 - LD_LIBRARY_PATH / rpath interaction
Summary: LD_LIBRARY_PATH / rpath interaction
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ld.so
Version: 7.1
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-07 22:08 UTC by Frank Hirtz
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-11-28 18:11:24 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2001:160 0 normal SHIPPED_LIVE : Updated glibc packages are available 2001-11-28 05:00:00 UTC

Description Frank Hirtz 2001-11-07 22:08:58 UTC
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:

Comment 1 Jakub Jelinek 2001-11-08 21:29:29 UTC
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.

Comment 2 Frank Hirtz 2001-11-19 23:31:50 UTC
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.

Comment 3 Jakub Jelinek 2001-11-28 16:03:19 UTC
glibc-2.2.4-19.1 is building ATM.

Comment 4 Jakub Jelinek 2001-11-28 18:11:17 UTC
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).


Note You need to log in before you can comment on or make changes to this bug.