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

noreply@sourceforge.net noreply@sourceforge.net
Sat, 30 Sep 2000 11:29:14 -0700


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

Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Linking 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 
./posixmodule.c:2910: warning: this program uses setreuid(), which is deprecated.
./posixmodule.c:2929: warning: this program uses setregid(), which is deprecated.
./posixmodule.c:4062: warning: tempnam() possibly used unsafely; consider using mkstemp()
./posixmodule.c:4108: warning: tmpnam() possibly used unsafely; consider using mkstemp()
./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.

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