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.