Dynamic linker

Salvatore CRO salvatore.cro at st.com
Wed Mar 23 16:45:41 UTC 2011


We have been looking at the same problem in the last days...
Libreadline needs either libncurses or libtermcap to provide these symbols.
Even though one of the two is supposed to be linked to libreadline (depending on
Certain logic in its build configure), it seems this is not actual the case.
We'll keep investigating into libreadline package configure.

Salvo.

> -----Original Message-----
> From: uclibc-bounces at uclibc.org 
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of Mike Frysinger
> Sent: Wednesday, March 23, 2011 5:31 PM
> To: bruce bushby
> Cc: uclibc at uclibc.org
> Subject: Re: Dynamic linker
> 
> On Wed, Mar 23, 2011 at 10:12 AM, bruce bushby wrote:
> > I'm new to uclibc and buildroot so please forgive any stupid 
> > statements. I'm stuck on a problem that I can't fix, as a 
> last resort 
> > I'm wondering if it could be (ld-uClibc.so.0)
> 
> what version of uClibc exactly are you using ?
> 
> > [root at vx-200 ~]# strings /usr/lib/libreadline.so.6 | grep tgetent 
> > tgetent [root at vx-200 ~]# strings /usr/lib/libreadline.so.6 | grep 
> > tgetnum tgetnum
> 
> this is a terrible way of looking for symbols.  what you're 
> actually seeing is that readline *needs* those; it does not 
> *provide* them.
> use `readelf -s` to actually see the difference.
> 
> > So far everything looks perfect, Python's 
> "lib-dynload/readline.so" is 
> > linked against "libreadline"....and "libreadline" has the curses 
> > terminfo symbols (tgetent, tgetflag, tgetnum, tgetstr, tgoto, tputs)
> >
> > python: symbol 'BC': can't resolve symbol
> > python: symbol 'PC': can't resolve symbol
> > python: symbol 'UP': can't resolve symbol
> > python: symbol 'tgetnum': can't resolve symbol
> > python: symbol 'tgoto': can't resolve symbol
> > python: symbol 'tgetflag': can't resolve symbol
> > python: symbol 'tputs': can't resolve symbol
> > python: symbol 'tgetent': can't resolve symbol
> > python: symbol 'tgetstr': can't resolve symbol
> 
> no, readline does not provide any of these ... ncurses does.  
> verify ncurses is correctly exporting these symbols with readelf.
> 
> > So the Python binary opens "lib-dynload/readline.so" ...and the 
> > necessary libreadline and libncurses ..... and lastly it opens 
> > "ld-uClibc" which, from my limited understanding would link the 
> > addresses
> 
> not quite.  ld-uClibc in the output above is opened only 
> because it was listed as DT_NEEDED.  python, assuming it is a 
> dynamic ELF, already had ld-uClibc loaded up and resolving 
> symbols for you.
> -mike
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc
> 


More information about the uClibc mailing list