"warning: jobserver unavailable: using -j1. Add `+' to parent make rule"

1,214 views
Skip to first unread message

Jonathan Challinger

unread,
Sep 30, 2014, 6:08:43 PM9/30/14
to drones-...@googlegroups.com
Using make -j8 causes this error, and it goes slow as ever. Can this be fixed for faster builds?

Ben Nizette

unread,
Oct 1, 2014, 2:12:26 AM10/1/14
to drones-...@googlegroups.com
This seems to be thrown for two reasons:

1) Our px4_targets.mk has a bug whereby it uses 'make' rather than
'$(MAKE)' to spawn children. The latter is instrumented to work
properly in multithreaded builds
2) PX4 Firmware knows it can't build NuttX modules in parallel so
forces single-threaded builds at the NuttX archive level.

I've fixed 1 at https://github.com/benizl/ardupilot/tree/make-threaded

The problem is that fixing this bug exposed another. The current
behaviour is that -j8 silently doesn't run as well as it could. The
behaviour with my patch is that -j8 occasionally causes the NuttX
build to explode spectacularly, requiring you to go in to the tree and
manually remove a series of symlinks.

The deeper bug appears to be due to this oddity that's worried me for a while:

> make px4-v2
> make[1]: Entering directory `/home/bnizette/dev/PX4Firmware'
> %% Configuring NuttX for px4fmu-v1

Why is it configuring for v1 when I asked for v2? It gets around to
building for v2 later in the cycle. With my patch, it seems that the
NuttX build for -v1 and -v2 race with each other (though I wouldn't
stake my life on it).

So it seems the first bug to squash is that one. Then we will get
faster px4-clean builds by not building redundant px4-io cycles and we
can apply my patch, getting slightly faster PX4Firmware builds (though
only slightly, as PX4Firmware still has chunks explicitly
single-threaded).

All that said, to me it seems that -j8 /does/ currently do what it's
supposed to do just at the Ardupilot level; my tests have
Ardupilot-only builds sped up by 25-50% on master with -j8 over -j1.
Do you see something similar?

Ben.

On 1 October 2014 08:08, Jonathan Challinger <mr.cha...@gmail.com> wrote:
> Using make -j8 causes this error, and it goes slow as ever. Can this be
> fixed for faster builds?
>
> --
> You received this message because you are subscribed to the Google Groups
> "drones-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to drones-discus...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages