starwing / luautf8

a utf-8 support module for Lua and LuaJIT.
MIT License
406 stars 67 forks source link

Erorr with LuaJit 2.1.0-beta3 #38

Closed uriid1 closed 1 year ago

uriid1 commented 2 years ago

Build:

gcc -O2 -fPIC -I/usr/include -c lutf8lib.c -o lutf8lib.o
gcc  -shared -o lua-utf8.so lutf8lib.o 

Tested:

lua5.1 test.lua
OK
luajit test.lua

luajit: error loading module 'lua-utf8' from file './lua-utf8.so':
        ./lua-utf8.so: undefined symbol: lua_callk
stack traceback:
        [C]: at 0x7f0bd1841050
        [C]: in function 'require'
        test.lua:1: in main chunk
        [C]: at 0x56115b10acd0
uriid1 commented 2 years ago

The error disappeared after such compilation:

gcc -O2 -fPIC -I/usr/include/lua5.1 -c lutf8lib.c -o lutf8lib.o