[Python-bugs-list] [Bug #115732] Linking fails with old versions of readline

noreply@sourceforge.net noreply@sourceforge.net
Mon, 2 Oct 2000 06:44:44 -0700


Bug #115732, was updated on 2000-Sep-30 11:36
Here is a current snapshot of the bug.

Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 7
Summary: Linking fails with old versions of readline

Details: Python 2.0b2 introduced a new variable into the readline module 'library_version'. This relies on a feature not present in all versions of readline - 'rl_library_version' -  such as the one shipped with OpenBSD 2.7. The latest CVS version fails to link correctly against readlines that don't contain this variable:

[laurie /usr/local/src/Python-2.0b2]$ uname -a
OpenBSD droptop 2.7 GENERIC#25 i386
[laurie /usr/local/src/Python-2.0b2]$ make
<standard make output ... >
gcc   python.o  ../libpython2.0.a -lreadline -ltermcap  -lc_r -lutil -lm  -o python 
./readline.c:504: Undefined symbol `_rl_library_version' referenced from text segment
collect2: ld returned 1 exit status

The only obvious fix to this is to test for the presence of the variable in the configure file and have a HAS_READLINE_VERSION #define or similar which doesn't reference the readline variable, although that doesn't suggest what the library_version should be set to in its absence... None?

This is effectively a followup to bug #11487 which reported compilation problems with the aforementioned variable. It seems likely that the original bug submitter didn't get as far as linking Python due to other compilation problems so the original fix would have appeared to work.

Follow-Ups:

Date: 2000-Oct-02 06:44
By: jhylton

Comment:
It looks like we should just back out the last change to readline.c.

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

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