-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing -j32
for ninja no longer works
#53176
Comments
-j32
for ninja no longer works
@anonrig @jakecastelli This FROM ubuntu:latest
RUN apt-get update && apt-get install -y git build-essential ninja-build python3
WORKDIR /nodejs
RUN git clone --depth=1 https://github.com/nodejs/node.git
WORKDIR /nodejs/node
RUN ./configure --ninja
RUN make -j3 $ docker build --progress=plain .
...
#10 [7/7] RUN make -j3
#10 0.519 ninja -C out/Release -j3
#10 0.521 ninja: Entering directory `out/Release' |
I'm on macOS and it doesn't work:
|
I am on MacOS as well, exactly the same GNU Make as yours @targos - the current work around for me is to use |
On Linux, it seems that GNU Make 3.81 was obsolete in 2010 and last distributed in Ubuntu 14 — a decade ago... is that the most recent official release for macOS? I found this StackOverflow thread that seems related, and which is also about macOS. It also mentions differences in how |
The default |
I upgraded my make to
I think your fix 19f0bca is legit! @tniessen we might need to update the README for mac users. |
I think in conclusion for mac users there are two options:
Are you guys happy for me to update the |
@jakecastelli Thank you so much for confirming! Let me try to add a workaround for ancient versions of GNU make to our Makefile. @targos Since you have access to macOS and are still using GNU Make 3.81, could you please test if this patch fixes the propagation? diff --git a/Makefile b/Makefile
index 5187d6a950..8f579bada1 100644
--- a/Makefile
+++ b/Makefile
@@ -147,7 +147,11 @@ ifdef JOBS
NINJA_ARGS := $(NINJA_ARGS) -j$(JOBS)
else
IMMEDIATE_NINJA_ARGS := $(NINJA_ARGS)
- NINJA_ARGS = $(IMMEDIATE_NINJA_ARGS) $(filter -j%,$(MAKEFLAGS))
+ ifneq (3.81,$(MAKE_VERSION))
+ NINJA_ARGS = $(IMMEDIATE_NINJA_ARGS) $(filter -j%,$(MAKEFLAGS))
+ else
+ NINJA_ARGS := $(IMMEDIATE_NINJA_ARGS) $(filter -j%,$(MAKEFLAGS))
+ endif
endif
$(NODE_EXE): config.gypi out/Release/build.ninja
$(NINJA) -C out/Release $(NINJA_ARGS) If it does, I can open a PR and add an explanation to the |
I notice one change of behavior with make v4. When configuring with
|
@tniessen I wouldn't say it fixes the propagation, but at least it goes back to the previous "working" behavior that doesn't propagate the |
If I remember correctly with make v3 it builds the release and then the debug build separately right? edit: sorry you have already mentioned here
|
Yes. I would prefer it to only build the debug build but maybe there's a reason the release one is needed. |
Oh, my assumption was that, since @anonrig was using If it never worked on any version of GNU make, then I am out of ideas for the macOS version. |
TBH I think it might've never worked on macOS (at least with GNU make v3.81 on arm) with |
with GNU make v3.81 on previous "working version"
it does not look like
Correct me if I am wrong @targos |
That's my experience too |
with this patch from @tniessen :
it falls back to the old behaviour which ignores the Do you guys have any suggestion here? shall I apply the patch to #53181 (adding tniessen as co-author) and update the |
I don't think the old behavior is reasonable: if Let's wait to hear from @anonrig since he opened the issue and apparently has been using If we don't find a solution for ancient GNU make versions, then updating |
FWIW I have never used the -jn arguments when using ninja. I just BUILD_WITH=ninja make node and ninja will use all the available cores automatically. |
Updating
|
Thanks for the suggestion, I think
surely I can fix that 😁 |
@jakecastelli Would you like to add a note to |
Sure, I can do that 👍 |
PR-URL: nodejs#53187 Fixes: nodejs#53176 Refs: nodejs#53176 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs#53181 Fixes: nodejs#53176 Refs: nodejs#53176 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
PR-URL: nodejs#53187 Fixes: nodejs#53176 Refs: nodejs#53176 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs#53181 Fixes: nodejs#53176 Refs: nodejs#53176 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Running
./configure --ninja -C
and later running-make -j32
no longer works on main.Possibly related to. 19f0bca
cc @tniessen
The text was updated successfully, but these errors were encountered: