Page MenuHomeFreeBSD

Switch to verbose logs by default
ClosedPublic

Authored by AMDmi3 on Aug 16 2016, 4:43 PM.

Details

Summary

See https://reviews.freebsd.org/D7533 for related PHB change.

Some ports build silently, hiding executed commands under non-informative summary, such as

CC     source1.o
CC     source2.o
CCLD   someprogram

This is unacceptable as build logs are crucial to debugging port
build problems both on the cluster and based on end user feedback
and also global mining of build problems such as non-respected
C(XX)FLAGS and incorrect -I/-L ordering.

Mention the policy in CHANGES and enable verbose logs for cmake and ninja.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

AMDmi3 retitled this revision from to Switch to verbose logs by default.
AMDmi3 updated this object.
AMDmi3 edited the test plan for this revision. (Show Details)

You left our autoconf builds. Were you going to look at that too?

I agree with this but I wonder if we should just flip to the opposite, meaning adding a NINJA_QUIET and CMAKE_QUIET rather than forcing 100% verbose.

You talk about GNU_CONFIGURE ports, but then you fix cmake and ninja, did you forget some bit of patch there?

You left our autoconf builds. Were you going to look at that too?

As suggested by mandree@ on #bsdports, it's not cleanly possible. Not all configure scripts support --disable-silent-rules, not all generated makefiles support V=1 env, and this variable may have different meaning so we may not set --disable-silent-rules or V=1 globally. Instead, I suggest to add CONFIGURE_ARGS+=--disable-silent-rules to individual ports which use silent builds.

I agree with this but I wonder if we should just flip to the opposite, meaning adding a NINJA_QUIET and CMAKE_QUIET rather than forcing 100% verbose.

I've though of it, but only a tiny fraction of ports will support QUIET option, only a tiny fraction of users will use it, so it's not worth the maintainance cost and basically useless. And there are chances that some port will break for user who set QUIET and valuable information will be lost making investigation harder.

In D7534#156677, @mat wrote:

You talk about GNU_CONFIGURE ports, but then you fix cmake and ninja, did you forget some bit of patch there?

No I didn't. These will be fixed on individual basis later.

Otoh, we may do an exp-run with --disable-silent-rules added to configure args (it seems to actually be supported even in very ancient configure scripts) and then probably add it to default configure args. What do you think?

AMDmi3 edited edge metadata.

Add --disable-silent-rules to CONFIGURE_ARGS to cover GNU_CONFIGURE
using ports as well. Exp-run pending.

So trying to go unconditional --disable-silent-rules way.

Related exp-run: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212075

This seems to work. First exp-run showed 7 failures, all easily fixed. There are 5000+ skipped ports due to these failures, another exp-run required.

AMDmi3 edited edge metadata.

Latest version of the patch:

  • Switch to _LATE_CONFIGURE_ARGS, only pass --disable-silent-rules when configure s known to support it
  • Remove --disable-silent-rules (also CMAKE/NINJA_VERBOSE) from ports which set it as this is no longer needed