package/turbolua: new package
v2 cover package/turbolua: new package
Hi,
This is the second attempt for adding turbolua. Changes include mostly Thomas and Arnout suggestions.
Changes v1 -> v2:
* Use TARGET_CONFIGURE_OPTS instead of CC and LD only
* Bump to upstream HEAD version to handle TARGET_CONFIGURE_OPTS correctly
* Add comment for dependency on disabled Thumb2
* Reduce help block column size in Config.in
* Add URL of the project homepage
* Disable SSL support when OpenSSL is not selected
Marcin Niestroj (1):
package/turbolua: new package
package/Config.in | 1 + package/turbolua/Config.in | 18 ++++++++++++++++++ package/turbolua/turbolua.hash | 2 ++ package/turbolua/turbolua.mk | 30 ++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 package/turbolua/Config.in create mode 100644 package/turbolua/turbolua.hash create mode 100644 package/turbolua/turbolua.mk
Signature · 1 line
2.8.0
PATCH v2 1/1 package/turbolua: new package
--- package/Config.in | 1 + package/turbolua/Config.in | 18 ++++++++++++++++++ package/turbolua/turbolua.hash | 2 ++ package/turbolua/turbolua.mk | 30 ++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 package/turbolua/Config.in create mode 100644 package/turbolua/turbolua.hash create mode 100644 package/turbolua/turbolua.mk
package/Config.in +1 -0
@@ -540,6 +540,7 @@ menu "Lua libraries/modules" source "package/lzlib/Config.in" source "package/orbit/Config.in" source "package/rings/Config.in" + source "package/turbolua/Config.in" source "package/wsapi/Config.in" source "package/xavante/Config.in" endmenu
package/turbolua/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_TURBOLUA + bool "turbolua" + depends on BR2_PACKAGE_LUAJIT + # Turbolua program within thumb2 system receives "Illegal + # instruction" and "Segmentation fault" errors. + depends on !BR2_ARM_INSTRUCTIONS_THUMB2 + help + Turbo.lua is a framework built for LuaJIT 2 to simplify the + task of building fast and scalable network applications. It + uses a event-driven, non-blocking, no thread design to deliver + excellent performance and minimal footprint to high-load + applications while also providing excellent support for + embedded uses. The toolkit can be used for HTTP REST API?s, + traditional dynamic web pages through templating, open + connections like WebSockets, or just as high level building + blocks for native speed network applications. + + http://www.turbolua.org
package/turbolua/turbolua.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 25dbc148e49ce46ecde34057fa88cb8590efeec3f5814ebaa6ce3b1470e71764 turbolua-51dabab52ec957438645fa227f0135c1221f126b.tar.gz
package/turbolua/turbolua.mk new file +30 -0
@@ -0,0 +1,30 @@ +################################################################################ +# +# turbolua +# +################################################################################ + +TURBOLUA_VERSION = 51dabab52ec957438645fa227f0135c1221f126b +TURBOLUA_SITE = $(call github,kernelsauce,turbo,$(TURBOLUA_VERSION)) +TURBOLUA_DEPENDENCIES = luajit +TURBOLUA_LICENSE = Apache-2.0 +TURBOLUA_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SSL = openssl +else +SSL = none +endif + +define TURBOLUA_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) SSL="$(SSL)" \ + LUAJIT_VERSION="$(LUAJIT_VERSION)" -C $(@D) all +endef + +define TURBOLUA_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) SSL="$(SSL)" LDCONFIG=true \ + LUAJIT_VERSION="$(LUAJIT_VERSION)" \ + PREFIX="$(TARGET_DIR)/usr" -C $(@D) install +endef + +$(eval $(generic-package))
Signature · 1 line
2.8.0
PATCH v2 1/1 package/turbolua: new package
Hello,
package/turbolua/Config.in line 6
Quoted 12 lines · Marcin Niestroj
package/turbolua/Config.in new file +6
-0@@ -0,0 +1,18 @@ +config BR2_PACKAGE_TURBOLUA + bool "turbolua" + depends on BR2_PACKAGE_LUAJIT + # Turbolua program within thumb2 system receives "Illegal + # instruction" and "Segmentation fault" errors. + depends on !BR2_ARM_INSTRUCTIONS_THUMB2
Ok, so there is probably no inherent problem, it's just that it happens to not work. What I dislike a bit with such dependency is that you probably don't have tested on the full range of architectures that are supported in Buildroot. So I generally prefer when we add such dependencies when the software can really technically not work on the architecture, not when there is some random bug that prevents it.
But oh well, I won't oppose to this dependency being added.
package/turbolua/Config.in line 11
Quoted 5 lines
package/turbolua/Config.in new file +5
-0+ifeq ($(BR2_PACKAGE_OPENSSL),y) +SSL = openssl +else +SSL = none +endif
The namespace of variables is global, so SSL is not a good variable named, it should be TURBOLUA_SSL.
package/turbolua/Config.in
Quoted 10 lines
package/turbolua/Config.in new file +10
-0+define TURBOLUA_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) SSL="$(SSL)" \ + LUAJIT_VERSION="$(LUAJIT_VERSION)" -C $(@D) all +endef + +define TURBOLUA_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) SSL="$(SSL)" LDCONFIG=true \ + LUAJIT_VERSION="$(LUAJIT_VERSION)" \ + PREFIX="$(TARGET_DIR)/usr" -C $(@D) install +endef
What about defining:
TURBOLUA_MAKE_OPTS = \ $(TARGET_CONFIGURE_OPTS) \ SSL=$(if $(BR2_PACKAGE_OPENSSL),openssl,none) \ LUAJIT_VERSION="$(LUAJIT_VERSION)"
and use it in the build and install steps ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 package/turbolua: new package
Hi,
Quoted 24 lines · Thomas Petazzoni
Hello,
package/turbolua/Config.in line 6
Quoted 12 lines · Marcin Niestroj
package/turbolua/Config.in new file +6
-0@@ -0,0 +1,18 @@ +config BR2_PACKAGE_TURBOLUA + bool "turbolua" + depends on BR2_PACKAGE_LUAJIT + # Turbolua program within thumb2 system receives "Illegal + # instruction" and "Segmentation fault" errors. + depends on !BR2_ARM_INSTRUCTIONS_THUMB2Ok, so there is probably no inherent problem, it's just that it happens to not work. What I dislike a bit with such dependency is that you probably don't have tested on the full range of architectures that are supported in Buildroot. So I generally prefer when we add such dependencies when the software can really technically not work on the architecture, not when there is some random bug that prevents it.
Quoted 2 lines
But oh well, I won't oppose to this dependency being added.
I had a look on these issues trying to debug them. It is not clear that it is an issue with Turbolua. Now I think that it is rather LuaJIT bug, than Turbolua. It also doesn't happen in all configurations. For example this is not reproducible when we enable -fstack-protector-all (with -fstack-protector-strong it is still reproducible).
So I think the best will be to remove this dependency.
Quoted 23 lines
package/turbolua/Config.in line 11
Quoted 6 lines
package/turbolua/Config.in new file +5
-0+ifeq ($(BR2_PACKAGE_OPENSSL),y) +SSL = openssl +else +SSL = none +endifThe namespace of variables is global, so SSL is not a good variable named, it should be
TURBOLUA_SSL.package/turbolua/Config.in
Quoted 10 lines
package/turbolua/Config.in new file +10
-0+define TURBOLUA_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) SSL="$(SSL)" \ + LUAJIT_VERSION="$(LUAJIT_VERSION)" -C $(@D) all +endef + +define TURBOLUA_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) SSL="$(SSL)" LDCONFIG=true \ + LUAJIT_VERSION="$(LUAJIT_VERSION)" \ + PREFIX="$(TARGET_DIR)/usr" -C $(@D) install +endefWhat about defining:
Quoted 6 lines
TURBOLUA_MAKE_OPTS = \ $(TARGET_CONFIGURE_OPTS) \ SSL=$(if $(BR2_PACKAGE_OPENSSL),openssl,none) \ LUAJIT_VERSION="$(LUAJIT_VERSION)"and use it in the build and install steps ?
Thanks for hints! I will fix it and repost patch.
Quoted 5 lines
Best regards,
Thomas
Signature · 1 line
Marcin Niestroj