Build -j target tags and command output

Simon J. Gerraty sjg at juniper.net
Fri Feb 26 23:20:21 UTC 2016


Bryan Drewery <bdrewery at freebsd.org> wrote:
> I'm looking for opinions on whether we should keep or remove the --

Keep.

Without them it is virtually impossible to identify which job produced
certain output.

Even with them, the log from a parallel hirerarchical build can get
confusing - especially when multiple makes are writing at the same time.
But you are still better off with some clues.

> Removing them would yield potentially hard-to-debug failures since the

Yes, pls don't do that.

> failed command could be anywhere.  At least the 'make stopped' error
> that follows would print the directory.  There is an interesting feature

Yes, but generally the exciting stuff that caused the stoppage is
earlier in the log.
The --- lines allow use of scripts to demux the output.

> in the meta mode build that will keep a log and print a more detailed
> error message on failures so you really know which directory failed and
> what environment it had, but it can be spammy as well since it prints
> the same error information on the 'another make hit an error, dying' cases.

Yes, the issue is largely moot with dirdeps/meta mode build.
As your example clearly demonstrates.

Not all targets produce a .meta file, and for these you may still get
--- job lines, but they can hardly be considered an issue.

All the gory details - that you need to debug issues saved in
in the .meta file with no contamination from other jobs

> Longterm, I think a merge between DIRDEPS_BUILD output and the NetBSD
> build output makes sense and removes these --- lines entirely.  It would

With dirdeps build the noise that NetBSD outputs is just noise:

Checking /tank/home/sjg/work/NetBSD/current/src/lib/csu for i386 ...
Building /tank/home/sjg/work/NetBSD/current/obj/i386/lib/csu/gcrt0.o
Building /tank/home/sjg/work/NetBSD/current/obj/i386/lib/csu/sysident_assym.h
Building /tank/home/sjg/work/NetBSD/current/obj/i386/lib/csu/crtn.o
--- gcrt0.o ---
#   compile  csu/gcrt0.o
--- sysident_assym.h ---
#    create  csu/sysident_assym.h
--- crtn.o ---
#   compile  csu/crtn.o


> DIRDEPS_BUILD output:
> 
> > ~/git/freebsd # WITH_DIRDEPS_BUILD=yes make -C bin/sh -j15
> ...
> > --- /root/git/freebsd/bin/sh.amd64,amd64 1334 ---
> > @ 1456524548 [2016-02-26 14:09:08] Checking /root/git/freebsd/bin/sh for amd64,amd64 ...
> > Building /usr/obj/root/git/freebsd/amd64.amd64/bin/sh/.dirdep
> > Building /usr/obj/root/git/freebsd/amd64.amd64/bin/sh/builtins.c
> > Building /usr/obj/root/git/freebsd/amd64.amd64/bin/sh/mknodes.o
> > Building /usr/obj/root/git/freebsd/amd64.amd64/bin/sh/mksyntax.o
> > Building /usr/obj/root/git/freebsd/amd64.amd64/bin/sh/token.h
> > Building /usr/obj/root/git/freebsd/amd64.amd64/bin/sh/stage_incs

> > Building /usr/obj/root/git/freebsd/amd64.amd64/bin/sh/stage_symlinks.man1
> > Building /usr/obj/root/git/freebsd/amd64.amd64/bin/sh/stage_links.man1
> > Checking /root/git/freebsd/bin/sh/Makefile.depend: .dirdep.meta builtins.c.meta mknodes.o.meta mksyntax.o.meta token.h.meta stage_incs.meta mksyntax.meta mknodes.meta
> > @ 1456524550 [2016-02-26 14:09:10] Finished bin/sh.amd64,amd64 seconds=2 meta=49  created=49


More information about the freebsd-arch mailing list