Skip to contentSkip to conversation

package/luainterpreter: add abi version options

PATCH New James Hilliard 4 participants 25 messages May 25, 2020 – Jul 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/9 package/luainterpreter: add abi version options

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
index ce2e439f63..c5ac580267 100644
@@ -19,9 +19,11 @@ choice
 	  Select the version of Lua API/ABI you wish to use.
 
 config BR2_PACKAGE_LUA_5_1
+	select BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
 	bool "Lua 5.1.x"
 
 config BR2_PACKAGE_LUA_5_3
+	select BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_3
 	bool "Lua 5.3.x"
 
 endchoice
package/luainterpreter/Config.in +6 -0
index 7bc54d862f..a5973063b4 100644
@@ -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
index f4d6001586..8cfa85684e 100644
@@ -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.25.1
#1 lore raw

PATCH v3 2/9 package/sysdig: depend on lua ABI version 5.1

Since sysdig is compatible with lua interpreters that provide the version 5.1 ABI we should depend on that instead of unconditionally selecting luajit.

---
 package/sysdig/Config.in | 9 ++++-----
 package/sysdig/sysdig.mk | 8 +++++++-
 2 files changed, 11 insertions(+), 6 deletions(-)
package/sysdig/Config.in +4 -5
index 0a1b3f8935..51d031e85b 100644
@@ -2,9 +2,9 @@ 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_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
-	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
 	select BR2_PACKAGE_ELFUTILS
@@ -12,7 +12,6 @@ config BR2_PACKAGE_SYSDIG
 	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
@@ -25,8 +24,8 @@ config BR2_PACKAGE_SYSDIG
 
 	  https://github.com/draios/sysdig/wiki
 
-comment "sysdig needs a glibc or uclibc toolchain w/ C++, gcc >= 4.8, dynamic library and a Linux kernel to be built"
+comment "sysdig needs a glibc or uclibc toolchain w/ C++, luajit or lua 5.1, gcc >= 4.8, dynamic library, and a Linux kernel to be built"
 	depends on !BR2_LINUX_KERNEL || !BR2_INSTALL_LIBSTDCPP \
 		|| !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
+	depends on BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
package/sysdig/sysdig.mk +7 -1
index c604032cf4..c118b422f0 100644
@@ -9,9 +9,15 @@ 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_DEPENDENCIES = zlib jsoncpp libcurl ncurses openssl jq libb64 elfutils
 SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO
 
+ifeq ($(BR2_PACKAGE_LUA),y)
+SYSDIG_DEPENDENCIES += lua
+else ifeq ($(BR2_PACKAGE_LUAJIT),y)
+SYSDIG_DEPENDENCIES += luajit
+endif
+
 # 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.25.1
#2 lore raw

PATCH v3 3/9 package/collectd: depend on luainterpreter for lua support

In reply to James Hilliard

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
index 188be3c0fb..fc3ee804a2 100644
@@ -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 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
index 24cdad7e1b..37c13c12e7 100644
@@ -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),$(if $(BR2_PACKAGE_LUA),lua,luajit)) \
 	$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \
 	$(if $(BR2_PACKAGE_COLLECTD_MODBUS),libmodbus) \
 	$(if $(BR2_PACKAGE_COLLECTD_MQTT),mosquitto) \
Signature · 1 line
2.25.1
#3 lore raw

PATCH v3 3/9 package/collectd: depend on luainterpreter for lua support

package/collectd/Config.in config BR2_PACKAGE_COLLECTD_LOGSTASH · line 74

Quoted 10 lines · On Sun, 24 May 2020 18:48:39 -0600 James Hilliard <[email protected]>…

config BR2_PACKAGE_COLLECTD_LUA

package/collectd/Config.in +3 -1
 	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 needs a Lua interpreter"
+	depends on !BR2_PACKAGE_HAS_LUAINTERPRETER

I believe this comment is not needed, it is obvious a Lua interpreter is needed for Lua support.

package/collectd/collectd.mk COLLECTD_DEPENDENCIES = \ · line 163

Quoted 2 lines
package/collectd/collectd.mk +1 -1
-	$(if $(BR2_PACKAGE_COLLECTD_LUA),lua) \
+	$(if $(BR2_PACKAGE_COLLECTD_LUA),$(if $(BR2_PACKAGE_LUA),lua,luajit)) \

Use the luainterpreter virtual package as a dependency here.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH v3 3/9 package/collectd: depend on luainterpreter for lua support

Quoted 12 lines · Thomas Petazzoni
Quoted 8 lines · On Sun, 24 May 2020 18:48:39 -0600 James Hilliard <[email protected]>…

config BR2_PACKAGE_COLLECTD_LUA
bool "lua"

package/collectd/Config.in +1 -1
-     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.
Quoted 5 lines

package/collectd/Config.in config BR2_PACKAGE_COLLECTD_LOGSTASH · line 74

Quoted 2 lines
package/collectd/Config.in +2 -0
+comment "lua needs a Lua interpreter"
+     depends on !BR2_PACKAGE_HAS_LUAINTERPRETER

I believe this comment is not needed, it is obvious a Lua interpreter is needed for Lua support.

I had that there so that it was clear that collectd has a lua option when there is not
lua interpreter selected.

Quoted 11 lines

package/collectd/collectd.mk COLLECTD_DEPENDENCIES = \ · line 163

Quoted 3 lines
package/collectd/collectd.mk +1 -1
-     $(if $(BR2_PACKAGE_COLLECTD_LUA),lua) \
+     $(if $(BR2_PACKAGE_COLLECTD_LUA),$(if $(BR2_PACKAGE_LUA),lua,luajit)) \

Use the luainterpreter virtual package as a dependency here.

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#5 lore raw

PATCH v3 4/9 package/solarus: depend on lua ABI version 5.1

In reply to James Hilliard

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
index 5d15342f3a..08d79782ca 100644
@@ -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++, luajit or lua 5.1, gcc >= 4.8, NPTL, dynamic library"
+	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.25.1
#6 lore raw

PATCH v3 5/9 package/luaposix: select bit32 based on lua ABI version 5.1

In reply to James Hilliard

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
index 1e2291b3f5..34de7093c9 100644
@@ -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, 5.2 and 5.3;
 	  like most libraries it simply binds to C APIs on the
Signature · 1 line
2.25.1
#7 lore raw

PATCH v3 6/9 package/minetest: do not select luajit

In reply to James Hilliard

Since luajit is not a requirement for minetest we should not select it instead we should conditionally use it when available.

---
 package/minetest/Config.in   |  4 ----
 package/minetest/minetest.mk | 10 ++++++++--
 2 files changed, 8 insertions(+), 6 deletions(-)
package/minetest/Config.in +0 -4
index 085525534d..19da290df4 100644
@@ -5,11 +5,9 @@ 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
 	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
@@ -53,13 +51,11 @@ comment "sound support needs a toolchain w/ threads NPTL"
 endif
 
 comment "minetest needs a toolchain w/ C++, gcc >= 4.9, threads"
-	depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
 	depends on !BR2_INSTALL_LIBSTDCPP \
 		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
 		|| !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)
package/minetest/minetest.mk +8 -2
index e8fe5b45ce..c0301273be 100644
@@ -9,12 +9,11 @@ MINETEST_SITE = $(call github,minetest,minetest,$(MINETEST_VERSION))
 MINETEST_LICENSE = LGPL-2.1+ (code), CC-BY-SA-3.0 (textures and sounds)
 MINETEST_LICENSE_FILES = LICENSE.txt
 
-MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp luajit sqlite zlib
+MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp sqlite zlib
 
 MINETEST_CONF_OPTS = \
 	-DDEFAULT_RUN_IN_PLACE=OFF \
 	-DENABLE_GLES=OFF \
-	-DENABLE_LUAJIT=ON \
 	-DENABLE_CURSES=OFF \
 	-DAPPLY_LOCALE_BLACKLIST=OFF \
 	-DENABLE_SYSTEM_GMP=ON \
@@ -75,6 +74,13 @@ else
 MINETEST_CONF_OPTS += -DENABLE_SPATIAL=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+MINETEST_DEPENDENCIES += luajit
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=ON
+else
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
 MINETEST_DEPENDENCIES += postgresql
 MINETEST_CONF_OPTS += -DENABLE_POSTGRESQL=ON
Signature · 1 line
2.25.1
#8 lore raw

PATCH v3 6/9 package/minetest: do not select luajit

James,

Le 25/05/2020 ? 02:48, James Hilliard a ?crit?:

Quoted 2 lines

Since luajit is not a requirement for minetest we should not select it instead we should conditionally use it when available.

I never tested minetest without Luajit since I'm testing with a target using efl
+ enlightenment that already depend on luajit.

There is only Debian that still support Lua 5.1 for minetest, other distribution dropped Lua 5.1 support.

[Luajit or Lua 5.1]
https://salsa.debian.org/games-team/minetest/-/blob/master/debian/control#L22

[Luajit support only]
https://src.fedoraproject.org/rpms/minetest/blob/f32/f/minetest.spec#_38
https://www.archlinux.org/packages/community/x86_64/minetest/

Not only for minetest package but for other packages in this series, what's the benefit of adding back Lua 5.1 ? Sure Luajit has some architecture dependencies compared to Lua... but the Lua ABI version handling is a nightmare.

Best regards,
Romain

Quoted 70 lines
---
 package/minetest/Config.in   |  4 ----
 package/minetest/minetest.mk | 10 ++++++++--
 2 files changed, 8 insertions(+), 6 deletions(-)
package/minetest/Config.in +0 -4
index 085525534d..19da290df4 100644
@@ -5,11 +5,9 @@ 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
 	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
@@ -53,13 +51,11 @@ comment "sound support needs a toolchain w/ threads NPTL"
 endif
 
 comment "minetest needs a toolchain w/ C++, gcc >= 4.9, threads"
-	depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
 	depends on !BR2_INSTALL_LIBSTDCPP \
 		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
 		|| !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)
package/minetest/minetest.mk +8 -2
index e8fe5b45ce..c0301273be 100644
@@ -9,12 +9,11 @@ MINETEST_SITE = $(call github,minetest,minetest,$(MINETEST_VERSION))
 MINETEST_LICENSE = LGPL-2.1+ (code), CC-BY-SA-3.0 (textures and sounds)
 MINETEST_LICENSE_FILES = LICENSE.txt
 
-MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp luajit sqlite zlib
+MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp sqlite zlib
 
 MINETEST_CONF_OPTS = \
 	-DDEFAULT_RUN_IN_PLACE=OFF \
 	-DENABLE_GLES=OFF \
-	-DENABLE_LUAJIT=ON \
 	-DENABLE_CURSES=OFF \
 	-DAPPLY_LOCALE_BLACKLIST=OFF \
 	-DENABLE_SYSTEM_GMP=ON \
@@ -75,6 +74,13 @@ else
 MINETEST_CONF_OPTS += -DENABLE_SPATIAL=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+MINETEST_DEPENDENCIES += luajit
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=ON
+else
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
 MINETEST_DEPENDENCIES += postgresql
 MINETEST_CONF_OPTS += -DENABLE_POSTGRESQL=ON
#9 lore raw

PATCH v3 6/9 package/minetest: do not select luajit

Quoted 16 lines · Romain Naour

James,

Le 25/05/2020 ? 02:48, James Hilliard a ?crit :

Quoted 2 lines

Since luajit is not a requirement for minetest we should not select it instead we should conditionally use it when available.

I never tested minetest without Luajit since I'm testing with a target using efl
+ enlightenment that already depend on luajit.

There is only Debian that still support Lua 5.1 for minetest, other distribution dropped Lua 5.1 support.

[Luajit or Lua 5.1]
https://salsa.debian.org/games-team/minetest/-/blob/master/debian/control#L22

Quoted 7 lines

[Luajit support only]
https://src.fedoraproject.org/rpms/minetest/blob/f32/f/minetest.spec#_38
https://www.archlinux.org/packages/community/x86_64/minetest/

Not only for minetest package but for other packages in this series, what's the benefit of adding back Lua 5.1 ? Sure Luajit has some architecture dependencies compared to Lua... but the Lua ABI version handling is a nightmare.

We're not selecting or depending on buildroot's Lua 5.1 here, only making luajit optional, the main reason for this change is that we can't safely select luajit at all,
we could depend on it but since it's not actually a required dependency we can just use it conditionally.

Quoted 75 lines

Best regards,
Romain

