| Summary: | ld error messages refers to undocumented option --rpath | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | peter.jeremy <peter.jeremy> | ||||
| Component: | gnu | Assignee: | David E. O'Brien <obrien> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 5.0-CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Responsible Changed From-To: freebsd-bugs->jdp John's Mr Run-Time-Linker. :-) Responsible Changed From-To: jdp->freebsd-bugs John doesn't want this. I should smoke less something-or-other. 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. 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. |
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)