[Python-bugs-list] libreadline problems (PR#272)

guido@python.org guido@python.org
Tue, 4 Apr 2000 16:10:46 -0400 (EDT)


> Full_Name: Les Johnson
> Version: 1.6a1
> OS: Linux
> Submission from: morr0639.gti.net (208.216.122.39)
> 
> 
> Linux 2.2.14, GCC 2.95.2, glibc-2.0.112
> 
> Python-1.6a1 immediately dumps core when I start it with the readline module
> enabled.  I'm using libreadline-4.1, and gdb tells me it's segfaulting in
> libc when it tries to flush stdout.  I 'downgraded' to readline-2.2.1 and got
> it to work by forcing the readline module to link with the static libreadline.a
> but it won't link to the dynamic libreadline.so.  Same thing with today's CVS
> source (April 4).
> 
> I strongly suspect the libreadline-4.1 problems are related to threads, but I
> can't figure out the 2.2.1 linking problem:
> 
> gcc -shared  readline.o  -lreadline -ltermcap -o readline.so
> /usr/local/lib/libreadline.so: In function `tilde_expand_word':
> /home/les/readline-2.2.1/tilde.c:386: multiple definition of `_DYNAMIC'
> /usr/lib/crti.o(.dynamic+0x0): first defined here
> /usr/local/lib/libreadline.so: In function `tilde_expand_word':
> /home/les/readline-2.2.1/tilde.c:386: multiple definition of
> `_GLOBAL_OFFSET_TAB
> LE_'
> /usr/lib/crti.o(.got.plt+0x0): first defined here
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: readline.so: undefined versioned symbol name
> __ctype_tolower@@GLIBC
> _2.0
> /usr/bin/ld: failed to set dynamic section sizes: Bad value
> collect2: ld returned 1 exit status

Seems like a bug in /usr/bin/ld to me...  Not much else I can do about
this here.  Try bouncing this off the binutils support list?

--Guido van Rossum (home page: http://www.python.org/~guido/)