Hi,
As of lua 5.5[1] libreadline is no longer linked to at build time but instead dlopen()'d. However, the library that is dlopen'd out of the box on Linux is "libreadline.so":
#if defined(LUA_USE_LINUX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
+#define LUA_READLINELIB "libreadline.so"
#endif
This filename will only be available on systems where readline was compiled by the user, where the readline development package has been installed. For example, it will only be available on Debian systems where libreadline-dev has been installed[2], as the actual library is libreadline.so.8.2 (with a symlink of libreadline.so.8) [3].
Also, if readline changes API and switches to libreadline.so.9 then you might well be using the wrong API, causing crashes.
I think lua should be explicitly loading libreadline.so.8, this will work for everyone and be sure that you get a library with the ABI that you expect.
Cheers,
Ross