On Mon, Oct 16, 2017 at 11:19:13AM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > I'm afraid this is quite likely to fail build smoke test again. I've
> > just tried a build on OpenBSD with the bash -> sh fix in it, and I
> > found that it still tried to build the keycodemap files in parallel
> > with checking out the GIT submodules. It also tried to run the
> > mkdir -p dtc/libfdt in parallel and this caused git to refuse to
> > checkout the dtc module due to that empty dir existing. So there's
> > still some deps problems in here I think that let make build in
> > the wrong order :-(
>
> > In all my debugging the one thing I've seen work correctly is the
> > re-running of configure (via config.status), which always happens
> > earlier and is serialized wrt everything else. So I wonder if we
> > should change direction slightly, and have configure checkout the
> > submodules. Then just make sure that config.status is triggered
> > when submodules are out of date.
>
> I've noticed configure running *in parallel* to other stuff.
> Reproducer:
>
> (1) Apply patch #1
> (2) run normal build
> (3) make -C dtc clean
> (4) touch configure
> (5) make
>
> Watch configure and dtc build running in parallel.
> I think the added Makefile dependency breaks it.
>
> Incremental fix (also pushed to queue/ui):
>
> --- a/Makefile
> +++ b/Makefile
> @@ -35,8 +35,6 @@ endif
>
> .git-submodule-status: git-submodule-update config-host.mak
>
> -Makefile: .git-submodule-status
> -
> # Check that we're not trying to do an out-of-tree build from
> # a tree that's been used for an in-tree build.
> ifneq ($(realpath $(SRC_PATH)),$(realpath .))
> @@ -107,6 +105,7 @@ endif
> GENERATED_FILES += $(TRACE_HEADERS)
> GENERATED_FILES += $(TRACE_SOURCES)
> GENERATED_FILES += $(BUILD_DIR)/trace-events-all
> +GENERATED_FILES += .git-submodule-status
>
> trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
Yep, that looks to have fixed the races I was able to reproduce
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|