[I sent this message on the 15th of May, 2018. But it got stuck in the moderation queue.]
Hi,
On OpenBSD when trying to load libreadline (or libereadline), one gets:
* (cffi:load-foreign-library "libreadline.so") 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'
debugger invoked on a CFFI:LOAD-FOREIGN-LIBRARY-ERROR: Unable to load foreign library (LIBREADLINE.SO-431). Error opening shared object "libreadline.so": Cannot load specified object.
This is since libreadline is sometimes not linked directly against ncurses or termcap (to allow the user to decide which of the two to use). On many GNU/Linux systems, libreadline is already linked against libtinfo which provides those functions; so on those systems this is not an issue. But on OpenBSD, libreadline is not linked against it, and one needs to explicitly pass -ltinfo (or similar).
Is there some fancy way of passing the extra needed libraries in cffi?