El 17/10/24 a las 10:08, Andrea Pappacoda escribió:
On Thu Oct 17, 2024 at 9:57 AM CEST, Andrea Pappacoda wrote:
I'd still like to figure out what is really happening here though.

By looking closer at the logs[1], my guess is that the 
`subprojects/meson-docs/meson-reference.3` target, which is the 122th out of 
123, runs at the same time as the 123th target, which links together the final 
muon executable. So you have:

- target 122 executing build/muon
- target 123 overwriting build/muon with the final version

So target 122 fails to run because build/muon is modified at the same exact 
time.

Does this sound reasonable to you?

That's exactly what it seems, yes.

I think there are two different bugs here.

One of them is a Makefile-type bug (or whatever the equivalent is here,
i.e. I mean the dependencies have not been precisely specified).

The other one is a bug in ninja. Documentation says it will never use
more parallel jobs than available CPUs, but that does not seem to be
true:

$ nproc
1
$ ninja --help 2>&1 | grep "run N jobs"
  -j N     run N jobs in parallel (0 means infinity) [default=2 on this system]

Note how the default is 2 even if I only have 1 CPU in this machine.

I'll report the ninja bug separately.

In the meantime I suggest to add -j1 to the ninja invocation, as in
the attached patch. The package takes about one minute to build, so
I don't think this will be a problem.

Thanks.
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,7 @@ override_dh_auto_build:
        ln -s ../meson-docs subprojects/
        CC="$(CC_FOR_BUILD)" CFLAGS="$(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)" 
LDFLAGS="$(LDFLAGS_FOR_BUILD)" ./bootstrap.sh build
        build/muon setup -Dprefix=/usr -Dsamurai=disabled -Dreadline=bestline 
build
-       ninja -C build --verbose
+       ninja -C build -j1 --verbose
 
 # Meson's fs module tests require HOME to be a valid directory
 override_dh_auto_test:

Reply via email to