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

noreply@sourceforge.net noreply@sourceforge.net
Wed, 9 Aug 2000 08:07:37 -0700


Bug #110858, was updated on 2000-Aug-01 14:38
Here is a current snapshot of the bug.

Project: Python
Category: None
Status: Closed
Resolution: None
Bug Group: Not a Bug
Priority: 5
Summary: libreadline problems (PR#272)

Details: Jitterbug-Id: 272
Submitted-By: les@infolabs.com
Date: Tue,  4 Apr 2000 13:59:28 -0400 (EDT)
Version: 1.6a1
OS: Linux


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




====================================================================
Audit trail:
Mon May 22 17:46:57 2000	guido	changed notes
Mon May 22 17:46:57 2000	guido	moved from incoming to irreproducible

Follow-Ups:

Date: 2000-Aug-01 14:38
By: none

Comment:
From: Guido van Rossum <guido@python.org>
Subject: Re: [Python-bugs-list] libreadline problems (PR#272)
Date: Tue, 04 Apr 2000 16:12:48 -0400

> 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/)


-------------------------------------------------------

Date: 2000-Aug-01 14:38
By: none

Comment:
From: Les Johnson <les@infolabs.com>
Subject: Re: [Python-bugs-list] libreadline problems (PR#272)
Date: Thu, 6 Apr 2000 11:01:17 -0400

I originally wrote:

>> 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.

...and Guido replied:

> 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?

Not a bug in /usr/bin/ld, but I resolved this one by upgrading from
glibc2.0.112 to glibc2.1.3.  No more core dumps, and readline works
fine.  Thanks!

 - Les Johnson


-------------------------------------------------------

Date: 2000-Aug-01 14:38
By: none

Comment:
What to do?
-------------------------------------------------------

Date: 2000-Aug-09 08:07
By: twouters

Comment:
This wasn't a bug in Python.

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110858&group_id=5470