Bug 20387

Summary: ld error messages refers to undocumented option --rpath
Product: Base System Reporter: peter.jeremy <peter.jeremy>
Component: gnuAssignee: David E. O'Brien <obrien>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description peter.jeremy 2000-08-03 22:50:00 UTC
	When linking against a shared library that references another
	shared library, if the implicitly referenced library cannot
	be located, ld will report an error like:
/usr/libexec/elf/ld: warning: libfoo.so, needed by ./libbar.so, not found (try using --rpath)

	There is no option `--rpath' documented in either ld.1 or ld.texinfo
	and the message should refer to `-rpath' and/or `-rpath-link'.

	(Note that ld parses `--rpath' the same as `-rpath', along with
	other long options.  I'm not sure whether this is a bug or a feature).

How-To-Repeat: 
echo 'foo() { }' > foo.c
echo 'bar() { foo(); }' > bar.c
echo 'main() { bar(); }' > main.c
cc -c -D_REENTRANT -fpic foo.c
cc -o libfoo.so -shared foo.o
cc -c -D_REENTRANT -fpic bar.c
cc -o libbar.so -shared bar.o -L. -lfoo
cc -o main main.c -L. -lbar
/usr/libexec/elf/ld: warning: libfoo.so, needed by ./libbar.so, not found (try using --rpath)
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-04 09:58:12 UTC
Responsible Changed
From-To: freebsd-bugs->jdp

John's Mr Run-Time-Linker. :-)
Comment 2 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-04 22:22:39 UTC
Responsible Changed
From-To: jdp->freebsd-bugs

John doesn't want this.  I should smoke less something-or-other.
Comment 3 Johan Karlsson freebsd_committer freebsd_triage 2000-10-11 20:04:38 UTC
Responsible Changed
From-To: freebsd-bugs->obrien

Over to our GCC/binutil maintainer. 

David if I understand things correct this was reported to 
the binutil maintainers at GNU and has according to 
PR 20492 been accepted and included into binutils. 

I guess it will be in the next release.
Comment 4 David E. O'Brien freebsd_committer freebsd_triage 2000-10-13 10:33:12 UTC
State Changed
From-To: open->closed

Got patch commited to FSF/Binutils 2.10 release branch. 
FreeBSD will get the change with Binuilts 2.10.1 comes out.