Bug 10361 - linker doesn't throw an error in case of missing libraries
Summary: linker doesn't throw an error in case of missing libraries
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.19
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-04 11:09 UTC by booleandomain
Modified: 2009-07-05 00:11 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build: x86_64-pc-linux-gnu
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description booleandomain 2009-07-04 11:09:20 UTC
I'm trying to compile bash-4.0 with gcc-4.3.3-r2 and binutils-2.19.1-r1.

Bash was configured with the following options: --prefix=/tools
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu

Please notice I have set CFLAGS environment variable to: -O2 -march=core2
-Wl,--dynamic-linker=/tools/lib/ld-linux-x86-64.so.2

Of course I have glibc installed in /tools.

Well, bash get configured and compiled fine, but then if I issue ldd bash I get
the following:

linux-vdso.so.1 =>  (0x00007fffcb3ff000)
libncurses.so.5 => not found
libdl.so.2 => /tools/lib/libdl.so.2 (0x00007f14c2e65000)
libc.so.6 => /tools/lib/libc.so.6 (0x00007f14c2b0d000)
/tools/lib/ld-linux-x86-64.so.2 (0x00007f14c3069000)

I have not installed ncurses in /tools. If I install it before attempting to
compile bash, the problem is fixed.

But I wonder why ld does not complain at build-time... Perhaps it is a bug.
Comment 1 Alan Modra 2009-07-05 00:11:31 UTC
Your library isn't missing.  ld found it somewhere else on your system.