Bug 55865 - LD_LIBRARY_PATH / rpath interaction
LD_LIBRARY_PATH / rpath interaction
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: ld.so (Show other bugs)
7.1
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-07 17:08 EST by Frank Hirtz
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-11-28 13:11:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Frank Hirtz 2001-11-07 17:08:58 EST
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 16:29:29 EST
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 18:31:50 EST
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 11:03:19 EST
glibc-2.2.4-19.1 is building ATM.
Comment 4 Jakub Jelinek 2001-11-28 13:11:17 EST
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.