Skip to contentSkip to conversation

package/nodejs: bypass configure shell wrapper

PATCH Applied James Hilliard 3 participants 3 messages Oct 25, 2022 – Nov 5, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/nodejs: bypass configure shell wrapper

The configure file is a shell script which searches for a predefined python binary and then calls configure.py with that.

As we already call configure with the desired python binary we should call configure.py directly so that the expected python binary is used and so that the shell wrapper doesn't throw spurious interpreter validation errors.

This also avoid spurious errors due to the configure shell wrapper missing supported python versions, for example this fixes:
Node.js configure: Found Python 3.11.0...
Please use python3.10 or python3.9 or python3.8 or python3.7 or python3.6.

	/usr/bin/python3.10 ./configure
---
 package/nodejs/nodejs.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/nodejs/nodejs.mk +2 -2
index 05456e3443..29a10b900f 100644
@@ -88,7 +88,7 @@ define HOST_NODEJS_CONFIGURE_CMDS
 		$(HOST_CONFIGURE_OPTS) \
 		PATH=$(@D)/bin:$(BR_PATH) \
 		PYTHON=$(HOST_DIR)/bin/python3 \
-		$(HOST_DIR)/bin/python3 ./configure \
+		$(HOST_DIR)/bin/python3 configure.py \
 		--prefix=$(HOST_DIR) \
 		--without-dtrace \
 		--without-etw \
@@ -200,7 +200,7 @@ define NODEJS_CONFIGURE_CMDS
 		LDFLAGS="$(NODEJS_LDFLAGS)" \
 		LD="$(TARGET_CXX)" \
 		PYTHON=$(HOST_DIR)/bin/python3 \
-		$(HOST_DIR)/bin/python3 ./configure \
+		$(HOST_DIR)/bin/python3 configure.py \
 		--prefix=/usr \
 		--dest-cpu=$(NODEJS_CPU) \
 		$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 12 lines · On Tue, 25 Oct 2022 13:02:36 -0600 James Hilliard <[email protected]>…

The configure file is a shell script which searches for a predefined python binary and then calls configure.py with that.

As we already call configure with the desired python binary we should call configure.py directly so that the expected python binary is used and so that the shell wrapper doesn't throw spurious interpreter validation errors.

This also avoid spurious errors due to the configure shell wrapper missing supported python versions, for example this fixes:
Node.js configure: Found Python 3.11.0...
Please use python3.10 or python3.9 or python3.8 or python3.7 or python3.6.

Quoted 6 lines
	/usr/bin/python3.10 ./configure
---
 package/nodejs/nodejs.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to James Hilliard
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"James" == James Hilliard <[email protected]> writes:

The configure file is a shell script which searches for a predefined python binary and then calls configure.py with that.

As we already call configure with the desired python binary we should call configure.py directly so that the expected python binary is used and so that the shell wrapper doesn't throw spurious interpreter validation errors.

Quoted 7 lines

This also avoid spurious errors due to the configure shell wrapper missing supported python versions, for example this fixes:
Node.js configure: Found Python 3.11.0...
Please use python3.10 or python3.9 or python3.8 or python3.7 or python3.6.

	/usr/bin/python3.10 ./configure

Committed to 2022.08.x and 2022.02.x, thanks.

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