"unprotected error in call to Lua API" with custom binary
sjkim04 opened this issue · 5 comments
I have built a custom lit due to the official binaries not including ARM versions. (Running a Raspberry Pi OS with RPi4, armhf)
The build went perfectly fine, but when I run make test
, the program spits an error:
sjkim04@raspberrypi:~/Desktop/luvi $ make test
cmake --build build -- -j4
gmake[1]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[2]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
[ 3%] Built target LPEGLIB
[ 8%] Built target openssl
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
[ 23%] Built target pcre
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
[ 48%] Built target uv_a
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
[ 49%] Built target minilua
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
[ 51%] Built target lrexlib
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
[ 53%] Built target pcreposix
[ 76%] Built target lua_openssl
[ 80%] Built target buildvm
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
[ 81%] Built target libluv_a
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
[ 87%] Built target luajit-5.1
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
[ 95%] Built target luajit
gmake[3]: Entering directory '/home/sjkim04/Desktop/luvi/build'
gmake[3]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
[100%] Built target luvi
gmake[2]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
gmake[1]: Leaving directory '/home/sjkim04/Desktop/luvi/build'
rm -f test.bin
build/luvi samples/test.app -- 1 2 3 4
PANIC: unprotected error in call to Lua API (8)
make: *** [Makefile:92: test] Error 1
I have searched the internet, and this error seems to be caused because of outdated libraries, but none of those provided ways to actually fix this for this repo. What can I do?
Is there a reason this issue was created in the Lit repo? The log seems to be from trying to build Luvi.
It's actually running this sample app here after building luvi successfully.
@sjkim04 Can you reproduce the error by running the sample app manually? That is, luvi samples/test.app
running the freshly-built executable (should be in your build
directory). If so, any chance you can figure out which line inside of the app (main.lua
in the samples/test.app
directory) is causing the error?
IIRC there were some issues with ARM in LuaJIT last year, but these should have been fixed long ago (and included via luv).
Is there a reason this issue was created in the Lit repo? The log seems to be from trying to build Luvi.
yeah, seems like I made a mistake opening the issue
Can you reproduce the error by running the sample app manually?
@Duckwhale
$ ./build/luvi samples/test.app
PANIC: unprotected error in call to Lua API (8)
no luck, if the number means the line number, it will be line 8
Edit: I tried removing line 8, and the error disappears (printing another error due to not declaring p). So it's utils causing the issue...
~/Desktop/luvi
How you build or where do you get luvi?
and ~/Desktop/luvi
without any args output any message?
I think this issue should move to luvi/luvi
yeah, I made the issue in luvi (luvit/luvi#264)
Closing