All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version
@ 2015-06-14 16:12 Martin Bark
  2015-06-14 16:12 ` [Buildroot] [PATCH 2/4] package/nodejs: Add node.js v0.12.4 and set as the default version Martin Bark
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Martin Bark @ 2015-06-14 16:12 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Martin Bark <martin@barkynet.com>
---
 .../{ => 0.10.38}/0001-remove-python-bz2-dependency.patch  |  0
 .../0002-gyp-force-link-command-to-use-CXX.patch           |  0
 .../nodejs/{ => 0.10.38}/0003-use-python-variable.patch    |  0
 .../0004-fix-build-error-without-OpenSSL-support.patch     |  0
 package/nodejs/Config.in                                   | 14 ++++++++++++++
 package/nodejs/nodejs.mk                                   |  2 +-
 6 files changed, 15 insertions(+), 1 deletion(-)
 rename package/nodejs/{ => 0.10.38}/0001-remove-python-bz2-dependency.patch (100%)
 rename package/nodejs/{ => 0.10.38}/0002-gyp-force-link-command-to-use-CXX.patch (100%)
 rename package/nodejs/{ => 0.10.38}/0003-use-python-variable.patch (100%)
 rename package/nodejs/{ => 0.10.38}/0004-fix-build-error-without-OpenSSL-support.patch (100%)

diff --git a/package/nodejs/0001-remove-python-bz2-dependency.patch b/package/nodejs/0.10.38/0001-remove-python-bz2-dependency.patch
similarity index 100%
rename from package/nodejs/0001-remove-python-bz2-dependency.patch
rename to package/nodejs/0.10.38/0001-remove-python-bz2-dependency.patch
diff --git a/package/nodejs/0002-gyp-force-link-command-to-use-CXX.patch b/package/nodejs/0.10.38/0002-gyp-force-link-command-to-use-CXX.patch
similarity index 100%
rename from package/nodejs/0002-gyp-force-link-command-to-use-CXX.patch
rename to package/nodejs/0.10.38/0002-gyp-force-link-command-to-use-CXX.patch
diff --git a/package/nodejs/0003-use-python-variable.patch b/package/nodejs/0.10.38/0003-use-python-variable.patch
similarity index 100%
rename from package/nodejs/0003-use-python-variable.patch
rename to package/nodejs/0.10.38/0003-use-python-variable.patch
diff --git a/package/nodejs/0004-fix-build-error-without-OpenSSL-support.patch b/package/nodejs/0.10.38/0004-fix-build-error-without-OpenSSL-support.patch
similarity index 100%
rename from package/nodejs/0004-fix-build-error-without-OpenSSL-support.patch
rename to package/nodejs/0.10.38/0004-fix-build-error-without-OpenSSL-support.patch
diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
index 3140683..8b0573a 100644
--- a/package/nodejs/Config.in
+++ b/package/nodejs/Config.in
@@ -22,6 +22,20 @@ comment "nodejs needs a toolchain w/ C++, threads"
 
 if BR2_PACKAGE_NODEJS
 
+choice
+	prompt "Node.js Version"
+	default BR2_BR2_PACKAGE_NODEJS_0_10_38
+	help
+	  Select the version of Node.js you wish to use.
+
+	config BR2_BR2_PACKAGE_NODEJS_0_10_38
+		bool "v0.10.38"
+
+endchoice
+
+config BR2_PACKAGE_NODEJS_VERSION_STRING
+	string
+	default "0.10.38"	if BR2_BR2_PACKAGE_NODEJS_0_10_38
 menu "Module Selection"
 
 config BR2_PACKAGE_NODEJS_NPM
diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index 5ee7714..59e03b0 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-NODEJS_VERSION = 0.10.38
+NODEJS_VERSION = $(call qstrip,$(BR2_PACKAGE_NODEJS_VERSION_STRING))
 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz
 NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
 NODEJS_DEPENDENCIES = host-python host-nodejs zlib \
-- 
2.1.4

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

* [Buildroot] [PATCH 2/4] package/nodejs: Add node.js v0.12.4 and set as the default version
  2015-06-14 16:12 [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version Martin Bark
@ 2015-06-14 16:12 ` Martin Bark
  2015-06-14 16:12 ` [Buildroot] [PATCH 3/4] package/nodejs: Add global node_module to the PATH Martin Bark
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Martin Bark @ 2015-06-14 16:12 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Martin Bark <martin@barkynet.com>
---
 ...01-Remove-dependency-on-Python-bz2-module.patch | 38 +++++++++++++
 .../0002-gyp-force-link-command-to-use-CXX.patch   | 27 ++++++++++
 ...hon-variable-instead-of-hardcoding-Python.patch | 62 ++++++++++++++++++++++
 ...4-fix-build-error-without-OpenSSL-support.patch | 45 ++++++++++++++++
 package/nodejs/Config.in                           |  6 ++-
 package/nodejs/nodejs.hash                         |  3 ++
 6 files changed, 180 insertions(+), 1 deletion(-)
 create mode 100644 package/nodejs/0.12.4/0001-Remove-dependency-on-Python-bz2-module.patch
 create mode 100644 package/nodejs/0.12.4/0002-gyp-force-link-command-to-use-CXX.patch
 create mode 100644 package/nodejs/0.12.4/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
 create mode 100644 package/nodejs/0.12.4/0004-fix-build-error-without-OpenSSL-support.patch

diff --git a/package/nodejs/0.12.4/0001-Remove-dependency-on-Python-bz2-module.patch b/package/nodejs/0.12.4/0001-Remove-dependency-on-Python-bz2-module.patch
new file mode 100644
index 0000000..d2cb0b7
--- /dev/null
+++ b/package/nodejs/0.12.4/0001-Remove-dependency-on-Python-bz2-module.patch
@@ -0,0 +1,38 @@
+From 2f57d17b8b1a8cb78bd9cff874a006adba3afd4a Mon Sep 17 00:00:00 2001
+From: Martin Bark <martin@barkynet.com>
+Date: Thu, 11 Jun 2015 20:05:11 +0100
+Subject: [PATCH 1/4] Remove dependency on Python bz2 module
+
+The Python bz2 module is only needed in certain cases, so only import
+it when needed. In the normal nodejs build, this allows to remove the
+dependency on this module.
+
+Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Martin Bark <martin@barkynet.com>
+---
+ deps/v8/tools/js2c.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/deps/v8/tools/js2c.py b/deps/v8/tools/js2c.py
+index 77485f6..371caf5 100755
+--- a/deps/v8/tools/js2c.py
++++ b/deps/v8/tools/js2c.py
+@@ -34,7 +34,6 @@
+ import os, re, sys, string
+ import optparse
+ import jsmin
+-import bz2
+ import textwrap
+ 
+ 
+@@ -492,6 +491,7 @@ def CompressMaybe(sources, compression_type):
+   if compression_type == "off":
+     return sources_bytes
+   elif compression_type == "bz2":
++    import bz2
+     return bz2.compress(sources_bytes)
+   else:
+     raise Error("Unknown compression type %s." % compression_type)
+-- 
+2.1.4
+
diff --git a/package/nodejs/0.12.4/0002-gyp-force-link-command-to-use-CXX.patch b/package/nodejs/0.12.4/0002-gyp-force-link-command-to-use-CXX.patch
new file mode 100644
index 0000000..ef86e5f
--- /dev/null
+++ b/package/nodejs/0.12.4/0002-gyp-force-link-command-to-use-CXX.patch
@@ -0,0 +1,27 @@
+From 04bda7143f7ea6c6e6b659b73547b463f7e28c65 Mon Sep 17 00:00:00 2001
+From: Martin Bark <martin@barkynet.com>
+Date: Thu, 11 Jun 2015 19:27:46 +0100
+Subject: [PATCH 2/4] gyp: force link command to use CXX
+
+Cc: Samuel Martin <s.martin49@gmail.com>
+Signed-off-by: Martin Bark <martin@barkynet.com>
+---
+ tools/gyp/pylib/gyp/generator/make.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py
+index b88a433..0a1f2e0 100644
+--- a/tools/gyp/pylib/gyp/generator/make.py
++++ b/tools/gyp/pylib/gyp/generator/make.py
+@@ -141,7 +141,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+ # special "figure out circular dependencies" flags around the entire
+ # input list during linking.
+ quiet_cmd_link = LINK($(TOOLSET)) $@
+-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
++cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
+ 
+ # We support two kinds of shared objects (.so):
+ # 1) shared_library, which is just bundling together many dependent libraries
+-- 
+2.1.4
+
diff --git a/package/nodejs/0.12.4/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch b/package/nodejs/0.12.4/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
new file mode 100644
index 0000000..0a21a61
--- /dev/null
+++ b/package/nodejs/0.12.4/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
@@ -0,0 +1,62 @@
+From d6cc10f0765c97c402b1c1be0968f9d9eb112da9 Mon Sep 17 00:00:00 2001
+From: Martin Bark <martin@barkynet.com>
+Date: Thu, 11 Jun 2015 19:25:09 +0100
+Subject: [PATCH 3/4] Use a python variable instead of hardcoding Python
+
+The nodejs build system uses python in a number of locations. However,
+there are some locations where it hardcodes 'python' as the Python
+interpreter. However, this causes problems when we need to use python2
+instead of just python.
+
+This patch fixes that by using the python variable already in place in
+the nodejs build system.
+
+Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Martin Bark <martin@barkynet.com>
+---
+ deps/v8/tools/gyp/v8.gyp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp
+index c703155..06c0b2b 100644
+--- a/deps/v8/tools/gyp/v8.gyp
++++ b/deps/v8/tools/gyp/v8.gyp
+@@ -1353,7 +1353,7 @@
+             'outputs': [
+               '<(PRODUCT_DIR)/natives_blob.bin',
+             ],
+-            'action': ['python', '<@(_inputs)', '<@(_outputs)'],
++            'action': ['<(python)', '<@(_inputs)', '<@(_outputs)'],
+           }],
+         }],
+         ['want_separate_host_toolset==1', {
+@@ -1435,7 +1435,7 @@
+             '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
+           ],
+           'action': [
+-            'python',
++            '<(python)',
+             '../../tools/js2c.py',
+             '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
+             'CORE',
+@@ -1462,7 +1462,7 @@
+             '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
+           ],
+           'action': [
+-            'python',
++            '<(python)',
+             '../../tools/js2c.py',
+             '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
+             'EXPERIMENTAL',
+@@ -1500,7 +1500,7 @@
+               '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
+             ],
+             'action': [
+-              'python',
++              '<(python)',
+               '../../tools/gen-postmortem-metadata.py',
+               '<@(_outputs)',
+               '<@(heapobject_files)'
+-- 
+2.1.4
+
diff --git a/package/nodejs/0.12.4/0004-fix-build-error-without-OpenSSL-support.patch b/package/nodejs/0.12.4/0004-fix-build-error-without-OpenSSL-support.patch
new file mode 100644
index 0000000..aab6a31
--- /dev/null
+++ b/package/nodejs/0.12.4/0004-fix-build-error-without-OpenSSL-support.patch
@@ -0,0 +1,45 @@
+From ce288a677d89c72c2f4cd832dc4afb2e21ae060e Mon Sep 17 00:00:00 2001
+From: Martin Bark <martin@barkynet.com>
+Date: Thu, 11 Jun 2015 19:57:40 +0100
+Subject: [PATCH 4/4] fix build error without OpenSSL support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Cc: J?rg Krause <jkrause@posteo.de>
+Signed-off-by: Martin Bark <martin@barkynet.com>
+---
+ src/node.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/node.cc b/src/node.cc
+index e669706..d43b791 100644
+--- a/src/node.cc
++++ b/src/node.cc
+@@ -2934,8 +2934,10 @@ static void PrintHelp() {
+          "                       present.\n"
+ #endif
+ #endif
++#if HAVE_OPENSSL
+          "  --enable-ssl2        enable ssl2\n"
+          "  --enable-ssl3        enable ssl3\n"
++#endif
+          "\n"
+          "Environment variables:\n"
+ #ifdef _WIN32
+@@ -3003,10 +3005,12 @@ static void ParseArgs(int* argc,
+     } else if (strcmp(arg, "--version") == 0 || strcmp(arg, "-v") == 0) {
+       printf("%s\n", NODE_VERSION);
+       exit(0);
++#if HAVE_OPENSSL
+     } else if (strcmp(arg, "--enable-ssl2") == 0) {
+       SSL2_ENABLE = true;
+     } else if (strcmp(arg, "--enable-ssl3") == 0) {
+       SSL3_ENABLE = true;
++#endif
+     } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {
+       PrintHelp();
+       exit(0);
+-- 
+2.1.4
+
diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
index 8b0573a..75d8e4b 100644
--- a/package/nodejs/Config.in
+++ b/package/nodejs/Config.in
@@ -24,18 +24,22 @@ if BR2_PACKAGE_NODEJS
 
 choice
 	prompt "Node.js Version"
-	default BR2_BR2_PACKAGE_NODEJS_0_10_38
+	default BR2_BR2_PACKAGE_NODEJS_0_12_4
 	help
 	  Select the version of Node.js you wish to use.
 
 	config BR2_BR2_PACKAGE_NODEJS_0_10_38
 		bool "v0.10.38"
 
+	config BR2_BR2_PACKAGE_NODEJS_0_12_4
+		bool "v0.12.4"
 endchoice
 
 config BR2_PACKAGE_NODEJS_VERSION_STRING
 	string
 	default "0.10.38"	if BR2_BR2_PACKAGE_NODEJS_0_10_38
+	default "0.12.4"	if BR2_BR2_PACKAGE_NODEJS_0_12_4
+
 menu "Module Selection"
 
 config BR2_PACKAGE_NODEJS_NPM
diff --git a/package/nodejs/nodejs.hash b/package/nodejs/nodejs.hash
index 792ebc1..8b5551b 100644
--- a/package/nodejs/nodejs.hash
+++ b/package/nodejs/nodejs.hash
@@ -1,2 +1,5 @@
 # From upstream URL: http://nodejs.org/dist/v0.10.38/SHASUMS256.txt
 sha256	513da8ed5e48abefdfab664f1cabc160238d314a0481148804aff8fc6552b78b  node-v0.10.38.tar.gz
+
+# From upstream URL: http://nodejs.org/dist/v0.12.4/SHASUMS256.txt
+sha256	3298d0997613a04ac64343e8316da134d04588132554ae402eb344e3369ec912  node-v0.12.4.tar.gz
-- 
2.1.4

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

* [Buildroot] [PATCH 3/4] package/nodejs: Add global node_module to the PATH
  2015-06-14 16:12 [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version Martin Bark
  2015-06-14 16:12 ` [Buildroot] [PATCH 2/4] package/nodejs: Add node.js v0.12.4 and set as the default version Martin Bark
