A few days ago I had issues setting up a build environment for my router, which hnyman kindly helped me figure out.
Following his hint I modified the Makefiles for a few Lua libraries I need for my project:
- package/system/ubus
- feeds/packages/lang/lua-mosquitto
- feeds/packages/lang/luv
I selected those packages in make menuconfig
and changed the corresponding sections in their Makefiles like this:
define Package/libubus-lua
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libubus +liblua5.3
TITLE:=Lua binding for the OpenWrt RPC client
endef
define Package/lua-mosquitto
SUBMENU:=Lua
SECTION:=lang
CATEGORY:=Languages
TITLE:=Lua-mosquitto
DEPENDS:=+libmosquitto +lua5.3
MAINTAINER:=Karl Palsson <karlp@etactica.com>
endef
define Package/luv
SUBMENU:=Lua
SECTION:=lang
CATEGORY:=Languages
TITLE:=Luv
URL:=https://github.com/luvit/luv
DEPENDS:=+libuv +!LUV_USE_LUAJIT_ENGINE:lua5.3
endef
When running make
all steps succeed and I can pull the *.so files from the resulting *.ipk files. But my router complains when I try to require the files from within Lua 5.3. This error tells me that the libraries got compiled against Lua5.1 so my changes did not have the wanted result.
error loading module 'luv' from file './luv.so':
Error relocating ./luv.so: luaL_register: symbol not found
Did any of you compile libraries for Lua5.3 before and can tell me what I need to do? Any and all help is very much appreciated!