* [Buildroot] [PATCH] package/nodejs: fix parallel build
@ 2023-09-23 9:39 Jens Maus via buildroot
2023-09-23 10:09 ` Yann E. MORIN
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Jens Maus via buildroot @ 2023-09-23 9:39 UTC (permalink / raw)
To: buildroot; +Cc: Martin Bark, Daniel Price
In ninja-based nodejs builds performing parallel builds using "make -jX"
is not working during buildroot initiated builds because the JOBS
variable is set in the MAKE_OPTS variables in nodejs.mk. This commit
remedies the issue by setting JOBS to BR2_JLEVEL and also by fixing the
top-level Makefile of nodejs due to an incorrect tab-based indentation
being used. Furthermore, it is important to also set LD_LIBRARY_PATH in
v8-qemu-wrapper.in to our staging libdirs as otherwise execution of
build tools fail due to host OS libraries being preferred.
Signed-off-by: Jens Maus <mail@jens-maus.de>
---
...-fixing-Makefile-for-parallel-builds.patch | 37 +++++++++++++++++++
package/nodejs/nodejs.mk | 6 ++-
package/nodejs/v8-qemu-wrapper.in | 1 +
3 files changed, 42 insertions(+), 2 deletions(-)
create mode 100644 package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch
diff --git a/package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch b/package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch
new file mode 100644
index 0000000000..73db129979
--- /dev/null
+++ b/package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch
@@ -0,0 +1,37 @@
+From 1c4582c7dd7c80fbac89031d8fa8cf418249d01e Mon Sep 17 00:00:00 2001
+From: Jens Maus <mail@jens-maus.de>
+Date: Sat, 23 Sep 2023 11:09:50 +0200
+Subject: [PATCH] fixing Makefile for parallel builds
+
+This change fixing incorrect GNU makefile indentation in the top-level
+Makefile which causes issues with parallel "make -jXX" builds.
+
+Upstream: N/A (specific to buildroot builds)
+Signed-off-by: Jens Maus <mail@jens-maus.de>
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index b7871bf218..87c47bcc0b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -138,12 +138,12 @@ else
+ ifeq ($(BUILD_WITH), ninja)
+ NINJA ?= ninja
+ ifeq ($(V),1)
+- NINJA_ARGS := $(NINJA_ARGS) -v
++NINJA_ARGS := $(NINJA_ARGS) -v
+ endif
+ ifdef JOBS
+- NINJA_ARGS := $(NINJA_ARGS) -j$(JOBS)
++NINJA_ARGS := $(NINJA_ARGS) -j$(JOBS)
+ else
+- NINJA_ARGS := $(NINJA_ARGS) $(filter -j%,$(MAKEFLAGS))
++NINJA_ARGS := $(NINJA_ARGS) $(filter -j%,$(MAKEFLAGS))
+ endif
+ $(NODE_EXE): config.gypi out/Release/build.ninja
+ $(NINJA) -C out/Release $(NINJA_ARGS)
+--
+2.34.1
+
diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index fe629ada21..4e70bd71a3 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -46,14 +46,16 @@ HOST_NODEJS_MAKE_OPTS = \
CXXFLAGS="$(HOST_NODEJS_CXXFLAGS)" \
LDFLAGS.host="$(HOST_LDFLAGS)" \
NO_LOAD=cctest.target.mk \
- PATH=$(@D)/bin:$(BR_PATH)
+ PATH=$(@D)/bin:$(BR_PATH) \
+ JOBS=$(BR2_JLEVEL)
NODEJS_MAKE_OPTS = \
$(TARGET_CONFIGURE_OPTS) \
NO_LOAD=cctest.target.mk \
PATH=$(@D)/bin:$(BR_PATH) \
LDFLAGS="$(NODEJS_LDFLAGS)" \
- LD="$(TARGET_CXX)"
+ LD="$(TARGET_CXX)" \
+ JOBS=$(BR2_JLEVEL)
# nodejs's build system uses python which can be a symlink to an unsupported
# python version (e.g. python 3.10 with nodejs 14.18.1). We work around this by
diff --git a/package/nodejs/v8-qemu-wrapper.in b/package/nodejs/v8-qemu-wrapper.in
index e1083f47f7..48222d089b 100644
--- a/package/nodejs/v8-qemu-wrapper.in
+++ b/package/nodejs/v8-qemu-wrapper.in
@@ -5,5 +5,6 @@
exec @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ \
@QEMU_USERMODE_ARGS@ \
-L "${STAGING_DIR}/" \
+ -E LD_LIBRARY_PATH="${STAGING_DIR}/lib:${STAGING_DIR}/usr/lib/" \
"$@"
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH] package/nodejs: fix parallel build
2023-09-23 9:39 [Buildroot] [PATCH] package/nodejs: fix parallel build Jens Maus via buildroot
@ 2023-09-23 10:09 ` Yann E. MORIN
2023-09-23 11:07 ` Jens Maus via buildroot
2023-09-23 10:59 ` [Buildroot] [PATCH 1/1] package/nodejs: fix cross-compile builds Jens Maus via buildroot
2023-09-23 16:04 ` [Buildroot] [PATCH v2] package/nodejs: fix parallel build Jens Maus via buildroot
2 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2023-09-23 10:09 UTC (permalink / raw)
To: Jens Maus; +Cc: Daniel Price, Martin Bark, Thomas Petazzoni, buildroot
Jens, All,
+Thomas for the qemu part...
On 2023-09-23 11:39 +0200, Jens Maus via buildroot spake thusly:
> In ninja-based nodejs builds performing parallel builds using "make -jX"
> is not working during buildroot initiated builds because the JOBS
> variable is set in the MAKE_OPTS variables in nodejs.mk. This commit
> remedies the issue by setting JOBS to BR2_JLEVEL and also by fixing the
> top-level Makefile of nodejs due to an incorrect tab-based indentation
> being used. Furthermore, it is important to also set LD_LIBRARY_PATH in
> v8-qemu-wrapper.in to our staging libdirs as otherwise execution of
> build tools fail due to host OS libraries being preferred.
That are two different changes, so they should be two different patches.
The commit log is thus misleading, becausee you are not "just" fixing
the parallel build issue.
See below for more comments.
> Signed-off-by: Jens Maus <mail@jens-maus.de>
> ---
> ...-fixing-Makefile-for-parallel-builds.patch | 37 +++++++++++++++++++
> package/nodejs/nodejs.mk | 6 ++-
> package/nodejs/v8-qemu-wrapper.in | 1 +
> 3 files changed, 42 insertions(+), 2 deletions(-)
> create mode 100644 package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch
>
> diff --git a/package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch b/package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch
> new file mode 100644
> index 0000000000..73db129979
> --- /dev/null
> +++ b/package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch
> @@ -0,0 +1,37 @@
> +From 1c4582c7dd7c80fbac89031d8fa8cf418249d01e Mon Sep 17 00:00:00 2001
> +From: Jens Maus <mail@jens-maus.de>
> +Date: Sat, 23 Sep 2023 11:09:50 +0200
> +Subject: [PATCH] fixing Makefile for parallel builds
> +
> +This change fixing incorrect GNU makefile indentation in the top-level
> +Makefile which causes issues with parallel "make -jXX" builds.
> +
> +Upstream: N/A (specific to buildroot builds)
If the indentation is causing issues, then that's surely a fix that
*must* be sent upstream.
Also, please explain what the actual error is.
[--SNIP--]
> diff --git a/package/nodejs/v8-qemu-wrapper.in b/package/nodejs/v8-qemu-wrapper.in
> index e1083f47f7..48222d089b 100644
> --- a/package/nodejs/v8-qemu-wrapper.in
> +++ b/package/nodejs/v8-qemu-wrapper.in
> @@ -5,5 +5,6 @@
> exec @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ \
> @QEMU_USERMODE_ARGS@ \
> -L "${STAGING_DIR}/" \
> + -E LD_LIBRARY_PATH="${STAGING_DIR}/lib:${STAGING_DIR}/usr/lib/" \
> "$@"
We've already had hints about doing something like that, but this is
going to require a much more detailed commit log than you provided.
Ah, I see you were part of:
https://bugs.busybox.net/show_bug.cgi?id=14366
Also, Thomas did quite some in-depth analysis of the qemu issue (you
even were in Cc of that mail):
https://lore.kernel.org/buildroot/20221031213926.50d3c778@windsurf/
As you see, just stating "it is important to also set LD_LIBRARY_PATH in
v8-qemu-wrapper.in to our staging libdirs as otherwise execution of
build tools fail due to host OS libraries being preferred" is not
enough. We really need an actual explanation.
So, please, canyou split this patch into two:
- fix the parallel build issue,
- fix the qemu wrapper with a synthesis of Thomas' extensive analysis
And in that second patch, please add a reference to the bug you close.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/1] package/nodejs: fix cross-compile builds
2023-09-23 9:39 [Buildroot] [PATCH] package/nodejs: fix parallel build Jens Maus via buildroot
2023-09-23 10:09 ` Yann E. MORIN
@ 2023-09-23 10:59 ` Jens Maus via buildroot
2023-09-24 16:36 ` Yann E. MORIN
2023-09-27 11:46 ` Peter Korsgaard
2023-09-23 16:04 ` [Buildroot] [PATCH v2] package/nodejs: fix parallel build Jens Maus via buildroot
2 siblings, 2 replies; 10+ messages in thread
From: Jens Maus via buildroot @ 2023-09-23 10:59 UTC (permalink / raw)
To: buildroot; +Cc: Martin Bark, Daniel Price
When nodejs is build a qemu wrapper script is used to execute
some programs built for the target in user-mode emulation. However, in
some constellations this causes the build to fail because libraries from
the build host are used rather than from the target staging directory.
This has been already reported [1] and throughoutly investigate [2].
A commonly used fix for this issue is to explicitly use LD_LIBRARY_PATH
to make sure that the correct runtime libraries are preferred rather
than using libraries from the build host.
[1] https://bugs.busybox.net/show_bug.cgi?id=14366
[2] https://lore.kernel.org/buildroot/20221031213926.50d3c778@windsurf/
Signed-off-by: Jens Maus <mail@jens-maus.de>
---
package/nodejs/v8-qemu-wrapper.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/nodejs/v8-qemu-wrapper.in b/package/nodejs/v8-qemu-wrapper.in
index e1083f47f7..48222d089b 100644
--- a/package/nodejs/v8-qemu-wrapper.in
+++ b/package/nodejs/v8-qemu-wrapper.in
@@ -5,5 +5,6 @@
exec @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ \
@QEMU_USERMODE_ARGS@ \
-L "${STAGING_DIR}/" \
+ -E LD_LIBRARY_PATH="${STAGING_DIR}/lib:${STAGING_DIR}/usr/lib/" \
"$@"
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH] package/nodejs: fix parallel build
2023-09-23 10:09 ` Yann E. MORIN
@ 2023-09-23 11:07 ` Jens Maus via buildroot
2023-09-23 16:20 ` Jens Maus via buildroot
0 siblings, 1 reply; 10+ messages in thread
From: Jens Maus via buildroot @ 2023-09-23 11:07 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: Daniel Price, Martin Bark, Thomas Petazzoni, buildroot
Hi Yann,
> Am 23.09.2023 um 12:09 schrieb Yann E. MORIN <yann.morin.1998@free.fr>:
>
> On 2023-09-23 11:39 +0200, Jens Maus via buildroot spake thusly:
>> In ninja-based nodejs builds performing parallel builds using "make -jX"
>> is not working during buildroot initiated builds because the JOBS
>> variable is set in the MAKE_OPTS variables in nodejs.mk. This commit
>> remedies the issue by setting JOBS to BR2_JLEVEL and also by fixing the
>> top-level Makefile of nodejs due to an incorrect tab-based indentation
>> being used. Furthermore, it is important to also set LD_LIBRARY_PATH in
>> v8-qemu-wrapper.in to our staging libdirs as otherwise execution of
>> build tools fail due to host OS libraries being preferred.
>
> That are two different changes, so they should be two different patches.
>
> The commit log is thus misleading, becausee you are not "just" fixing
> the parallel build issue.
You are right. I really forgot about the already submitted v8-qemu-wrapper bug report completely for some reason. Will of course split this into two parts now.
> See below for more comments.
>
>> Signed-off-by: Jens Maus <mail@jens-maus.de>
>> ---
>> ...-fixing-Makefile-for-parallel-builds.patch | 37 +++++++++++++++++++
>> package/nodejs/nodejs.mk | 6 ++-
>> package/nodejs/v8-qemu-wrapper.in | 1 +
>> 3 files changed, 42 insertions(+), 2 deletions(-)
>> create mode 100644 package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch
>>
>> diff --git a/package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch b/package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch
>> new file mode 100644
>> index 0000000000..73db129979
>> --- /dev/null
>> +++ b/package/nodejs/0005-fixing-Makefile-for-parallel-builds.patch
>> @@ -0,0 +1,37 @@
>> +From 1c4582c7dd7c80fbac89031d8fa8cf418249d01e Mon Sep 17 00:00:00 2001
>> +From: Jens Maus <mail@jens-maus.de>
>> +Date: Sat, 23 Sep 2023 11:09:50 +0200
>> +Subject: [PATCH] fixing Makefile for parallel builds
>> +
>> +This change fixing incorrect GNU makefile indentation in the top-level
>> +Makefile which causes issues with parallel "make -jXX" builds.
>> +
>> +Upstream: N/A (specific to buildroot builds)
>
> If the indentation is causing issues, then that's surely a fix that
> *must* be sent upstream.
>
> Also, please explain what the actual error is.
Ok, will do so as soon as I get this reproduced again. This patch had been long time into my buildroot patch folder and I really had to fix that indentation to get things going. Will try to resubmit that patch again with some more details error message/explaination. And then I can see if I will have to sent the Makefile patch upstream or not while I am still, however, not sure if/when it will be accepted there.
> [--SNIP--]
>> diff --git a/package/nodejs/v8-qemu-wrapper.in b/package/nodejs/v8-qemu-wrapper.in
>> index e1083f47f7..48222d089b 100644
>> --- a/package/nodejs/v8-qemu-wrapper.in
>> +++ b/package/nodejs/v8-qemu-wrapper.in
>> @@ -5,5 +5,6 @@
>> exec @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ \
>> @QEMU_USERMODE_ARGS@ \
>> -L "${STAGING_DIR}/" \
>> + -E LD_LIBRARY_PATH="${STAGING_DIR}/lib:${STAGING_DIR}/usr/lib/" \
>> "$@"
>
> We've already had hints about doing something like that, but this is
> going to require a much more detailed commit log than you provided.
> Ah, I see you were part of:
>
> https://bugs.busybox.net/show_bug.cgi?id=14366
>
> Also, Thomas did quite some in-depth analysis of the qemu issue (you
> even were in Cc of that mail):
>
> https://lore.kernel.org/buildroot/20221031213926.50d3c778@windsurf/
>
> As you see, just stating "it is important to also set LD_LIBRARY_PATH in
> v8-qemu-wrapper.in to our staging libdirs as otherwise execution of
> build tools fail due to host OS libraries being preferred" is not
> enough. We really need an actual explanation.
>
> So, please, canyou split this patch into two:
> - fix the parallel build issue,
> - fix the qemu wrapper with a synthesis of Thomas' extensive analysis
>
> And in that second patch, please add a reference to the bug you close.
Ok, I just submitted a new patch just for fixing v8-qemu-wapper.in <http://v8-qemu-wapper.in/>. The other issue with the parallel build I will resubmit as soon as I have the error at hand again and can explain it in more detail.
Best Regards,
Jens
--
Jens Maus, Dresden/Germany
http://jens-maus.de/
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH v2] package/nodejs: fix parallel build
2023-09-23 9:39 [Buildroot] [PATCH] package/nodejs: fix parallel build Jens Maus via buildroot
2023-09-23 10:09 ` Yann E. MORIN
2023-09-23 10:59 ` [Buildroot] [PATCH 1/1] package/nodejs: fix cross-compile builds Jens Maus via buildroot
@ 2023-09-23 16:04 ` Jens Maus via buildroot
2023-09-24 9:56 ` Yann E. MORIN
2 siblings, 1 reply; 10+ messages in thread
From: Jens Maus via buildroot @ 2023-09-23 16:04 UTC (permalink / raw)
To: buildroot; +Cc: Martin Bark, Daniel Price
In ninja-based nodejs builds performing parallel builds using "make -jX"
is not working during buildroot initiated builds because the JOBS
variable is not set in the MAKE_OPTS variables in nodejs.mk. This commit
remedies the issue by setting JOBS to BR2_JLEVEL.
Signed-off-by: Jens Maus <mail@jens-maus.de>
---
Changes v1 -> v2:
- removed unrelated v8-qemu-wrapper.in change (Yann)
- revised change summary (Yann)
- removed unnecessary top-level Makefile modifications (Yann)
Signed-off-by: Jens Maus <mail@jens-maus.de>
---
package/nodejs/nodejs.mk | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index fe629ada21..4e70bd71a3 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -46,14 +46,16 @@ HOST_NODEJS_MAKE_OPTS = \
CXXFLAGS="$(HOST_NODEJS_CXXFLAGS)" \
LDFLAGS.host="$(HOST_LDFLAGS)" \
NO_LOAD=cctest.target.mk \
- PATH=$(@D)/bin:$(BR_PATH)
+ PATH=$(@D)/bin:$(BR_PATH) \
+ JOBS=$(BR2_JLEVEL)
NODEJS_MAKE_OPTS = \
$(TARGET_CONFIGURE_OPTS) \
NO_LOAD=cctest.target.mk \
PATH=$(@D)/bin:$(BR_PATH) \
LDFLAGS="$(NODEJS_LDFLAGS)" \
- LD="$(TARGET_CXX)"
+ LD="$(TARGET_CXX)" \
+ JOBS=$(BR2_JLEVEL)
# nodejs's build system uses python which can be a symlink to an unsupported
# python version (e.g. python 3.10 with nodejs 14.18.1). We work around this by
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH] package/nodejs: fix parallel build
2023-09-23 11:07 ` Jens Maus via buildroot
@ 2023-09-23 16:20 ` Jens Maus via buildroot
0 siblings, 0 replies; 10+ messages in thread
From: Jens Maus via buildroot @ 2023-09-23 16:20 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: Daniel Price, Martin Bark, Thomas Petazzoni, buildroot
Hi again,
> Am 23.09.2023 um 13:07 schrieb Jens Maus <mail@jens-maus.de>:
>
> Ok, I just submitted a new patch just for fixing v8-qemu-wapper.in <http://v8-qemu-wapper.in/>. The other issue with the parallel build I will resubmit as soon as I have the error at hand again and can explain it in more detail.
FYI: I just retested the nodejs build without the top-level makefile patch which I suggested in my initial patch upload. However, I could not reproduce the issue anymore. I have therefore now resubmitted the patch but without the top-level Makefile patch.
Best Regards,
Jens
--
Jens Maus, Dresden/Germany
http://jens-maus.de/
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v2] package/nodejs: fix parallel build
2023-09-23 16:04 ` [Buildroot] [PATCH v2] package/nodejs: fix parallel build Jens Maus via buildroot
@ 2023-09-24 9:56 ` Yann E. MORIN
2023-09-26 8:53 ` Peter Korsgaard
0 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2023-09-24 9:56 UTC (permalink / raw)
To: Jens Maus; +Cc: Daniel Price, Martin Bark, buildroot
Jens, All,
On 2023-09-23 18:04 +0200, Jens Maus via buildroot spake thusly:
> In ninja-based nodejs builds performing parallel builds using "make -jX"
> is not working during buildroot initiated builds because the JOBS
> variable is not set in the MAKE_OPTS variables in nodejs.mk. This commit
> remedies the issue by setting JOBS to BR2_JLEVEL.
I was very confused that nodejs would not build in parallel; that would
have made for very, very,very long builds. And indeed, it does build in
parallel, in fact.
However, what it does, is use as many CPUs as are available, without
accounting for the value set by the user in BR2_JLEVEL, thus
overshooting the limits set by the user.
So, I reworded the whoe commit log to explain that.
Applied to master, thanks.
Regards,
Yann E. MORIN.
> Signed-off-by: Jens Maus <mail@jens-maus.de>
>
> ---
> Changes v1 -> v2:
> - removed unrelated v8-qemu-wrapper.in change (Yann)
> - revised change summary (Yann)
> - removed unnecessary top-level Makefile modifications (Yann)
>
> Signed-off-by: Jens Maus <mail@jens-maus.de>
> ---
> package/nodejs/nodejs.mk | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
> index fe629ada21..4e70bd71a3 100644
> --- a/package/nodejs/nodejs.mk
> +++ b/package/nodejs/nodejs.mk
> @@ -46,14 +46,16 @@ HOST_NODEJS_MAKE_OPTS = \
> CXXFLAGS="$(HOST_NODEJS_CXXFLAGS)" \
> LDFLAGS.host="$(HOST_LDFLAGS)" \
> NO_LOAD=cctest.target.mk \
> - PATH=$(@D)/bin:$(BR_PATH)
> + PATH=$(@D)/bin:$(BR_PATH) \
> + JOBS=$(BR2_JLEVEL)
>
> NODEJS_MAKE_OPTS = \
> $(TARGET_CONFIGURE_OPTS) \
> NO_LOAD=cctest.target.mk \
> PATH=$(@D)/bin:$(BR_PATH) \
> LDFLAGS="$(NODEJS_LDFLAGS)" \
> - LD="$(TARGET_CXX)"
> + LD="$(TARGET_CXX)" \
> + JOBS=$(BR2_JLEVEL)
>
> # nodejs's build system uses python which can be a symlink to an unsupported
> # python version (e.g. python 3.10 with nodejs 14.18.1). We work around this by
> --
> 2.34.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/nodejs: fix cross-compile builds
2023-09-23 10:59 ` [Buildroot] [PATCH 1/1] package/nodejs: fix cross-compile builds Jens Maus via buildroot
@ 2023-09-24 16:36 ` Yann E. MORIN
2023-09-27 11:46 ` Peter Korsgaard
1 sibling, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2023-09-24 16:36 UTC (permalink / raw)
To: Jens Maus; +Cc: Daniel Price, Martin Bark, buildroot
Jens, All,
On 2023-09-23 12:59 +0200, Jens Maus via buildroot spake thusly:
> When nodejs is build a qemu wrapper script is used to execute
> some programs built for the target in user-mode emulation. However, in
> some constellations this causes the build to fail because libraries from
> the build host are used rather than from the target staging directory.
> This has been already reported [1] and throughoutly investigate [2].
> A commonly used fix for this issue is to explicitly use LD_LIBRARY_PATH
> to make sure that the correct runtime libraries are preferred rather
> than using libraries from the build host.
Compared to the in-depth analysis that Thomas did, the above was very,
very light. It did not even explain the core of the issue ("in some
constellations" is very vague, when Thomas explaned exactly what is
going on).
For such a difficult issue, we do want to carry the explanations in the
repository, when a remote URL may disapear any time.
So, I did duplicate most of Thomas analysis, and just tweaked it ever so
slightly so that it fits better as a commit log.
Applied to master, thanks.
Regards,
Yann E. MORIN.
> [1] https://bugs.busybox.net/show_bug.cgi?id=14366
> [2] https://lore.kernel.org/buildroot/20221031213926.50d3c778@windsurf/
>
> Signed-off-by: Jens Maus <mail@jens-maus.de>
> ---
> package/nodejs/v8-qemu-wrapper.in | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/nodejs/v8-qemu-wrapper.in b/package/nodejs/v8-qemu-wrapper.in
> index e1083f47f7..48222d089b 100644
> --- a/package/nodejs/v8-qemu-wrapper.in
> +++ b/package/nodejs/v8-qemu-wrapper.in
> @@ -5,5 +5,6 @@
> exec @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ \
> @QEMU_USERMODE_ARGS@ \
> -L "${STAGING_DIR}/" \
> + -E LD_LIBRARY_PATH="${STAGING_DIR}/lib:${STAGING_DIR}/usr/lib/" \
> "$@"
>
> --
> 2.34.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v2] package/nodejs: fix parallel build
2023-09-24 9:56 ` Yann E. MORIN
@ 2023-09-26 8:53 ` Peter Korsgaard
0 siblings, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2023-09-26 8:53 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: buildroot, Daniel Price, Jens Maus, Martin Bark
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> Jens, All,
> On 2023-09-23 18:04 +0200, Jens Maus via buildroot spake thusly:
>> In ninja-based nodejs builds performing parallel builds using "make -jX"
>> is not working during buildroot initiated builds because the JOBS
>> variable is not set in the MAKE_OPTS variables in nodejs.mk. This commit
>> remedies the issue by setting JOBS to BR2_JLEVEL.
> I was very confused that nodejs would not build in parallel; that would
> have made for very, very,very long builds. And indeed, it does build in
> parallel, in fact.
> However, what it does, is use as many CPUs as are available, without
> accounting for the value set by the user in BR2_JLEVEL, thus
> overshooting the limits set by the user.
> So, I reworded the whoe commit log to explain that.
> Applied to master, thanks.
Committed to 2023.02.x, 2023.05.x and 2023.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/nodejs: fix cross-compile builds
2023-09-23 10:59 ` [Buildroot] [PATCH 1/1] package/nodejs: fix cross-compile builds Jens Maus via buildroot
2023-09-24 16:36 ` Yann E. MORIN
@ 2023-09-27 11:46 ` Peter Korsgaard
1 sibling, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2023-09-27 11:46 UTC (permalink / raw)
To: Jens Maus via buildroot; +Cc: Martin Bark, Jens Maus, Daniel Price
>>>>> "Jens" == Jens Maus via buildroot <buildroot@buildroot.org> writes:
> When nodejs is build a qemu wrapper script is used to execute
> some programs built for the target in user-mode emulation. However, in
> some constellations this causes the build to fail because libraries from
> the build host are used rather than from the target staging directory.
> This has been already reported [1] and throughoutly investigate [2].
> A commonly used fix for this issue is to explicitly use LD_LIBRARY_PATH
> to make sure that the correct runtime libraries are preferred rather
> than using libraries from the build host.
> [1] https://bugs.busybox.net/show_bug.cgi?id=14366
> [2] https://lore.kernel.org/buildroot/20221031213926.50d3c778@windsurf/
> Signed-off-by: Jens Maus <mail@jens-maus.de>
Committed to 2023.02.x and 2023.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-09-27 11:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-23 9:39 [Buildroot] [PATCH] package/nodejs: fix parallel build Jens Maus via buildroot
2023-09-23 10:09 ` Yann E. MORIN
2023-09-23 11:07 ` Jens Maus via buildroot
2023-09-23 16:20 ` Jens Maus via buildroot
2023-09-23 10:59 ` [Buildroot] [PATCH 1/1] package/nodejs: fix cross-compile builds Jens Maus via buildroot
2023-09-24 16:36 ` Yann E. MORIN
2023-09-27 11:46 ` Peter Korsgaard
2023-09-23 16:04 ` [Buildroot] [PATCH v2] package/nodejs: fix parallel build Jens Maus via buildroot
2023-09-24 9:56 ` Yann E. MORIN
2023-09-26 8:53 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox