Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/1] package/turbolua: new package
@ 2016-04-04  9:54 Marcin Niestroj
  2016-04-04  9:54 ` [Buildroot] [PATCH v2 1/1] " Marcin Niestroj
  0 siblings, 1 reply; 4+ messages in thread
From: Marcin Niestroj @ 2016-04-04  9:54 UTC (permalink / raw)
  To: buildroot

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

-- 
2.8.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/turbolua: new package
  2016-04-04  9:54 [Buildroot] [PATCH v2 0/1] package/turbolua: new package Marcin Niestroj
@ 2016-04-04  9:54 ` Marcin Niestroj
  2016-04-04 18:47   ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Marcin Niestroj @ 2016-04-04  9:54 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
 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

diff --git a/package/Config.in b/package/Config.in
index 1467f33..d58d863 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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
diff --git a/package/turbolua/Config.in b/package/turbolua/Config.in
new file mode 100644
index 0000000..a742097
--- /dev/null
+++ b/package/turbolua/Config.in
@@ -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
diff --git a/package/turbolua/turbolua.hash b/package/turbolua/turbolua.hash
new file mode 100644
index 0000000..d16c8c4
--- /dev/null
+++ b/package/turbolua/turbolua.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 25dbc148e49ce46ecde34057fa88cb8590efeec3f5814ebaa6ce3b1470e71764 turbolua-51dabab52ec957438645fa227f0135c1221f126b.tar.gz
diff --git a/package/turbolua/turbolua.mk b/package/turbolua/turbolua.mk
new file mode 100644
index 0000000..10a8ed7
--- /dev/null
+++ b/package/turbolua/turbolua.mk
@@ -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))
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/turbolua: new package
  2016-04-04  9:54 ` [Buildroot] [PATCH v2 1/1] " Marcin Niestroj
@ 2016-04-04 18:47   ` Thomas Petazzoni
  2016-04-06 19:15     ` Marcin Niestroj
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2016-04-04 18:47 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  4 Apr 2016 11:54:42 +0200, Marcin Niestroj wrote:

> diff --git a/package/turbolua/Config.in b/package/turbolua/Config.in
> new file mode 100644
> index 0000000..a742097
> --- /dev/null
> +++ b/package/turbolua/Config.in
> @@ -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.


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

> +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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] package/turbolua: new package
  2016-04-04 18:47   ` Thomas Petazzoni
@ 2016-04-06 19:15     ` Marcin Niestroj
  0 siblings, 0 replies; 4+ messages in thread
From: Marcin Niestroj @ 2016-04-06 19:15 UTC (permalink / raw)
  To: buildroot

Hi,

On 04.04.2016 20:47, Thomas Petazzoni wrote:
> Hello,
>
> On Mon,  4 Apr 2016 11:54:42 +0200, Marcin Niestroj wrote:
>
>> diff --git a/package/turbolua/Config.in b/package/turbolua/Config.in
>> new file mode 100644
>> index 0000000..a742097
>> --- /dev/null
>> +++ b/package/turbolua/Config.in
>> @@ -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.
>

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.

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

Thanks for hints! I will fix it and repost patch.

>
> Best regards,
>
> Thomas
>

-- 
Marcin Niestroj

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-06 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-04  9:54 [Buildroot] [PATCH v2 0/1] package/turbolua: new package Marcin Niestroj
2016-04-04  9:54 ` [Buildroot] [PATCH v2 1/1] " Marcin Niestroj
2016-04-04 18:47   ` Thomas Petazzoni
2016-04-06 19:15     ` Marcin Niestroj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox