vindarel / cl-readline

Common Lisp bindings to the GNU Readline library
https://vindarel.github.io/cl-readline/
GNU General Public License v3.0
38 stars 9 forks source link

libreadline and external references to ncurses/termcap #15

Open ams opened 5 years ago

ams commented 5 years ago

In general, one should link against -ltermcap or -lncurses when using -lreadline, since that contains external references to various functions, which can lead to undefined symbols when linking. E.g., on OpenBSD:

sbcl:/usr/lib/libreadline.so.4.0: undefined symbol 'tgetnum'
sbcl:/usr/lib/libreadline.so.4.0: undefined symbol 'tgoto'
sbcl:/usr/lib/libreadline.so.4.0: undefined symbol 'tgetflag'
sbcl:/usr/lib/libreadline.so.4.0: undefined symbol 'tputs'
sbcl:/usr/lib/libreadline.so.4.0: undefined symbol 'tgetent'
sbcl:/usr/lib/libreadline.so.4.0: undefined symbol 'tgetstr'

I'm not entirely sure how to pass -ltinfo/-lncurses to CFFI so that this works.

ams commented 5 years ago

I piped an email to the cffi-devel list in hope for a solution.

vindarel commented 5 years ago

Thank you.