[dm-devel] Patch for readline undefined references

Bgs bgs at bgs.hu
Mon Feb 3 09:23:42 UTC 2014


  Hello Christophe,

On some systems with libtermcap, readline produces undefined references 
for some functions.

For example on my Slackware laptop:

/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so: 
undefined reference to `tputs'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so: 
undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so: 
undefined reference to `tgetflag'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so: 
undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so: 
undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so: 
undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so: 
undefined reference to `PC'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so: 
undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so: 
undefined reference to `BC'

This is not a common problem, but it does show up on some systems.

The attached patch is a very simple solution. Addig libtermcap to the ld 
flags solves the issue.

I'm not sure how it should be included (or not), but even if it's not, 
it would be worth putting the info and patch on the web page.

Best regards
Zoltan Posfai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: multipath-tools-termcap-Bgs.patch
Type: text/x-patch
Size: 1236 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20140203/aa1db6b5/attachment.bin>


More information about the dm-devel mailing list