@ 2015-06-14 16:12 ` Martin Bark
  2015-06-14 16:12 ` [Buildroot] [PATCH 4/4] package/nodejs: Define NPM command for other packages to use Martin Bark
  2015-06-14 20:53 ` [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version Thomas Petazzoni
  3 siblings, 0 replies; 7+ messages in thread
From: Martin Bark @ 2015-06-14 16:12 UTC (permalink / raw)
  To: buildroot

This patch adds /usr/lib/node_modules/.bin to PATH so that global
node_modules are accessible from the command line

Signed-off-by: Martin Bark <martin@barkynet.com>
---
 package/nodejs/nodejs.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index 59e03b0..5d95f77 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -111,6 +111,11 @@ define NODEJS_INSTALL_MODULES
 		$(HOST_DIR)/usr/bin/npm install \
 		$(NODEJS_MODULES_LIST) \
 	)
+
+	# Add global node_modules to PATH
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/profile.d
+	printf "export PATH=\x24PATH:/usr/lib/node_modules/.bin\n" \
+		>$(TARGET_DIR)/etc/profile.d/node_modules.sh
 endef
 endif
 
-- 
2.1.4

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

* [Buildroot] [PATCH 4/4] package/nodejs: Define NPM command for other packages to use
  2015-06-14 16:12 [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version Martin Bark
  2015-06-14 16:12 ` [Buildroot] [PATCH 2/4] package/nodejs: Add node.js v0.12.4 and set as the default version Martin Bark
  2015-06-14 16:12 ` [Buildroot] [PATCH 3/4] package/nodejs: Add global node_module to the PATH Martin Bark
@ 2015-06-14 16:12 ` Martin Bark
  2015-06-14 20:53 ` [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version Thomas Petazzoni
  3 siblings, 0 replies; 7+ messages in thread
From: Martin Bark @ 2015-06-14 16:12 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Martin Bark <martin@barkynet.com>
---
 package/nodejs/nodejs.mk | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index 5d95f77..8cd4fd3 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -95,6 +95,13 @@ NODEJS_MODULES_LIST= $(call qstrip,\
 	$(if $(BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT),coffee-script) \
 	$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL))
 
+# Define NPM for other packages to use
+NPM = $(TARGET_CONFIGURE_OPTS) \
+	LD="$(TARGET_CXX)" \
+	npm_config_arch=$(NODEJS_CPU) \
+	npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \
+	$(HOST_DIR)/usr/bin/npm
+
 #
 # We can only call NPM if there's something to install.
 #
@@ -104,12 +111,7 @@ define NODEJS_INSTALL_MODULES
 	# npm install call below and setting npm_config_rollback=false can both
 	# help in diagnosing the problem.
 	(cd $(TARGET_DIR)/usr/lib && mkdir -p node_modules && \
-		$(TARGET_CONFIGURE_OPTS) \
-		LD="$(TARGET_CXX)" \
-		npm_config_arch=$(NODEJS_CPU) \
-		npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \
-		$(HOST_DIR)/usr/bin/npm install \
-		$(NODEJS_MODULES_LIST) \
+		$(NPM) install $(NODEJS_MODULES_LIST) \
 	)
 
 	# Add global node_modules to PATH
-- 
2.1.4

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

* [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version
  2015-06-14 16:12 [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version Martin Bark
                   ` (2 preceding siblings ...)
  2015-06-14 16:12 ` [Buildroot] [PATCH 4/4] package/nodejs: Define NPM command for other packages to use Martin Bark
@ 2015-06-14 20:53 ` Thomas Petazzoni
  2015-06-15  7:38   ` Jörg Krause
  3 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 20:53 UTC (permalink / raw)
  To: buildroot

Dear Martin Bark,

On Sun, 14 Jun 2015 17:12:53 +0100, Martin Bark wrote:
> Signed-off-by: Martin Bark <martin@barkynet.com>

What is the motivation for supporting more than one version of NodeJS
at a time?

We generally try to avoid supporting multiple versions of a given
component, unless there are some really good reasons to do so (like
python2 vs. python3, or qt4 vs. qt5).

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version
  2015-06-14 20:53 ` [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version Thomas Petazzoni
@ 2015-06-15  7:38   ` Jörg Krause
  2015-06-16  9:56     ` Martin Bark
  0 siblings, 1 reply; 7+ messages in thread
From: Jörg Krause @ 2015-06-15  7:38 UTC (permalink / raw)
  To: buildroot

Dear Thomas,

On So, 2015-06-14 at 22:53 +0200, Thomas Petazzoni wrote:
> Dear Martin Bark,
> 
> On Sun, 14 Jun 2015 17:12:53 +0100, Martin Bark wrote:
> > Signed-off-by: Martin Bark <martin@barkynet.com>
> 
> What is the motivation for supporting more than one version of NodeJS
> at a time?

Nodejs 0.10 and 0.12 use different versions of the V8 engine. The V8
version used in 0.12 unfortunatly dropped support for the ARMv5
architecture.

> We generally try to avoid supporting multiple versions of a given
> component, unless there are some really good reasons to do so (like
> python2 vs. python3, or qt4 vs. qt5).

Nodejs 0.10 is still maintaned and new versions will follow. I would
suggest to support both version until maintenance is dropped.

Best regards
J?rg Krause

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

* [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version
  2015-06-15  7:38   ` Jörg Krause
@ 2015-06-16  9:56     ` Martin Bark
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Bark @ 2015-06-16  9:56 UTC (permalink / raw)
  To: buildroot

Dear Thomas & J?rg,

On 15 June 2015 at 08:38, J?rg Krause <joerg.krause@embedded.rocks> wrote:
> Dear Thomas,
>
> On So, 2015-06-14 at 22:53 +0200, Thomas Petazzoni wrote:
>> Dear Martin Bark,
>>
>> What is the motivation for supporting more than one version of NodeJS
>> at a time?
>
> Nodejs 0.10 and 0.12 use different versions of the V8 engine. The V8
> version used in 0.12 unfortunatly dropped support for the ARMv5
> architecture.

Yes and now i think about it i probably should have added something like

    depends on !BR2_ARM_CPU_ARMV5

for node.js v0.12.4.  V8 after version 3.18 increased the minimum to
ARMv6 with VFPv2.  See
https://groups.google.com/forum/#!topic/v8-users/aSOFbaAQvMk.  To
confirm I just ran a test and the qemu_arm_versatile_defconfig will
build node.js v0.12.4 but it fails to run. qemu_arm_vexpress_defconfig
will build and run node v0.12.4.

>
>> We generally try to avoid supporting multiple versions of a given
>> component, unless there are some really good reasons to do so (like
>> python2 vs. python3, or qt4 vs. qt5).
>
> Nodejs 0.10 is still maintaned and new versions will follow. I would
> suggest to support both version until maintenance is dropped.
>

That was my thought too.  There are some details on the upcoming
0.10.39 release here https://github.com/joyent/node/milestones/0.10.39

Thanks

Martin

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

end of thread, other threads:[~2015-06-16  9:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-14 16:12 [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version Martin Bark
2015-06-14 16:12 ` [Buildroot] [PATCH 2/4] package/nodejs: Add node.js v0.12.4 and set as the default version Martin Bark
2015-06-14 16:12 ` [Buildroot] [PATCH 3/4] package/nodejs: Add global node_module to the PATH Martin Bark
2015-06-14 16:12 ` [Buildroot] [PATCH 4/4] package/nodejs: Define NPM command for other packages to use Martin Bark
2015-06-14 20:53 ` [Buildroot] [PATCH 1/4] package/nodejs: Update to allow selecting node.js version Thomas Petazzoni
2015-06-15  7:38   ` Jörg Krause
2015-06-16  9:56     ` Martin Bark

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.