This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rpetrov
Recipients akuchling, asmodai, mark.dickinson, r.david.murray, rpetrov, skrah
Date 2010-04-23.21:40:27
SpamBayes Score 1.6653345e-16
Marked as misclassified No
Message-id <4BD213C6.8020209@roumenpetrov.info>
In-reply-to <1272015300.78.0.213134986155.issue7384@psf.upfronthosting.co.za>
Content
> Roumen, I do not see a line in configure.in that tests for the
> libraries that readline is linked against.

The test in configure is how to link application to readline libs.

Platforms that support linking of shared libraries with unresolved 
symbols cannot link readline to termcap compatible library if they offer 
more then one. I think that this is the bug in package build on those 
system as this limit applications to use other termcap libraries.

Not all linux link readline to  termcap compatible library:
- SuSe (checked on 11.0) linked to ncurses :(
- Fedora (verified v 12) and Slackware - not linked . So no issue 
(before) on those platforms as application can link to any termcap 
compatible library and python will select ncursesw. On those platforms I 
expect Stefan patch to return empty string and python to fail to build 
readline module.

As configure detect how to link readline we could uncomment 
READLINE_LIBS and to add as makefile macroand to use by setup.py. If 
READLINE_LIBS contain only -lreadline => on this platform readline is 
already linked to termcap compatible library.

Also detection of dependent libraries that use ldd is limited to 
platforms that has this command, i.e. is not portable.
If distutils support a method that return dependency libraries we could 
use. (

I'm not familiar with python curses module to propose a patch .
Is possible to to run sample program to detect readline curses library ?

Or may be to try to link sample "int main() { readline(); }" and to ask 
compiler/linker to warn for duplicate symbols. Something like :
$ gcc -Wl,--warn-common test-readline.c -lreadline -lncursesw  -lncursesw
$ gcc -Wl,--warn-common test-readline.c -lreadline -ltermcap -lncurses
.../libncurses.so: warning: common of `ospeed' overridden by larger common
.../libtermcap.so: warning: larger common is here
$ gcc -Wl,--warn-common test-readline.c -lreadline -ltermcap -lncursesw
..../libncursesw.so: warning: common of `ospeed' overridden by larger common
..../../libtermcap.so: warning: larger common is here
FIXME with more portable and more correct command.

Roumen
History
Date User Action Args
2010-04-23 21:40:32rpetrovsetrecipients: + rpetrov, akuchling, mark.dickinson, asmodai, r.david.murray, skrah
2010-04-23 21:40:28rpetrovlinkissue7384 messages
2010-04-23 21:40:27rpetrovcreate