Quoted 70 lines
---
 package/minetest/Config.in   |  4 ----
 package/minetest/minetest.mk | 10 ++++++++--
 2 files changed, 8 insertions(+), 6 deletions(-)
package/minetest/Config.in +0 -4
index 085525534d..19da290df4 100644
@@ -5,11 +5,9 @@ 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
      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
@@ -53,13 +51,11 @@ comment "sound support needs a toolchain w/ threads NPTL"
 endif
 
 comment "minetest needs a toolchain w/ C++, gcc >= 4.9, threads"
-     depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
      depends on !BR2_INSTALL_LIBSTDCPP \
              || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
              || !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)
package/minetest/minetest.mk +8 -2
index e8fe5b45ce..c0301273be 100644
@@ -9,12 +9,11 @@ MINETEST_SITE = $(call github,minetest,minetest,$(MINETEST_VERSION))
 MINETEST_LICENSE = LGPL-2.1+ (code), CC-BY-SA-3.0 (textures and sounds)
 MINETEST_LICENSE_FILES = LICENSE.txt
 
-MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp luajit sqlite zlib
+MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp sqlite zlib
 
 MINETEST_CONF_OPTS = \
      -DDEFAULT_RUN_IN_PLACE=OFF \
      -DENABLE_GLES=OFF \
-     -DENABLE_LUAJIT=ON \
      -DENABLE_CURSES=OFF \
      -DAPPLY_LOCALE_BLACKLIST=OFF \
      -DENABLE_SYSTEM_GMP=ON \
@@ -75,6 +74,13 @@ else
 MINETEST_CONF_OPTS += -DENABLE_SPATIAL=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+MINETEST_DEPENDENCIES += luajit
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=ON
+else
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
 MINETEST_DEPENDENCIES += postgresql
 MINETEST_CONF_OPTS += -DENABLE_POSTGRESQL=ON
#10 lore raw

PATCH v3 6/9 package/minetest: do not select luajit

James, All,

On 2020-06-06 16:43 -0600, James Hilliard spake thusly:

Quoted 6 lines · Romain Naour
Quoted 5 lines

Le 25/05/2020 ? 02:48, James Hilliard a ?crit :

Quoted 2 lines

Since luajit is not a requirement for minetest we should not select it instead we should conditionally use it when available.

I never tested minetest without Luajit since I'm testing with a target using efl
+ enlightenment that already depend on luajit.

[--SNIP--]

Quoted 5 lines

We're not selecting or depending on buildroot's Lua 5.1 here, only making luajit optional, the main reason for this change is that we can't safely select luajit at all,
we could depend on it but since it's not actually a required dependency we can just use it conditionally.

As far as I can see, minetest does require a Lua interpreter. What their README states is:

ENABLE_LUAJIT=ON - Build with LuaJIT (much faster than non-JIT Lua)

And if one looks at the code, one can see that only parts of the lua code is protected behind HAS_LUAJIT, e.g.:

    src/script/cpp_api/s_security.cpp:
      206 	// Copy safe package fields
      207 	lua_getfield(L, old_globals, "package");
      208 	lua_newtable(L);
      209 	copy_safe(L, package_whitelist, sizeof(package_whitelist));
      210 	lua_setglobal(L, "package");
      211 	lua_pop(L, 1);  // Pop old package
      212
      213 #if USE_LUAJIT
      214 	// Copy safe jit functions, if they exist
      215 	lua_getfield(L, -1, "jit");
      216 	if (!lua_isnil(L, -1)) {
      217 		lua_newtable(L);
      218 		copy_safe(L, jit_whitelist, sizeof(jit_whitelist));
      219 		lua_setglobal(L, "jit");
      220 	}
      221 	lua_pop(L, 1);  // Pop old jit
      222 #endif
      223
      224 	lua_pop(L, 1); // Pop globals_backup

So, if not laujit, then we need lua, no?

Regards,
Yann E. MORIN.

Quoted 78 lines
Quoted 62 lines

Best regards,
Romain

Quoted 59 lines
---
 package/minetest/Config.in   |  4 ----
 package/minetest/minetest.mk | 10 ++++++++--
 2 files changed, 8 insertions(+), 6 deletions(-)
package/minetest/Config.in +0 -4
index 085525534d..19da290df4 100644
@@ -5,11 +5,9 @@ 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
      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
@@ -53,13 +51,11 @@ comment "sound support needs a toolchain w/ threads NPTL"
 endif
 
 comment "minetest needs a toolchain w/ C++, gcc >= 4.9, threads"
-     depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
      depends on !BR2_INSTALL_LIBSTDCPP \
              || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
              || !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)
package/minetest/minetest.mk +1 -2
index e8fe5b45ce..c0301273be 100644
@@ -9,12 +9,11 @@ MINETEST_SITE = $(call github,minetest,minetest,$(MINETEST_VERSION))
 MINETEST_LICENSE = LGPL-2.1+ (code), CC-BY-SA-3.0 (textures and sounds)
 MINETEST_LICENSE_FILES = LICENSE.txt
 
-MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp luajit sqlite zlib
+MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp sqlite zlib
 
 MINETEST_CONF_OPTS = \
      -DDEFAULT_RUN_IN_PLACE=OFF \
      -DENABLE_GLES=OFF \
-     -DENABLE_LUAJIT=ON \
      -DENABLE_CURSES=OFF \
      -DAPPLY_LOCALE_BLACKLIST=OFF \
      -DENABLE_SYSTEM_GMP=ON \
@@ -75,6 +74,13 @@ else
 MINETEST_CONF_OPTS += -DENABLE_SPATIAL=OFF
 endif
 
Quoted 12 lines

package/minetest/minetest.mk else · line 86

Quoted 11 lines
package/minetest/minetest.mk +7 -0
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+MINETEST_DEPENDENCIES += luajit
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=ON
+else
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
 MINETEST_DEPENDENCIES += postgresql
 MINETEST_CONF_OPTS += -DENABLE_POSTGRESQL=ON

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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.  |
'------------------------------^-------^------------------^--------------------'
#11 lore raw

PATCH v3 6/9 package/minetest: do not select luajit

Quoted 46 lines · Yann E. MORIN

James, All,

On 2020-06-06 16:43 -0600, James Hilliard spake thusly:

Quoted 6 lines · Romain Naour
Quoted 5 lines

Le 25/05/2020 ? 02:48, James Hilliard a ?crit :

Quoted 2 lines

Since luajit is not a requirement for minetest we should not select it instead we should conditionally use it when available.

I never tested minetest without Luajit since I'm testing with a target using efl
+ enlightenment that already depend on luajit.

[--SNIP--]

Quoted 5 lines

We're not selecting or depending on buildroot's Lua 5.1 here, only making luajit optional, the main reason for this change is that we can't safely select luajit at all,
we could depend on it but since it's not actually a required dependency we can just use it conditionally.

As far as I can see, minetest does require a Lua interpreter. What their README states is:

ENABLE_LUAJIT=ON - Build with LuaJIT (much faster than non-JIT Lua)

And if one looks at the code, one can see that only parts of the lua code is protected behind HAS_LUAJIT, e.g.:

    src/script/cpp_api/s_security.cpp:
      206       // Copy safe package fields
      207       lua_getfield(L, old_globals, "package");
      208       lua_newtable(L);
      209       copy_safe(L, package_whitelist, sizeof(package_whitelist));
      210       lua_setglobal(L, "package");
      211       lua_pop(L, 1);  // Pop old package
      212
      213 #if USE_LUAJIT
      214       // Copy safe jit functions, if they exist
      215       lua_getfield(L, -1, "jit");
      216       if (!lua_isnil(L, -1)) {
      217               lua_newtable(L);
      218               copy_safe(L, jit_whitelist, sizeof(jit_whitelist));
      219               lua_setglobal(L, "jit");
      220       }
      221       lua_pop(L, 1);  // Pop old jit
      222 #endif
      223
      224       lua_pop(L, 1); // Pop globals_backup
Quoted 1 line

So, if not laujit, then we need lua, no?

From my understanding of the fallback logic we don't because it will fallback to an embedded version always without luajit being present:
https://github.com/minetest/minetest/blob/5.2.0/cmake/Modules/FindLua.cmake#L23-L28

Quoted 90 lines

Regards,
Yann E. MORIN.

Quoted 74 lines
Quoted 62 lines

Best regards,
Romain

Quoted 59 lines
---
 package/minetest/Config.in   |  4 ----
 package/minetest/minetest.mk | 10 ++++++++--
 2 files changed, 8 insertions(+), 6 deletions(-)
package/minetest/Config.in +0 -4
index 085525534d..19da290df4 100644
@@ -5,11 +5,9 @@ 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
      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
@@ -53,13 +51,11 @@ comment "sound support needs a toolchain w/ threads NPTL"
 endif
 
 comment "minetest needs a toolchain w/ C++, gcc >= 4.9, threads"
-     depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
      depends on !BR2_INSTALL_LIBSTDCPP \
              || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
              || !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)
package/minetest/minetest.mk +1 -2
index e8fe5b45ce..c0301273be 100644
@@ -9,12 +9,11 @@ MINETEST_SITE = $(call github,minetest,minetest,$(MINETEST_VERSION))
 MINETEST_LICENSE = LGPL-2.1+ (code), CC-BY-SA-3.0 (textures and sounds)
 MINETEST_LICENSE_FILES = LICENSE.txt
 
-MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp luajit sqlite zlib
+MINETEST_DEPENDENCIES = gmp irrlicht jsoncpp sqlite zlib
 
 MINETEST_CONF_OPTS = \
      -DDEFAULT_RUN_IN_PLACE=OFF \
      -DENABLE_GLES=OFF \
-     -DENABLE_LUAJIT=ON \
      -DENABLE_CURSES=OFF \
      -DAPPLY_LOCALE_BLACKLIST=OFF \
      -DENABLE_SYSTEM_GMP=ON \
@@ -75,6 +74,13 @@ else
 MINETEST_CONF_OPTS += -DENABLE_SPATIAL=OFF
 endif
 
Quoted 12 lines

package/minetest/minetest.mk else · line 86

Quoted 11 lines
package/minetest/minetest.mk +7 -0
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+MINETEST_DEPENDENCIES += luajit
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=ON
+else
+MINETEST_CONF_OPTS += -DENABLE_LUAJIT=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
 MINETEST_DEPENDENCIES += postgresql
 MINETEST_CONF_OPTS += -DENABLE_POSTGRESQL=ON
Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

|  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.  |

'------------------------------^-------^------------------^--------------------'

#12 lore raw

PATCH v3 7/9 package/efl: depend on lua ABI version 5.1

In reply to James Hilliard

Since efl is compatible with lua interpreters that provide the version 5.1 ABI we should depend on that instead of unconditionally selecting luajit.

---
 package/efl/Config.in |  7 +++----
 package/efl/efl.mk    | 26 ++++++++++++++++++++------
 2 files changed, 23 insertions(+), 10 deletions(-)
package/efl/Config.in +3 -4
index ff49161163..b074774790 100644
@@ -3,7 +3,7 @@ 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_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
 	depends on BR2_TOOLCHAIN_HAS_THREADS # untested without threads
 	depends on BR2_USE_MMU
 	depends on BR2_USE_WCHAR # use wchar_t
@@ -13,7 +13,6 @@ config BR2_PACKAGE_EFL
 	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
@@ -302,9 +301,9 @@ comment "SVG loader needs a toolchain w/ gcc >= 4.8"
 
 endif # BR2_PACKAGE_EFL
 
-comment "efl needs a toolchain w/ C++, dynamic library, gcc >= 4.7, threads, wchar"
+comment "efl needs a toolchain w/ C++, luajit or lua 5.1, dynamic library, gcc >= 4.7, threads, wchar"
 	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_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
 	depends on BR2_USE_MMU
package/efl/efl.mk +20 -6
index d8364ed76f..ba44738e59 100644
@@ -20,8 +20,8 @@ EFL_LICENSE_FILES = \
 
 EFL_INSTALL_STAGING = YES
 
-EFL_DEPENDENCIES = host-pkgconf host-efl host-luajit dbus freetype \
-	jpeg luajit lz4 zlib
+EFL_DEPENDENCIES = host-pkgconf host-efl dbus freetype \
+	jpeg lz4 zlib
 
 # Configure options:
 # --disable-lua-old: build elua for the target.
@@ -38,11 +38,9 @@ EFL_CONF_OPTS = \
 	--with-eldbus_codegen=$(HOST_DIR)/bin/eldbus-codegen \
 	--with-elementary-codegen=$(HOST_DIR)/bin/elementary_codegen \
 	--with-elm-prefs-cc=$(HOST_DIR)/bin/elm_prefs_cc \
-	--with-elua=$(HOST_DIR)/bin/elua \
 	--with-eolian-gen=$(HOST_DIR)/bin/eolian_gen \
 	--disable-image-loader-jp2k \
 	--with-net-control=none \
-	--disable-lua-old \
 	--disable-sdl \
 	--disable-spectre \
 	--disable-xinput22 \
@@ -92,6 +90,16 @@ else
 EFL_CONF_OPTS += --disable-fribidi
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+EFL_CONF_OPTS += \
+	--with-elua=$(HOST_DIR)/usr/bin/elua \
+	--disable-lua-old
+EFL_DEPENDENCIES += host-luajit luajit
+else ifeq ($(BR2_PACKAGE_LUA),y)
+EFL_CONF_OPTS += --enable-lua-old
+EFL_DEPENDENCIES += host-lua lua
+endif
+
 ifeq ($(BR2_PACKAGE_GSTREAMER1)$(BR2_PACKAGE_GST1_PLUGINS_BASE),yy)
 EFL_CONF_OPTS += --enable-gstreamer1
 EFL_DEPENDENCIES += gstreamer1 gst1-plugins-base
@@ -320,7 +328,6 @@ HOST_EFL_DEPENDENCIES = \
 	host-libglib2 \
 	host-libjpeg \
 	host-libpng \
-	host-luajit \
 	host-zlib
 
 # Configure options:
@@ -351,7 +358,6 @@ HOST_EFL_CONF_OPTS += \
 	--disable-libmount \
 	--disable-libraw \
 	--disable-librsvg \
-	--disable-lua-old \
 	--disable-multisense \
 	--disable-physics \
 	--disable-poppler \
@@ -379,6 +385,14 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+HOST_EFL_CONF_OPTS += --disable-lua-old
+HOST_EFL_DEPENDENCIES += host-luajit
+else ifeq ($(BR2_PACKAGE_LUA),y)
+HOST_EFL_CONF_OPTS += --enable-lua-old
+HOST_EFL_DEPENDENCIES += host-lua
+endif
+
 # Always disable upower system module from host as it's
 # not useful and would try to use the output/host/var
 # system bus which is non-existent and does not contain
Signature · 1 line
2.25.1
#13 lore raw

PATCH v3 7/9 package/efl: depend on lua ABI version 5.1

Hi James,

Le 25/05/2020 ? 02:48, James Hilliard a ?crit?:

Quoted 3 lines

Since efl is compatible with lua interpreters that provide the version 5.1 ABI we should depend on that instead of unconditionally selecting luajit.

We had some issues with lua support in previous efl version (1.17.x) [1], can you explain in the commit log that it's safe to add back Lua 5.1 support ?

[1]
https://git.buildroot.net/buildroot/commit/?id=92f7591eca0d2b4ff827ed90629be94292c8b102

Best regards,
Romain

Quoted 45 lines
---
 package/efl/Config.in |  7 +++----
 package/efl/efl.mk    | 26 ++++++++++++++++++++------
 2 files changed, 23 insertions(+), 10 deletions(-)
package/efl/Config.in +3 -4
index ff49161163..b074774790 100644
@@ -3,7 +3,7 @@ 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_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
 	depends on BR2_TOOLCHAIN_HAS_THREADS # untested without threads
 	depends on BR2_USE_MMU
 	depends on BR2_USE_WCHAR # use wchar_t
@@ -13,7 +13,6 @@ config BR2_PACKAGE_EFL
 	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
@@ -302,9 +301,9 @@ comment "SVG loader needs a toolchain w/ gcc >= 4.8"
 
 endif # BR2_PACKAGE_EFL
 
-comment "efl needs a toolchain w/ C++, dynamic library, gcc >= 4.7, threads, wchar"
+comment "efl needs a toolchain w/ C++, luajit or lua 5.1, dynamic library, gcc >= 4.7, threads, wchar"
 	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_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
 	depends on BR2_USE_MMU
package/efl/efl.mk +0 -0
index d8364ed76f..ba44738e59 100644

package/efl/efl.mk EFL_LICENSE_FILES = \ · line 27

Quoted 10 lines
package/efl/efl.mk +2 -2
@@ -20,8 +20,8 @@ EFL_LICENSE_FILES = \
 
 EFL_INSTALL_STAGING = YES
 
-EFL_DEPENDENCIES = host-pkgconf host-efl host-luajit dbus freetype \
-	jpeg luajit lz4 zlib
+EFL_DEPENDENCIES = host-pkgconf host-efl dbus freetype \
+	jpeg lz4 zlib
 
 # Configure options:
 # --disable-lua-old: build elua for the target.

Don't forget to update/remove the comment.

Quoted 61 lines
package/efl/efl.mk +18 -4
@@ -38,11 +38,9 @@ EFL_CONF_OPTS = \
 	--with-eldbus_codegen=$(HOST_DIR)/bin/eldbus-codegen \
 	--with-elementary-codegen=$(HOST_DIR)/bin/elementary_codegen \
 	--with-elm-prefs-cc=$(HOST_DIR)/bin/elm_prefs_cc \
-	--with-elua=$(HOST_DIR)/bin/elua \
 	--with-eolian-gen=$(HOST_DIR)/bin/eolian_gen \
 	--disable-image-loader-jp2k \
 	--with-net-control=none \
-	--disable-lua-old \
 	--disable-sdl \
 	--disable-spectre \
 	--disable-xinput22 \
@@ -92,6 +90,16 @@ else
 EFL_CONF_OPTS += --disable-fribidi
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+EFL_CONF_OPTS += \
+	--with-elua=$(HOST_DIR)/usr/bin/elua \
+	--disable-lua-old
+EFL_DEPENDENCIES += host-luajit luajit
+else ifeq ($(BR2_PACKAGE_LUA),y)
+EFL_CONF_OPTS += --enable-lua-old
+EFL_DEPENDENCIES += host-lua lua
+endif
+
 ifeq ($(BR2_PACKAGE_GSTREAMER1)$(BR2_PACKAGE_GST1_PLUGINS_BASE),yy)
 EFL_CONF_OPTS += --enable-gstreamer1
 EFL_DEPENDENCIES += gstreamer1 gst1-plugins-base
@@ -320,7 +328,6 @@ HOST_EFL_DEPENDENCIES = \
 	host-libglib2 \
 	host-libjpeg \
 	host-libpng \
-	host-luajit \
 	host-zlib
 
 # Configure options:
@@ -351,7 +358,6 @@ HOST_EFL_CONF_OPTS += \
 	--disable-libmount \
 	--disable-libraw \
 	--disable-librsvg \
-	--disable-lua-old \
 	--disable-multisense \
 	--disable-physics \
 	--disable-poppler \
@@ -379,6 +385,14 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+HOST_EFL_CONF_OPTS += --disable-lua-old
+HOST_EFL_DEPENDENCIES += host-luajit
+else ifeq ($(BR2_PACKAGE_LUA),y)
+HOST_EFL_CONF_OPTS += --enable-lua-old
+HOST_EFL_DEPENDENCIES += host-lua
+endif
+
 # Always disable upower system module from host as it's
 # not useful and would try to use the output/host/var
 # system bus which is non-existent and does not contain
#14 lore raw

PATCH v3 7/9 package/efl: depend on lua ABI version 5.1

On 2020-06-06 18:36 +0200, Romain Naour spake thusly:

Quoted 7 lines

Hi James,

Le 25/05/2020 ? 02:48, James Hilliard a ?crit?:

Quoted 3 lines

Since efl is compatible with lua interpreters that provide the version 5.1 ABI we should depend on that instead of unconditionally selecting luajit.

Quoted 5 lines

We had some issues with lua support in previous efl version (1.17.x) [1], can you explain in the commit log that it's safe to add back Lua 5.1 support ?

[1]
https://git.buildroot.net/buildroot/commit/?id=92f7591eca0d2b4ff827ed90629be94292c8b102

This was 4 years ago, against EFL 1.15. We're now using EFL 1.22, and so we would need to check that the Lu support is still broken or not. Let's do that, then, by enabling the build with any Lua 5.1 interpreter, liek this patch does. Let's wait for the autobuilders to return broken builds.

Regards,
Yann E. MORIN.

Quoted 127 lines

Best regards,
Romain

Quoted 45 lines
---
 package/efl/Config.in |  7 +++----
 package/efl/efl.mk    | 26 ++++++++++++++++++++------
 2 files changed, 23 insertions(+), 10 deletions(-)
package/efl/Config.in +3 -4
index ff49161163..b074774790 100644
@@ -3,7 +3,7 @@ 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_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
 	depends on BR2_TOOLCHAIN_HAS_THREADS # untested without threads
 	depends on BR2_USE_MMU
 	depends on BR2_USE_WCHAR # use wchar_t
@@ -13,7 +13,6 @@ config BR2_PACKAGE_EFL
 	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
@@ -302,9 +301,9 @@ comment "SVG loader needs a toolchain w/ gcc >= 4.8"
 
 endif # BR2_PACKAGE_EFL
 
-comment "efl needs a toolchain w/ C++, dynamic library, gcc >= 4.7, threads, wchar"
+comment "efl needs a toolchain w/ C++, luajit or lua 5.1, dynamic library, gcc >= 4.7, threads, wchar"
 	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_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
 	depends on BR2_USE_MMU
package/efl/efl.mk +0 -0
index d8364ed76f..ba44738e59 100644

package/efl/efl.mk EFL_LICENSE_FILES = \ · line 27

Quoted 10 lines
package/efl/efl.mk +2 -2
@@ -20,8 +20,8 @@ EFL_LICENSE_FILES = \
 
 EFL_INSTALL_STAGING = YES
 
-EFL_DEPENDENCIES = host-pkgconf host-efl host-luajit dbus freetype \
-	jpeg luajit lz4 zlib
+EFL_DEPENDENCIES = host-pkgconf host-efl dbus freetype \
+	jpeg lz4 zlib
 
 # Configure options:
 # --disable-lua-old: build elua for the target.

Don't forget to update/remove the comment.

Quoted 51 lines
package/efl/efl.mk +11 -4
@@ -38,11 +38,9 @@ EFL_CONF_OPTS = \
 	--with-eldbus_codegen=$(HOST_DIR)/bin/eldbus-codegen \
 	--with-elementary-codegen=$(HOST_DIR)/bin/elementary_codegen \
 	--with-elm-prefs-cc=$(HOST_DIR)/bin/elm_prefs_cc \
-	--with-elua=$(HOST_DIR)/bin/elua \
 	--with-eolian-gen=$(HOST_DIR)/bin/eolian_gen \
 	--disable-image-loader-jp2k \
 	--with-net-control=none \
-	--disable-lua-old \
 	--disable-sdl \
 	--disable-spectre \
 	--disable-xinput22 \
@@ -92,6 +90,16 @@ else
 EFL_CONF_OPTS += --disable-fribidi
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+EFL_CONF_OPTS += \
+	--with-elua=$(HOST_DIR)/usr/bin/elua \
+	--disable-lua-old
+EFL_DEPENDENCIES += host-luajit luajit
+else ifeq ($(BR2_PACKAGE_LUA),y)
+EFL_CONF_OPTS += --enable-lua-old
+EFL_DEPENDENCIES += host-lua lua
+endif
+
 ifeq ($(BR2_PACKAGE_GSTREAMER1)$(BR2_PACKAGE_GST1_PLUGINS_BASE),yy)
 EFL_CONF_OPTS += --enable-gstreamer1
 EFL_DEPENDENCIES += gstreamer1 gst1-plugins-base
@@ -320,7 +328,6 @@ HOST_EFL_DEPENDENCIES = \
 	host-libglib2 \
 	host-libjpeg \
 	host-libpng \
-	host-luajit \
 	host-zlib
 
 # Configure options:
@@ -351,7 +358,6 @@ HOST_EFL_CONF_OPTS += \
 	--disable-libmount \
 	--disable-libraw \
 	--disable-librsvg \
-	--disable-lua-old \
 	--disable-multisense \
 	--disable-physics \
 	--disable-poppler \
@@ -379,6 +385,14 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)

package/efl/efl.mk else · line 398

Quoted 10 lines
package/efl/efl.mk +7 -0
+HOST_EFL_CONF_OPTS += --disable-lua-old
+HOST_EFL_DEPENDENCIES += host-luajit
+else ifeq ($(BR2_PACKAGE_LUA),y)
+HOST_EFL_CONF_OPTS += --enable-lua-old
+HOST_EFL_DEPENDENCIES += host-lua
+endif
+
 # Always disable upower system module from host as it's
 # not useful and would try to use the output/host/var
 # system bus which is non-existent and does not contain

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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.  |
'------------------------------^-------^------------------^--------------------'
#15 lore raw

PATCH v3 7/9 package/efl: depend on lua ABI version 5.1

In reply to James Hilliard

James, All,

On 2020-05-24 18:48 -0600, James Hilliard spake thusly:

Quoted 6 lines

Since efl is compatible with lua interpreters that provide the version 5.1 ABI we should depend on that instead of unconditionally selecting luajit.

---

[--SNIP--]

package/efl/efl.mk else · line 394

Quoted 11 lines
package/efl/efl.mk +7 -0
@@ -379,6 +385,14 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+HOST_EFL_CONF_OPTS += --disable-lua-old
+HOST_EFL_DEPENDENCIES += host-luajit
+else ifeq ($(BR2_PACKAGE_LUA),y)
+HOST_EFL_CONF_OPTS += --enable-lua-old
+HOST_EFL_DEPENDENCIES += host-lua
+endif

Why does the host variant need to build against the same as the target variant?

It is very unusual that a target option (here, the target Lua interpreter) drives the compilation and dependencies of a host package, so this warrants a bit of explanations.

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.  |
'------------------------------^-------^------------------^--------------------'
#16 lore raw

PATCH v3 7/9 package/efl: depend on lua ABI version 5.1

Quoted 15 lines · Yann E. MORIN

James, All,

On 2020-05-24 18:48 -0600, James Hilliard spake thusly:

Quoted 6 lines

Since efl is compatible with lua interpreters that provide the version 5.1 ABI we should depend on that instead of unconditionally selecting luajit.

---

[--SNIP--]

Quoted 4 lines
package/efl/efl.mk +0 -0
@@ -379,6 +385,14 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
Quoted 10 lines

package/efl/efl.mk else · line 394

Quoted 7 lines
package/efl/efl.mk +7 -0
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+HOST_EFL_CONF_OPTS += --disable-lua-old
+HOST_EFL_DEPENDENCIES += host-luajit
+else ifeq ($(BR2_PACKAGE_LUA),y)
+HOST_EFL_CONF_OPTS += --enable-lua-old
+HOST_EFL_DEPENDENCIES += host-lua
+endif

Why does the host variant need to build against the same as the target variant?

I think we can change that to just depend on host-luainterpreter which should select the right version.

Quoted 15 lines

It is very unusual that a target option (here, the target Lua interpreter) drives the compilation and dependencies of a host package, so this warrants a bit of explanations.

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.

|  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.  |

'------------------------------^-------^------------------^--------------------'

#17 lore raw

PATCH v3 7/9 package/efl: depend on lua ABI version 5.1

James, All,

On 2020-07-27 13:23 -0600, James Hilliard spake thusly:

Quoted 23 lines · Yann E. MORIN
Quoted 12 lines

On 2020-05-24 18:48 -0600, James Hilliard spake thusly:

Quoted 6 lines

Since efl is compatible with lua interpreters that provide the version 5.1 ABI we should depend on that instead of unconditionally selecting luajit.

---

[--SNIP--]

Quoted 4 lines
package/efl/efl.mk +0 -0
@@ -379,6 +385,14 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
Quoted 10 lines

package/efl/efl.mk else · line 394

Quoted 7 lines
package/efl/efl.mk +7 -0
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+HOST_EFL_CONF_OPTS += --disable-lua-old
+HOST_EFL_DEPENDENCIES += host-luajit
+else ifeq ($(BR2_PACKAGE_LUA),y)
+HOST_EFL_CONF_OPTS += --enable-lua-old
+HOST_EFL_DEPENDENCIES += host-lua
+endif

Why does the host variant need to build against the same as the target variant?

Quoted 2 lines

I think we can change that to just depend on host-luainterpreter which should select the right version.

The provider for the host-luainterpreter is always host-lua, never host-luajit::

config BR2_PACKAGE_PROVIDES_HOST_LUAINTERPRETER
string
default "host-lua"

So, if the host and target variants of EFL need to be built with/against the same lua interpreter, that would not work.

So, must ELF target and host variants be built with thwe same Lua interpreter?

Romain, any insight?

Regards,
Yann E. MORIN.

Quoted 14 lines
Quoted 14 lines

It is very unusual that a target option (here, the target Lua interpreter) drives the compilation and dependencies of a host package, so this warrants a bit of explanations.

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.

|  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.  |

'------------------------------^-------^------------------^--------------------'

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.  |
'------------------------------^-------^------------------^--------------------'
#18 lore raw

PATCH v3 7/9 package/efl: depend on lua ABI version 5.1

Quoted 33 lines · Yann E. MORIN

James, All,

On 2020-07-27 13:23 -0600, James Hilliard spake thusly:

Quoted 23 lines · Yann E. MORIN
Quoted 12 lines

On 2020-05-24 18:48 -0600, James Hilliard spake thusly:

Quoted 6 lines

Since efl is compatible with lua interpreters that provide the version 5.1 ABI we should depend on that instead of unconditionally selecting luajit.

---

[--SNIP--]

Quoted 4 lines
package/efl/efl.mk +0 -0
@@ -379,6 +385,14 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
Quoted 10 lines

package/efl/efl.mk else · line 394

Quoted 7 lines
package/efl/efl.mk +7 -0
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+HOST_EFL_CONF_OPTS += --disable-lua-old
+HOST_EFL_DEPENDENCIES += host-luajit
+else ifeq ($(BR2_PACKAGE_LUA),y)
+HOST_EFL_CONF_OPTS += --enable-lua-old
+HOST_EFL_DEPENDENCIES += host-lua
+endif

Why does the host variant need to build against the same as the target variant?

Quoted 2 lines

I think we can change that to just depend on host-luainterpreter which should select the right version.

The provider for the host-luainterpreter is always host-lua, never host-luajit::

Quoted 6 lines

config BR2_PACKAGE_PROVIDES_HOST_LUAINTERPRETER
string
default "host-lua"

So, if the host and target variants of EFL need to be built with/against the same lua interpreter, that would not work.

