Fedora Account System
Red Hat Associate
Red Hat Customer
According to the Lua 5.5 doc the function should be available: https://www.lua.org/manual/5.5/manual.html#luaL_openlibs But it isn't exported. It's causing rrdtool Lua bindings not to build. Reproducible: Always Steps to Reproduce: 1. cat >test.c <<:EOF char luaL_openlibs (); int main () { return luaL_openlibs (); ; return 0; } :EOF 2. gcc -o test test.c -llua Actual Results: /usr/bin/ld.bfd: /tmp/ccnn2IFm.o: in function `main': test.c:(.text+0x5): undefined reference to `luaL_openlibs' collect2: error: ld returned 1 exit status Expected Results: No error Additional Information: With Lua 5.4 it works as expected.
Related rrdtool FTBFS: https://bugzilla.redhat.com/show_bug.cgi?id=2440557
rrdtool configure output: checking for lua... /usr/bin/lua checking for lua >= 5.0... 5.5 found checking for lua55/lua.h... no checking for lua5.5/lua.h... no checking for lua.h... yes checking for lualib.h... yes checking for lauxlib.h... yes checking for library containing lua_call... -llua checking for library containing luaL_openlibs... no checking for library containing luaL_module... no checking for library containing luaL_openlib... no Lua headers found but not the libraries! Please reinstall the dev packages for Lua 5.5
So, the Lua 5.5 docs are wrong: there is no luaL_openlibs() function in the code anymore. It's been replaced with luaL_openselectedlibs(), and you can see that in the lualib.h header: #define luaL_openlibs(L) luaL_openselectedlibs(L, ~0, 0) The rrdtool configure check needs to be updated to look for luaL_openselectedlibs(), ideally when lua 5.5+ is found, but crudely, as an optional function in the list it is already trying.
Thanks, I will forward to rrdool upstream.