[lfs-support] Help with a linker problem
delgarde at ihug.co.nz
Fri Nov 30 03:37:32 PST 2012
Rewriting my LFS build scripts, I'm getting an interesting linking error
with bash in chapter 6, and am hoping someone can point me in the right
direction for tracking down the cause.
Basically, bash builds correctly, but the resulting binary is bad, any
attempt to invoke it resulting in:
# /bin/bash --version
/bin/bash: error while loading shared libraries: libncurses.so.5: cannot
open shared object file: No such file or directory
Now, the obvious problem is that it's complaining about libncurses, not
the libncursesw version built in chapter 6. As far as I can tell, it
should be linked to the latter, thanks to the "INPUT(-lncursesw)" linker
script created when we installed ncurses.
My suspicion is that when the bash binary was linked, the linker found
ncurses in /tools ahead of /lib, and so not applied that linker script.
It then fails runtime linking, since /tools isn't in the search path at
runtime (unless I put it there with LD_LIBRARY_PATH).
So, it seems pretty clear that I've missed something in my script -
probably in one of those first few parts of chapter 6. But I can't spot
the problem myself, so I'm hoping someone can point me in the direction
of what could be causing this.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part
More information about the lfs-support