From b0759fa5c7b956c8c6856d8ad9a735e8270743d6 Mon Sep 17 00:00:00 2001 From: Martin Schiller Date: Wed, 24 Jun 2026 12:41:05 +0200 Subject: [PATCH] lua: build: link against liblua ldd reports many errors regarding missing symbols because the library is not linked against liblua. root@openwrt ~ # ldd /usr/lib/lua/uci.so ldd (0x7f97830000) libuci.so.20250120 => /lib/libuci.so.20250120 (0x7f978bc000) libubox.so.20260213 => /lib/libubox.so.20260213 (0x7f9781e000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x7f977ed000) libc.so => ldd (0x7f97830000) Error relocating /usr/lib/lua/uci.so: lua_objlen: symbol not found Error relocating /usr/lib/lua/uci.so: lua_pcall: symbol not found Error relocating /usr/lib/lua/uci.so: lua_getfield: symbol not found Error relocating /usr/lib/lua/uci.so: lua_gettop: symbol not found Error relocating /usr/lib/lua/uci.so: luaL_checkstack: symbol not found Error relocating /usr/lib/lua/uci.so: luaL_checklstring: symbol not found Error relocating /usr/lib/lua/uci.so: lua_setfield: symbol not found Error relocating /usr/lib/lua/uci.so: lua_isstring: symbol not found Error relocating /usr/lib/lua/uci.so: lua_pushvalue: symbol not found Error relocating /usr/lib/lua/uci.so: lua_pushnil: symbol not found Error relocating /usr/lib/lua/uci.so: luaL_error: symbol not found Error relocating /usr/lib/lua/uci.so: lua_settop: symbol not found Error relocating /usr/lib/lua/uci.so: lua_pushcclosure: symbol not found Error relocating /usr/lib/lua/uci.so: lua_tolstring: symbol not found Error relocating /usr/lib/lua/uci.so: lua_type: symbol not found Error relocating /usr/lib/lua/uci.so: lua_pushboolean: symbol not found Error relocating /usr/lib/lua/uci.so: lua_settable: symbol not found Error relocating /usr/lib/lua/uci.so: lua_setmetatable: symbol not found Error relocating /usr/lib/lua/uci.so: lua_rawseti: symbol not found Error relocating /usr/lib/lua/uci.so: luaL_newmetatable: symbol not found Error relocating /usr/lib/lua/uci.so: lua_newuserdata: symbol not found Error relocating /usr/lib/lua/uci.so: lua_error: symbol not found Error relocating /usr/lib/lua/uci.so: lua_pushstring: symbol not found Error relocating /usr/lib/lua/uci.so: luaL_checkudata: symbol not found Error relocating /usr/lib/lua/uci.so: lua_rawgeti: symbol not found Error relocating /usr/lib/lua/uci.so: lua_toboolean: symbol not found Error relocating /usr/lib/lua/uci.so: lua_isuserdata: symbol not found Error relocating /usr/lib/lua/uci.so: lua_createtable: symbol not found Error relocating /usr/lib/lua/uci.so: lua_pushinteger: symbol not found root@openwrt ~ # We have to link the lua uci library against liblua. Signed-off-by: Martin Schiller --- lua/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt index efdbfff..31c62d1 100644 --- a/lua/CMakeLists.txt +++ b/lua/CMakeLists.txt @@ -34,7 +34,7 @@ SET_TARGET_PROPERTIES(uci_lua PROPERTIES OUTPUT_NAME uci PREFIX "" ) -TARGET_LINK_LIBRARIES(uci_lua uci dl) +TARGET_LINK_LIBRARIES(uci_lua uci dl lua) INSTALL(TARGETS uci_lua LIBRARY DESTINATION ${LUAPATH}