loria
loria copied to clipboard
ffi not found?
2021-04-20 15:56:41: ERROR[Main]: ModError: Failed to load and run script from /home/beanzilla/.minetest/games/loria/mods/electricity/init.lua:
2021-04-20 15:56:41: ERROR[Main]: ...illa/.minetest/games/loria/mods/electricity/init.lua:5: module 'ffi' not found:
2021-04-20 15:56:41: ERROR[Main]: no field package.preload['ffi']
2021-04-20 15:56:41: ERROR[Main]: no file './ffi.lua'
2021-04-20 15:56:41: ERROR[Main]: no file '/usr/local/share/lua/5.1/ffi.lua'
2021-04-20 15:56:41: ERROR[Main]: no file '/usr/local/share/lua/5.1/ffi/init.lua'
2021-04-20 15:56:41: ERROR[Main]: no file '/usr/local/lib/lua/5.1/ffi.lua'
2021-04-20 15:56:41: ERROR[Main]: no file '/usr/local/lib/lua/5.1/ffi/init.lua'
2021-04-20 15:56:41: ERROR[Main]: no file './ffi.so'
2021-04-20 15:56:41: ERROR[Main]: no file '/usr/local/lib/lua/5.1/ffi.so'
2021-04-20 15:56:41: ERROR[Main]: no file '/usr/local/lib/lua/5.1/loadall.so'
2021-04-20 15:56:41: ERROR[Main]: stack traceback:
2021-04-20 15:56:41: ERROR[Main]: [C]: in function 'require'
2021-04-20 15:56:41: ERROR[Main]: ...illa/.minetest/games/loria/mods/electricity/init.lua:5: in main chunk
2021-04-20 15:56:41: ERROR[Main]: Check debug.txt for details.
2021-04-20 15:56:41: ACTION[Main]: Server: Shutting down
Minetest Version: 5.4.0 Loria Version: 1.1 WIP (21w14a)
I thought maybe if I installed luajit which provides the ffi lib then I could get it working, but still no luck getting this to work.
Looks pretty strange. FFI is included in LuaJIT, and Loria uses exactly this library. Minetest Developer Wiki says that
Minetest also uses LuaJIT if it is system wide installed.
What OS are you use? Where and how did you get minetest? As precompiled binaries from repositories or did you compile it yourself? Also have you included electricity
in the list of trusted mods?
having the same issue on android 10 after added electricity to the trusted mods list.
having the same issue on android 10 after added electricity to the trusted mods list.
It seems that Android build of Minetest uses bundled Lua 5.1, i.e. one that does not support FFI, so best you can do is to enable fallback mode in the settings of Loria.
I don’t know whether it is possible to use LuaJIT on Android for better performance.