[uClibc] Re: dyn lib dependency question

Joakim Tjernlund joakim.tjernlund at lumentis.se
Tue Nov 16 08:25:36 UTC 2004


> On Tue Nov 16, 2004 at 01:12:13AM +0100, Tjernlund Hemma wrote:
> > 
> > libreadline.so needs a symbol(tgetent) which is defined
> > in libncurses.so and libcurses.so, but libreadline.so does
> > NOT have a dependency(no DT_NEEDED entry) on either libncurses.so or libcurses.so.
> > 
> > Is this allowed? 
> > 
> > Current libdl assumes that all dlopened libs has a complete dependency list and
> > therfore fails to resolve the tgetent symbol for libreadline.so when libreadline.so
> > is dlopened with RTLD_LOCAL scope. This makes python fail if you build python
> > with readline support.
> > 
> >  Jocke
> 
> I consider that to be a bug in libreadline then, since it
> apparently needs a -lncurses added when linking.
> 
>  -Erik

hmm, just to be clear. Python builds a lib called readline.so, this
lib depends on libncurses.so and libreadline.so. dlopening readline.so
will load both libncurses.so and libreadline.so, but when libreadline.so
wants to relocate the tgetent symbol, dlopen will fail because libncurses.so
is not in libreadline.so's dependency list.

I think the purpose of pythons readline.so is to pull libncurses.so in. If 
libreadline.so had the correct dependencies, readline.so would not exist.

Still consider this to be a bug in libreadline? I do.

 Jocke



More information about the uClibc mailing list