pacakge/lua: introduce ABI versions (branch yem/lua-abi)
v2 cover pacakge/lua: introduce ABI versions (branch yem/lua-abi)
Hello All!
This is a respin of the initial series by James, slighlty massaged by me to account for the various feedbacks in the initial iteration.
Regards,
Yann E. MORIN.
Regards,
Yann E. MORIN.
The following changes since commit b2f79735f6d64911853d0defe970660fadb4e257
package/systemd: bump version to 245.7 (2020-07-27 21:17:54 +0200)
are available in the git repository at:
https://git.busybox.net/~ymorin/git/buildroot
for you to fetch changes up to 38bcaecb671e2bb943336715c1fd92c8cb3cff23
package/luaposix: select bit32 based on lua ABI version 5.1 (2020-07-27 22:30:59 +0200)
----------------------------------------------------------------
James Hilliard (8):
package/efl: depend on LuaJIT
package/minetest: depend on LuaJIT package/prosody: don't depend on !lua 5.3 package/luainterpreter: add abi version options package/sysdig: depend on lua ABI version 5.1 package/collectd: depend on luainterpreter for lua support package/solarus: depend on lua ABI version 5.1 package/luaposix: select bit32 based on lua ABI version 5.1
Yann E. MORIN (1):
package/luainterpreter: gather the ABI version string defaults
package/collectd/Config.in | 5 ++++- package/collectd/collectd.mk | 2 +- package/efl/Config.in | 6 ++---- package/lua/Config.in | 6 ++---- package/luainterpreter/Config.in | 8 ++++++++ package/luajit/Config.in | 4 +--- package/luaposix/Config.in | 2 +- package/minetest/Config.in | 4 +--- package/prosody/Config.in | 4 ---- package/solarus/Config.in | 7 +++---- package/sysdig/Config.in | 11 +++++------ package/sysdig/sysdig.mk | 13 ++++++++++++- 12 files changed, 40 insertions(+), 32 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/9 package/efl: depend on LuaJIT
From: James Hilliard <[email protected]>
Luajit is a provider for luainterpreter. We can't select providers of virtual packages; we can only depend on them.
Note also that it is not very clear whether the host and target variants of EFL need to be built with the same lua interpreter. Today, this is guaranteed as we inly use luajit in both cases. But there were issues with lua 5.1 in the past, so stick to only using luajit.
[yann.morin.1998 at free.fr:
- depend on luajit, not "any" luainterpreter
- which keeps the host and target variants built with the same interpreter
]
--- package/efl/Config.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
package/efl/Config.in +2 -4
@@ -3,17 +3,16 @@ config BR2_PACKAGE_EFL # g++ issue with 4.4.5, tested with g++ 4.7.2 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS # luajit depends on BR2_TOOLCHAIN_HAS_THREADS # untested without threads depends on BR2_USE_MMU depends on BR2_USE_WCHAR # use wchar_t depends on !BR2_STATIC_LIBS # dlfcn.h + # https://phab.enlightenment.org/T2728 + depends on BR2_PACKAGE_LUAJIT select BR2_PACKAGE_DBUS select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_JPEG # Emile needs libjpeg select BR2_PACKAGE_LIBCURL # Ecore_con_url, runtime dependency - # https://phab.enlightenment.org/T2728 - select BR2_PACKAGE_LUAJIT # Lua support broken select BR2_PACKAGE_LZ4 select BR2_PACKAGE_ZLIB help
@@ -306,5 +305,4 @@ comment "efl needs a toolchain w/ C++, dynamic library, gcc >= 4.7, threads, wch depends on !BR2_INSTALL_LIBSTDCPP \ || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 \ || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR - depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS depends on BR2_USE_MMU
Signature · 1 line
2.20.1
PATCH v2 2/9 package/minetest: depend on LuaJIT
In reply to Yann E. MORINFrom: James Hilliard <[email protected]>
Luajit is a provider for luainterpreter. We can't select providers of virtual packages; we can only depend on them.
[yann.morin.1998 at free.fr:
- a lua interpreter is needed, so don't drop the dependency
- make it a "depends on" rather than a "select"
]
--- package/minetest/Config.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
package/minetest/Config.in +1 -3
@@ -5,11 +5,10 @@ config BR2_PACKAGE_MINETEST depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_PACKAGE_XORG7 # irrlicht depends on BR2_PACKAGE_HAS_LIBGL # irrlicht - depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS + depends on BR2_PACKAGE_LUAJIT select BR2_PACKAGE_IRRLICHT select BR2_PACKAGE_GMP select BR2_PACKAGE_JSONCPP - select BR2_PACKAGE_LUAJIT select BR2_PACKAGE_SQLITE select BR2_PACKAGE_ZLIB # At least one option must be enabled
@@ -59,7 +58,6 @@ comment "minetest needs a toolchain w/ C++, gcc >= 4.9, threads" || !BR2_TOOLCHAIN_HAS_THREADS comment "minetest needs X11 and an OpenGL provider" - depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS depends on (BR2_INSTALL_LIBSTDCPP \ && BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \ && BR2_TOOLCHAIN_HAS_THREADS)
Signature · 1 line
2.20.1
PATCH v2 3/9 package/prosody: don't depend on !lua 5.3
In reply to Yann E. MORINFrom: James Hilliard <[email protected]>
The current version of prosody is compatible with Lua 5.3.
--- package/prosody/Config.in | 4 ---- 1 file changed, 4 deletions(-)
package/prosody/Config.in +0 -4
@@ -2,7 +2,6 @@ config BR2_PACKAGE_PROSODY bool "prosody" depends on BR2_USE_MMU # fork depends on BR2_PACKAGE_HAS_LUAINTERPRETER - depends on !BR2_PACKAGE_LUA_5_3 depends on !BR2_STATIC_LIBS # luaexpat, luasec, luasocket, luafilesystem select BR2_PACKAGE_LUABITOP if !BR2_PACKAGE_LUAJIT # runtime select BR2_PACKAGE_LUAEXPAT # runtime
@@ -21,6 +20,3 @@ config BR2_PACKAGE_PROSODY comment "prosody needs the lua interpreter, dynamic library" depends on !BR2_PACKAGE_HAS_LUAINTERPRETER || BR2_STATIC_LIBS depends on BR2_USE_MMU - -comment "prosody needs a Lua 5.1/5.2 interpreter" - depends on BR2_PACKAGE_LUA_5_3
Signature · 1 line
2.20.1
PATCH v2 4/9 package/luainterpreter: add abi version options
In reply to Yann E. MORINFrom: James Hilliard <[email protected]>
Since a number of packages depend on specific ABI version that are provided by lua and luajit packages we should have a kconfig variable that those packages can depend on.
--- package/lua/Config.in | 2 ++ package/luainterpreter/Config.in | 6 ++++++ package/luajit/Config.in | 1 + 3 files changed, 9 insertions(+)
package/lua/Config.in +2 -0
@@ -20,9 +20,11 @@ choice config BR2_PACKAGE_LUA_5_1 bool "Lua 5.1.x" + select BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 config BR2_PACKAGE_LUA_5_3 bool "Lua 5.3.x" + select BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_3 endchoice
package/luainterpreter/Config.in +6 -0
@@ -8,6 +8,12 @@ config BR2_PACKAGE_PROVIDES_LUAINTERPRETER config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION string +config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 + bool + +config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_3 + bool + config BR2_PACKAGE_PROVIDES_HOST_LUAINTERPRETER string default "host-lua"
package/luajit/Config.in +1 -0
@@ -19,6 +19,7 @@ config BR2_PACKAGE_LUAJIT # binaries, so check if that option is supported. See # luajit.mk for details. select BR2_PACKAGE_HAS_LUAINTERPRETER + select BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 select BR2_HOSTARCH_NEEDS_IA32_COMPILER if !BR2_ARCH_IS_64 help LuaJIT implements the full set of language features defined
Signature · 1 line
2.20.1
PATCH v2 5/9 package/luainterpreter: gather the ABI version string defaults
In reply to Yann E. MORINNow that we have booleans to represent the Lua ABI version, and that every Lua providers do select those, there is no longer any reason for them to also handle the ABI version string anymore.
Move the defaults into the common luainterpreter.
--- package/lua/Config.in | 4 ---- package/luainterpreter/Config.in | 2 ++ package/luajit/Config.in | 3 --- 3 files changed, 2 insertions(+), 7 deletions(-)
package/lua/Config.in +0 -4
@@ -28,10 +28,6 @@ config BR2_PACKAGE_LUA_5_3 endchoice -config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION - default "5.1" if BR2_PACKAGE_LUA_5_1 - default "5.3" if BR2_PACKAGE_LUA_5_3 - if BR2_PACKAGE_LUA_5_3 config BR2_PACKAGE_LUA_32BITS bool "Use 32 bit numbers"
package/luainterpreter/Config.in +2 -0
@@ -7,6 +7,8 @@ config BR2_PACKAGE_PROVIDES_LUAINTERPRETER config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION string + default "5.1" if BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 + default "5.3" if BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_3 config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 bool
package/luajit/Config.in +0 -3
@@ -34,9 +34,6 @@ if BR2_PACKAGE_LUAJIT config BR2_PACKAGE_PROVIDES_LUAINTERPRETER default "luajit" -config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION - default "5.1" - config BR2_PACKAGE_LUAJIT_COMPAT52 bool "Lua 5.2 compatibility" help
Signature · 1 line
2.20.1
PATCH v2 6/9 package/sysdig: depend on lua ABI version 5.1
In reply to Yann E. MORINFrom: James Hilliard <[email protected]>
Since sysdig is compatible with lua interpreters that provide the version 5.1 ABI we should depend on that instead of unconditionally selecting luajit.
Use luainterpreter as the dependency, now that either lua or luajit can be used.
[yann.morin.1998 at free.fr:
- reorder dependencies in Config.in: package deps go after toolchain deps
- keep the toolchain deps together in the comment
- switch to using luainterpreter as a build dependency
- split the now-long _DEPENDENCIES list
]
--- package/sysdig/Config.in | 11 +++++------ package/sysdig/sysdig.mk | 13 ++++++++++++- 2 files changed, 17 insertions(+), 7 deletions(-)
package/sysdig/Config.in +5 -6
@@ -2,18 +2,17 @@ config BR2_PACKAGE_SYSDIG bool "sysdig" depends on BR2_LINUX_KERNEL depends on BR2_INSTALL_LIBSTDCPP # libjson - depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 depends on BR2_TOOLCHAIN_HAS_THREADS # jq - depends on !BR2_STATIC_LIBS # luajit, elfutils + depends on !BR2_STATIC_LIBS # elfutils depends on BR2_USE_WCHAR # elfutils depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils + depends on BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 select BR2_PACKAGE_ELFUTILS select BR2_PACKAGE_JQ select BR2_PACKAGE_JSONCPP select BR2_PACKAGE_LIBB64 select BR2_PACKAGE_LIBCURL - select BR2_PACKAGE_LUAJIT select BR2_PACKAGE_NCURSES select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_ZLIB
@@ -26,9 +25,9 @@ config BR2_PACKAGE_SYSDIG https://github.com/draios/sysdig/wiki -comment "sysdig needs a glibc or uclibc toolchain w/ C++, threads, gcc >= 4.8, dynamic library and a Linux kernel to be built" +comment "sysdig needs a glibc or uclibc toolchain w/ C++, threads, gcc >= 4.8, dynamic library, a Linux kernel, and luajit or lua 5.1 to be built" depends on !BR2_LINUX_KERNEL || !BR2_INSTALL_LIBSTDCPP \ || !BR2_TOOLCHAIN_HAS_THREADS \ || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || BR2_STATIC_LIBS \ - || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) - depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS + || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) \ + || !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
package/sysdig/sysdig.mk +12 -1
@@ -9,9 +9,20 @@ SYSDIG_SITE = $(call github,draios,sysdig,$(SYSDIG_VERSION)) SYSDIG_LICENSE = GPL-2.0 SYSDIG_LICENSE_FILES = COPYING SYSDIG_CONF_OPTS = -DENABLE_DKMS=OFF -DUSE_BUNDLED_DEPS=OFF -SYSDIG_DEPENDENCIES = zlib luajit jsoncpp libcurl ncurses openssl jq libb64 elfutils SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO +SYSDIG_DEPENDENCIES = \ + elfutils \ + jq \ + jsoncpp \ + libb64 \ + libcurl \ + luainterpreter \ + ncurses \ + openssl \ + zlib \ + + # sysdig creates the module Makefile from a template, which contains a # single place-holder, KBUILD_FLAGS, wich is only replaced with two # things:
Signature · 1 line
2.20.1
PATCH v2 7/9 package/collectd: depend on luainterpreter for lua support
In reply to Yann E. MORINFrom: James Hilliard <[email protected]>
Since collectd lua support is compatible with any luainterpreter implementation we should depend on BR2_PACKAGE_HAS_LUAINTERPRETER instead of unconditionally selecting BR2_PACKAGE_LUA.
--- package/collectd/Config.in | 5 ++++- package/collectd/collectd.mk | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-)
package/collectd/Config.in +4 -1
@@ -65,11 +65,14 @@ config BR2_PACKAGE_COLLECTD_LOGSTASH config BR2_PACKAGE_COLLECTD_LUA bool "lua" - select BR2_PACKAGE_LUA + depends on BR2_PACKAGE_HAS_LUAINTERPRETER help Embeds a Lua interpreter into collectd and provides an interface to collectd's plugin system. +comment "lua support needs a Lua interpreter" + depends on !BR2_PACKAGE_HAS_LUAINTERPRETER + config BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL bool "notify_email" depends on !BR2_STATIC_LIBS # libesmtp
package/collectd/collectd.mk +1 -1
@@ -160,7 +160,7 @@ COLLECTD_DEPENDENCIES = \ $(if $(BR2_PACKAGE_COLLECTD_GRPC),grpc) \ $(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \ $(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),yajl) \ - $(if $(BR2_PACKAGE_COLLECTD_LUA),lua) \ + $(if $(BR2_PACKAGE_COLLECTD_LUA),luainterpreter) \ $(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \ $(if $(BR2_PACKAGE_COLLECTD_MODBUS),libmodbus) \ $(if $(BR2_PACKAGE_COLLECTD_MQTT),mosquitto) \
Signature · 1 line
2.20.1
PATCH v2 8/9 package/solarus: depend on lua ABI version 5.1
In reply to Yann E. MORINFrom: James Hilliard <[email protected]>
Since solarus is compatible with lua interpreters that provide the version 5.1 ABI we should depend on that instead of unconditionally selecting luajit.
--- package/solarus/Config.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
package/solarus/Config.in +3 -4
@@ -1,7 +1,7 @@ config BR2_PACKAGE_SOLARUS bool "solarus" depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS + depends on BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal
@@ -12,7 +12,6 @@ config BR2_PACKAGE_SOLARUS select BR2_PACKAGE_LIBOGG select BR2_PACKAGE_LIBPNG # runtime select BR2_PACKAGE_LIBVORBIS - select BR2_PACKAGE_LUAJIT if !BR2_PACKAGE_LUA_5_1 select BR2_PACKAGE_OPENAL select BR2_PACKAGE_PHYSFS select BR2_PACKAGE_SDL2
@@ -26,8 +25,8 @@ config BR2_PACKAGE_SOLARUS http://www.solarus-games.org https://github.com/solarus-games/solarus -comment "solarus needs OpenGL and a toolchain w/ C++, gcc >= 4.8, NPTL, dynamic library" - depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS || BR2_PACKAGE_LUA_5_1 +comment "solarus needs OpenGL and a toolchain w/ C++, gcc >= 4.8, NPTL, dynamic library, and luajit or lua 5.1" + depends on !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \ || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
Signature · 1 line
2.20.1
PATCH v2 9/9 package/luaposix: select bit32 based on lua ABI version 5.1
In reply to Yann E. MORINFrom: James Hilliard <[email protected]>
Since the bit32 module is needed by all lua ABI 5.1 providers we can select based on the lua ABI version instead of both lua 5.1 and luajit.
--- package/luaposix/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/luaposix/Config.in +1 -1
@@ -3,7 +3,7 @@ config BR2_PACKAGE_LUAPOSIX # "bit32" is included in Lua 5.2+. luajit has an equivalent # "bit" module, but since it has a different name, luaposix # doesn't find it. - select BR2_PACKAGE_LUA_BIT32 if BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT # runtime + select BR2_PACKAGE_LUA_BIT32 if BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1 # runtime help This is a POSIX binding for LuaJIT, Lua 5.1 through 5.4; like most libraries it simply binds to C APIs on the
Signature · 1 line
2.20.1
v2 cover pacakge/lua: introduce ABI versions (branch yem/lua-abi)
In reply to Yann E. MORINAll,
On 2020-07-27 22:32 +0200, Yann E. MORIN spake thusly:
Quoted 2 lines
This is a respin of the initial series by James, slighlty massaged by me to account for the various feedbacks in the initial iteration.
After a quick round on IRC, applied on master, thanks!
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'