Hmm, I thought there was something in the infrastructure that was supposed to handle that automatically based on the target lua provider.

Quoted 3 lines

So, must ELF target and host variants be built with thwe same Lua interpreter?

I recall they were supposed to but it has been a while and I don't really remember the reason.

Quoted 28 lines

Romain, any insight?

Regards,
Yann E. MORIN.

Quoted 7 lines
Quoted 7 lines

It is very unusual that a target option (here, the target Lua interpreter) drives the compilation and dependencies of a host package, so this warrants a bit of explanations.

Regards,
Yann E. MORIN.

Quoted 7 lines
Quoted 7 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.  |

'------------------------------^-------^------------------^--------------------'

--
.-----------------.--------------------.------------------.--------------------.

|  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.  |

'------------------------------^-------^------------------^--------------------'

#19 lore raw

PATCH v3 7/9 package/efl: depend on lua ABI version 5.1

James, All,

On 2020-07-27 13:36 -0600, James Hilliard spake thusly:

Quoted 1 line · Yann E. MORIN

[--SNIP--]

Quoted 4 lines
Quoted 2 lines

The provider for the host-luainterpreter is always host-lua, never host-luajit::

Hmm, I thought there was something in the infrastructure that was supposed to handle that automatically based on the target lua provider.

There is no reason the host and target providers be the same, no. For example, for zlib, the host provider is also a constant, host-libzlib.

Quoted 4 lines
Quoted 2 lines

So, must ELF target and host variants be built with thwe same Lua interpreter?

I recall they were supposed to but it has been a while and I don't really remember the reason.

OK, so I take it back: I;ll change this patch to have ELF depend on LuaJIT, rather than select it.

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.  |
'------------------------------^-------^------------------^--------------------'
#20 lore raw

PATCH v3 8/9 package/prosody: don't depend on !lua 5.3

In reply to James Hilliard

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
index c32ca20e23..4b7ea94256 100644
@@ -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.25.1
#21 lore raw

PATCH v3 9/9 package/luajit: depend on !BR2_PACKAGE_LUA

In reply to James Hilliard

The luajit package is incomaptible with lua so luajit should depend on !BR2_PACKAGE_LUA

---
Changes v2 -> v3:
- always depend on lua/luaposix from packages instead of selecting
Changes v1 -> v2:
- depend on !BR2_PACKAGE_LUA_5_3 instead of !BR2_PACKAGE_LUA for solarus

---
 package/luajit/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/luajit/Config.in +1 -0
index 8cfa85684e..33a460772f 100644
@@ -11,6 +11,7 @@ config BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
 
 config BR2_PACKAGE_LUAJIT
 	bool "luajit"
+	depends on !BR2_PACKAGE_LUA
 	depends on !BR2_STATIC_LIBS # dlopen
 	# Luajit is only available for some target architectures, and
 	# has some complexity wrt 32/64. See luajit.mk for details.
Signature · 1 line
2.25.1
#22 lore raw

PATCH v3 9/9 package/luajit: depend on !BR2_PACKAGE_LUA

James, All,

On 2020-05-24 18:48 -0600, James Hilliard spake thusly:

Quoted 2 lines

The luajit package is incomaptible with lua so luajit should depend on !BR2_PACKAGE_LUA

This is not needed. lua and luajit are two provider for the luainterpreter package, so the infra already checks for the conditions where two or more providers are enabled.

So, I've dropped this patch in my respin:

    http://lists.busybox.net/pipermail/buildroot/2020-July/288204.html

Regards,
Yann E. MORIN.

Quoted 29 lines

---
Changes v2 -> v3:
- always depend on lua/luaposix from packages instead of selecting
Changes v1 -> v2:
- depend on !BR2_PACKAGE_LUA_5_3 instead of !BR2_PACKAGE_LUA for solarus

---
 package/luajit/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/luajit/Config.in +1 -0
index 8cfa85684e..33a460772f 100644
@@ -11,6 +11,7 @@ config BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
 
 config BR2_PACKAGE_LUAJIT
 	bool "luajit"
+	depends on !BR2_PACKAGE_LUA
 	depends on !BR2_STATIC_LIBS # dlopen
 	# Luajit is only available for some target architectures, and
 	# has some complexity wrt 32/64. See luajit.mk for details.
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
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.  |
'------------------------------^-------^------------------^--------------------'
#23 lore raw

PATCH v3 9/9 package/luajit: depend on !BR2_PACKAGE_LUA

Quoted 10 lines · Yann E. MORIN

James, All,

On 2020-05-24 18:48 -0600, James Hilliard spake thusly:

Quoted 2 lines

The luajit package is incomaptible with lua so luajit should depend on !BR2_PACKAGE_LUA

This is not needed. lua and luajit are two provider for the luainterpreter package, so the infra already checks for the conditions where two or more providers are enabled.

Without this I am able to select lua and luajit at the same time which shouldn't be a valid config from my understanding.

Quoted 45 lines

So, I've dropped this patch in my respin:

    http://lists.busybox.net/pipermail/buildroot/2020-July/288204.html

Regards,
Yann E. MORIN.

Quoted 25 lines

---
Changes v2 -> v3:
- always depend on lua/luaposix from packages instead of selecting
Changes v1 -> v2:
- depend on !BR2_PACKAGE_LUA_5_3 instead of !BR2_PACKAGE_LUA for solarus

---
 package/luajit/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/luajit/Config.in +1 -1
index 8cfa85684e..33a460772f 100644
@@ -11,6 +11,7 @@ config BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
 
 config BR2_PACKAGE_LUAJIT
      bool "luajit"
+     depends on !BR2_PACKAGE_LUA
      depends on !BR2_STATIC_LIBS # dlopen
      # Luajit is only available for some target architectures, and
      # has some complexity wrt 32/64. See luajit.mk for details.
--

2.25.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

|  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.  |

'------------------------------^-------^------------------^--------------------'

#24 lore raw

PATCH v3 1/9 package/luainterpreter: add abi version options

In reply to James Hilliard

Hello Fran?ois,

Could you give some feedback on this patch series, which is touching the Lua integration in Buildroot ?

See the full series at https://patchwork.ozlabs.org/project/buildroot/list/?series=178989

Thanks a lot!

Thomas

Quoted 10 lines · On Sun, 24 May 2020 18:48:37 -0600 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(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com