Bug 294822 - makeman.lua lacking diagnostics for failure case
Summary: makeman.lua lacking diagnostics for failure case
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 16.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Ed Maste
URL: https://reviews.freebsd.org/D56663
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-26 20:51 UTC by Ed Maste
Modified: 2026-04-30 16:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2026-04-26 20:51:05 UTC
In my WIP tree (with a bunch of patches not in main) `make makeman` fails, where sh makeman did not, and does not provide usable diagnostics:
 
$ make makeman
building src.conf.5 man page from files in /home/emaste/src/freebsd-src/wipbsd/tools/build/options
ignoring duplicate option OPT_INIT_ALL
.makeman.lua:482: Child 42697 failed, buf: makeman.lua:195: make exited unsuccessfully
*** Error code 1

Stop.
make[1]: stopped making "makeman" in /home/emaste/src/freebsd-src/wipbsd
*** Error code 1

Stop.
make: stopped making "makeman" in /home/emaste/src/freebsd-src/wipbsd
$ ......................................................................................................................................................................................................................................................................


The `.`s from individual option make invocations are all emitted after returning to the shell.

With a few hacks (to report the make invocation and avoid cleaning up the tmp dir) I can find the failing case:

.makeman.lua:482: Child 61647 failed, buf: makeman.lua:195: make [.MAKE.MODE=normal showconfig SRC_ENV_CONF=/tmp/makeman.6081/src-WITHOUT_ALL_WITH_LOADER_VERIEXEC.conf] exited unsuccessfully

$ make showconfig SRC_ENV_CONF=/tmp/makeman.6081/src-WITHOUT_ALL_WITH_VERIEXEC.conf
make[1]: /home/emaste/src/freebsd-src/wipbsd/share/mk/src.opts.mk:526: VERIEXEC requires BEARSSL
        in /home/emaste/src/freebsd-src/wipbsd/Makefile.inc1:123
        in make[1] in directory "/home/emaste/src/freebsd-src/wipbsd"

make[1]: stopped making "showconfig" in /home/emaste/src/freebsd-src/wipbsd
*** Error code 1

Stop.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2026-04-27 00:14:29 UTC
In share/mk/src.opts.mk in my tree I have:

.if ${MK_BEARSSL} == "no" && \
    (${MK_LOADER_VERIEXEC} == "yes" || ${MK_VERIEXEC} == "yes")
.error VERIEXEC requires BEARSSL
.endif

Arguably this should be handled in a better way, but makeman.lua ought to be more resilient.
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-04-27 19:22:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=ea27ec183d0ff26e1273202841a02041b6d93955

commit ea27ec183d0ff26e1273202841a02041b6d93955
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-04-26 19:30:17 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-04-27 19:21:12 +0000

    makeman.lua: Downgrade `make showconfig` error to warning

    The sh-based makeman silently ignored errors from `make showconfig`.
    Ignore errors also from makeman.lua (but emit a warning).

    We may want to revisit this in the future, but want makeman.lua to
    behave identically for now.

    PR:             294822
    Reviewed by:    kevans
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D56663

 tools/build/options/makeman.lua | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-04-30 16:55:32 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=0b759788833e00906b80e0edb0e172115d4240cb

commit 0b759788833e00906b80e0edb0e172115d4240cb
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-04-26 19:30:17 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-04-30 16:27:55 +0000

    makeman.lua: Downgrade `make showconfig` error to warning

    The sh-based makeman silently ignored errors from `make showconfig`.
    Ignore errors also from makeman.lua (but emit a warning).

    We may want to revisit this in the future, but want makeman.lua to
    behave identically for now.

    PR:             294822
    Reviewed by:    kevans
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D56663

    (cherry picked from commit ea27ec183d0ff26e1273202841a02041b6d93955)

 tools/build/options/makeman.lua | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)