Skip to contentSkip to conversation

package/nodejs: clean up DEPENDENCIES

PATCH Applied Arnout Vandecappelle (Essensium/Mind) 3 participants 6 messages May 12, 2022 – May 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/nodejs: clean up DEPENDENCIES

One per line, and alphabetical (was already the case for host).

---
 package/nodejs/nodejs.mk | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
package/nodejs/nodejs.mk +14 -3
index 6dcaf34aa4..909347eb2e 100644
@@ -7,10 +7,21 @@
 NODEJS_VERSION = 16.15.0
 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz
 NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
-NODEJS_DEPENDENCIES = host-qemu host-pkgconf host-python3 host-nodejs c-ares \
-	libuv zlib nghttp2 \
+NODEJS_DEPENDENCIES = \
+	c-ares \
+	host-nodejs \
+	host-pkgconf \
+	host-python3 \
+	host-qemu \
+	libuv \
+	nghttp2 \
+	zlib \
 	$(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS))
-HOST_NODEJS_DEPENDENCIES = host-icu host-libopenssl host-pkgconf host-python3 \
+HOST_NODEJS_DEPENDENCIES = \
+	host-icu \
+	host-libopenssl \
+	host-pkgconf \
+	host-python3 \
 	host-zlib
 NODEJS_INSTALL_STAGING = YES
 NODEJS_LICENSE = MIT (core code); MIT, Apache and BSD family licenses (Bundled components)
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/nodejs: use ninja for build

Not only is ninja much faster, it also avoids the following build failure:
make[3]: printf: Argument list too long

This failure happens when the output directory is about 6 levels deep. It's due to the make generator of gyp that uses some crazy shell processing for splitting up paths on /. The ninja generator does no such thing.

While we're at it, remove redundant parenthesis in HOST_NODEJS_CONFIGURE_CMDS.

---
 package/nodejs/nodejs.mk | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
package/nodejs/nodejs.mk +6 -3
index 909347eb2e..70febca74f 100644
@@ -10,6 +10,7 @@ NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
 NODEJS_DEPENDENCIES = \
 	c-ares \
 	host-nodejs \
+	host-ninja \
 	host-pkgconf \
 	host-python3 \
 	host-qemu \
@@ -20,6 +21,7 @@ NODEJS_DEPENDENCIES = \
 HOST_NODEJS_DEPENDENCIES = \
 	host-icu \
 	host-libopenssl \
+	host-ninja \
 	host-pkgconf \
 	host-python3 \
 	host-zlib
@@ -37,7 +39,8 @@ NODEJS_CONF_OPTS = \
 	--without-dtrace \
 	--without-etw \
 	--cross-compiling \
-	--dest-os=linux
+	--dest-os=linux \
+	--ninja
 
 HOST_NODEJS_MAKE_OPTS = \
 	$(HOST_CONFIGURE_OPTS) \
@@ -82,7 +85,7 @@ NODEJS_CONF_OPTS += --without-npm
 endif
 
 define HOST_NODEJS_CONFIGURE_CMDS
-	(cd $(@D); \
+	cd $(@D); \
 		$(HOST_CONFIGURE_OPTS) \
 		PATH=$(@D)/bin:$(BR_PATH) \
 		PYTHON=$(HOST_DIR)/bin/python3 \
@@ -96,7 +99,7 @@ define HOST_NODEJS_CONFIGURE_CMDS
 		--shared-zlib \
 		--no-cross-compiling \
 		--with-intl=system-icu \
-	)
+		--ninja
 endef
 
 NODEJS_HOST_TOOLS_V8 = \
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/2] package/nodejs: use ninja for build

Arnout, All,

On 2022-05-12 14:12 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:

Quoted 11 lines

Not only is ninja much faster, it also avoids the following build failure:
make[3]: printf: Argument list too long

This failure happens when the output directory is about 6 levels deep. It's due to the make generator of gyp that uses some crazy shell processing for splitting up paths on /. The ninja generator does no such thing.

While we're at it, remove redundant parenthesis in HOST_NODEJS_CONFIGURE_CMDS.

Thank you! \o/

Quoted 1 line

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 59 lines
---
 package/nodejs/nodejs.mk | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
package/nodejs/nodejs.mk +6 -3
index 909347eb2e..70febca74f 100644
@@ -10,6 +10,7 @@ NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
 NODEJS_DEPENDENCIES = \
 	c-ares \
 	host-nodejs \
+	host-ninja \
 	host-pkgconf \
 	host-python3 \
 	host-qemu \
@@ -20,6 +21,7 @@ NODEJS_DEPENDENCIES = \
 HOST_NODEJS_DEPENDENCIES = \
 	host-icu \
 	host-libopenssl \
