On Sat, Jul 04, 2020 at 11:47:14PM +0200, Christian Weisgerber wrote:
> Parallel building devel/bison fails.  There is a race where the
> build tries to run the newly compiled bison for its --help output
> but doesn't wait for the binary to actually be available.
> 
> This is one of these cases that espie@ grumbles about, because it
> is due to a problem in our make(1) that treats "/path/to/file" and
> "file" as distinct targets.
> 
> Anyway, here's a fix if we want it.
> It also adds an upstream fix so the path to bison isn't embedded
> in the generated documentation.
> 
> OK?
> No, let's wait for the prophesied make fixes that will be forthcoming
> any year now?
> 
> Index: patches/patch-doc_local_mk
> ===================================================================
> RCS file: patches/patch-doc_local_mk
> diff -N patches/patch-doc_local_mk
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-doc_local_mk        4 Jul 2020 21:37:26 -0000
> @@ -0,0 +1,33 @@
> +$OpenBSD$
> +
> +Don't depend on the path of the bison executable.
> +https://git.savannah.gnu.org/cgit/bison.git/commit/doc/local.mk?id=0782ed327401d1b59c059c89c8630d002260b4f7
> +
> +Fix build race: Our make(1) treats $(top_srcdir)/doc/bison.help and
> +doc/bison.help as distinct targets.
> +
> +Index: doc/local.mk
> +--- doc/local.mk.orig
> ++++ doc/local.mk
> +@@ -90,9 +90,11 @@ MAINTAINERCLEANFILES += $(top_srcdir)/doc/bison.help
> + $(top_srcdir)/doc/bison.help: src/bison$(EXEEXT)
> +     $(AM_V_GEN)LC_ALL=C src/bison$(EXEEXT) --version >doc/bison.help.tmp
> +     $(AM_V_at) LC_ALL=C src/bison$(EXEEXT) --help | \
> ++## Avoid depending on the path to Bison.
> ++      sed -e 's,^Usage: .*/bison \[OPTION\],Usage: bison [OPTION],g' \
> + ## Avoid variations in the output depending on whether we are
> + ## on a glibc system.
> +-      sed '/translation bugs/d'  >>doc/bison.help.tmp
> ++          -e '/translation bugs/d'  >>doc/bison.help.tmp
> +     $(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.tmp $@
> + endif ! CROSS_COMPILING
> + 
> +@@ -112,7 +114,7 @@ remove_time_stamp = \
> + 
> + # Depend on configure to get version number changes.
> + if ! CROSS_COMPILING
> +-MAN_DEPS = doc/bison.help doc/bison.x $(top_srcdir)/configure
> ++MAN_DEPS = $(top_srcdir)/doc/bison.help doc/bison.x $(top_srcdir)/configure
> + endif
> + 
> + $(top_srcdir)/doc/bison.1: $(MAN_DEPS)
> -- 
> Christian "naddy" Weisgerber                          na...@mips.inka.de
> 
> 
If you really want to put that in, okay. But please actually tag it with
PARALLEL MAKE BUG
in the patch file.

So when I try to fix this, I'm able to figure out I need to revert that
patch.

Reply via email to