lunarmodules / luasql

LuaSQL is a simple interface from Lua to a DBMS.
http://lunarmodules.github.io/luasql
545 stars 190 forks source link

luasql-mysql does not work under 5.4 (+luatex)? #161

Open vomus opened 6 months ago

vomus commented 6 months ago

Hi! I just installed luasql-mysql through luarocks-5.4. Using it under luatex (texlive2022) generates an error: error loading module 'luasql.mysql' from file '/usr/lib64/lua/5.4/luasql/mysql. so':

        /usr/lib64/lua/5.4/luasql/mysql.so: undefined symbol: lua_newuserdatauv
stack traceback:
        [C]: in ?
        [C]: in local 'f'
        ...e/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua:398: in local 'loo
kup'
        ...e/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua:429: in function <
...e/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua:419>
        [C]: in function 'require'
        dbd3.lua:6: in main chunk
        [\directlua]:1: in main chunk.
l.48     }

Executing the same code from lua-5.4 command line works fine. But looking at the modules in mysql.so truly gives quite a few unknown symbols:

                 U luaL_error
                 U luaL_newmetatable
                 U luaL_optinteger
                 U luaL_optlstring
                 U luaL_ref
                 U luaL_setfuncs
                 U luaL_unref
                 U lua_newuserdatauv
0000000000003cf0 T luaopen_luasql_mysql

What might be the mistake I make? It worked perfectly under Lua-5.3 with texlive2021...