+	host-ninja \
 	host-pkgconf \
 	host-python3 \
 	host-zlib
@@ -37,7 +39,8 @@ NODEJS_CONF_OPTS = \
 	--without-dtrace \
 	--without-etw \
 	--cross-compiling \
-	--dest-os=linux
+	--dest-os=linux \
+	--ninja
 
 HOST_NODEJS_MAKE_OPTS = \
 	$(HOST_CONFIGURE_OPTS) \
@@ -82,7 +85,7 @@ NODEJS_CONF_OPTS += --without-npm
 endif
 
 define HOST_NODEJS_CONFIGURE_CMDS
-	(cd $(@D); \
+	cd $(@D); \
 		$(HOST_CONFIGURE_OPTS) \
 		PATH=$(@D)/bin:$(BR_PATH) \
 		PYTHON=$(HOST_DIR)/bin/python3 \
@@ -96,7 +99,7 @@ define HOST_NODEJS_CONFIGURE_CMDS
 		--shared-zlib \
 		--no-cross-compiling \
 		--with-intl=system-icu \
-	)
+		--ninja
 endef
 
 NODEJS_HOST_TOOLS_V8 = \
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 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.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Arnout Vandecappelle (Essensium/Mind)

Arnout, All,

On 2022-05-12 14:12 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:

Quoted 13 lines

One per line, and alphabetical (was already the case for host).

---
 package/nodejs/nodejs.mk | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
package/nodejs/nodejs.mk +0 -0
index 6dcaf34aa4..909347eb2e 100644
@@ -7,10 +7,21 @@
 NODEJS_VERSION = 16.15.0

package/nodejs/nodejs.mk line 15

Quoted 10 lines
package/nodejs/nodejs.mk +6 -2
 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz
 NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
-NODEJS_DEPENDENCIES = host-qemu host-pkgconf host-python3 host-nodejs c-ares \
-	libuv zlib nghttp2 \
+NODEJS_DEPENDENCIES = \
+	c-ares \
+	host-nodejs \
+	host-pkgconf \
+	host-python3 \
+	host-qemu \

I prefer when all host dependencies go first, then all target dependencies, so I've also lightly re-oredered.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 20 lines
package/nodejs/nodejs.mk +8 -1
+	libuv \
+	nghttp2 \
+	zlib \
 	$(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS))
-HOST_NODEJS_DEPENDENCIES = host-icu host-libopenssl host-pkgconf host-python3 \
+HOST_NODEJS_DEPENDENCIES = \
+	host-icu \
+	host-libopenssl \
+	host-pkgconf \
+	host-python3 \
 	host-zlib
 NODEJS_INSTALL_STAGING = YES
 NODEJS_LICENSE = MIT (core code); MIT, Apache and BSD family licenses (Bundled components)
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 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.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
Quoted 21 lines · Yann E. MORIN

Arnout, All,

On 2022-05-12 14:12 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:

Quoted 18 lines

One per line, and alphabetical (was already the case for host).

---
  package/nodejs/nodejs.mk | 17 ++++++++++++++---
  1 file changed, 14 insertions(+), 3 deletions(-)
package/nodejs/nodejs.mk +1 -2
index 6dcaf34aa4..909347eb2e 100644
@@ -7,10 +7,21 @@
  NODEJS_VERSION = 16.15.0
  NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz
  NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
-NODEJS_DEPENDENCIES = host-qemu host-pkgconf host-python3 host-nodejs c-ares \
-	libuv zlib nghttp2 \
+NODEJS_DEPENDENCIES = \
Quoted 8 lines

package/nodejs/nodejs.mk line 15

Quoted 5 lines
package/nodejs/nodejs.mk +5 -0
+	c-ares \
+	host-nodejs \
+	host-pkgconf \
+	host-python3 \
+	host-qemu \

I prefer when all host dependencies go first, then all target dependencies, so I've also lightly re-oredered.

I actually prefer that as well. So good call!

Regards,
Arnout

Quoted 22 lines

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 16 lines
package/nodejs/nodejs.mk +8 -1
+	libuv \
+	nghttp2 \
+	zlib \
  	$(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS))
-HOST_NODEJS_DEPENDENCIES = host-icu host-libopenssl host-pkgconf host-python3 \
+HOST_NODEJS_DEPENDENCIES = \
+	host-icu \
+	host-libopenssl \
+	host-pkgconf \
+	host-python3 \
  	host-zlib
  NODEJS_INSTALL_STAGING = YES
  NODEJS_LICENSE = MIT (core code); MIT, Apache and BSD family licenses (Bundled components)
Signature · 1 line
2.35.1
Quoted 5 lines
Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw
In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

One per line, and alphabetical (was already the case for host).

Committed to 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot