tools/vtpm: fix version.h error during parallel build
PATCH 1/1 tools/vtpm: fix version.h error during parallel build
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1342105705 -7200
# Node ID 51506c407f3ef3e238a4154c7f72ac61093e0bce # Parent 42f76d536b116d2ebad1b6705ae51ecd171d2581 tools/vtpm: fix version.h error during parallel build
Generating the tpm_version.h is not make -j safe:
In file included from ../tpm/tpm_emulator.h:25:0,
from ../tpm/tpm_startup.c:18:
../tpm/tpm_version.h:1:0: error: unterminated #ifndef make[5]: *** [tpm_startup.o] Error 1
Add another patch which adds proper dependencies in the tpm_manager Makefile. (all-recursive needs to depend on version)
tools/vtpm/Makefile +2 -1
@@ -51,7 +51,8 @@ mrproper: set -e; cd $(VTPM_DIR); \ patch -p1 < ../vtpm-0.5.1.patch; \ - patch -p1 < ../vtpm-0.5.1-LDLIBS.patch + patch -p1 < ../vtpm-0.5.1-LDLIBS.patch; \ + patch -p1 < ../vtpm-0.5.1-version.h.patch orig: $(TPM_EMULATOR_TARFILE) mkdir $(ORIG_DIR);
tools/vtpm/vtpm-0.5.1-version.h.patch new file +53 -0
53 lines not on this page · raw message
Olaf Hering writes ("[Xen-devel] [PATCH] tools/vtpm: fix version.h error during parallel build"):
Quoted 3 lines
tools/vtpm: fixversion.herror during parallel buildGenerating the
tpm_version.his not make -j safe:
Thanks for tracking this down. However, wouldn't it be possible to fix this entirely in our Makefile, somehow ? The patch to the upstream Makefile risks getting conflicts in the future with changes to the upstream code.
Thanks,
Ian.
Quoted 9 lines · Ian Jackson
Olaf Hering writes ("[Xen-devel] [PATCH]
tools/vtpm: fixversion.herror during parallel build"):Quoted 3 lines
tools/vtpm: fixversion.herror during parallel buildGenerating the
tpm_version.his not make -j safe:Thanks for tracking this down. However, wouldn't it be possible to fix this entirely in our
Makefile, somehow ? The patch to the upstreamMakefilerisks getting conflicts in the future with changes to the upstream code.
The build_sub rule in tools/vtpm/Makefile could be changed to $(MAKE) -C $(VTPM_DIR) version && $(MAKE) -C $(VTPM_DIR) all-recursive; \
And the install rule in that Makefile perhaps to
$(MAKE) -C $(VTPM_DIR) install-recursive
I will see how that works, the failure happens rarely.
Olaf
Olaf Hering writes ("Re: [Xen-devel] [PATCH] tools/vtpm: fix version.h error during parallel build"):
Quoted 12 lines · Ian Jackson
Quoted 10 lines
Olaf Hering writes ("[Xen-devel] [PATCH]
tools/vtpm: fixversion.herror during parallel build"):Quoted 3 lines
tools/vtpm: fixversion.herror during parallel buildGenerating the
tpm_version.his not make -j safe:Thanks for tracking this down. However, wouldn't it be possible to fix this entirely in our
Makefile, somehow ? The patch to the upstreamMakefilerisks getting conflicts in the future with changes to the upstream code.
Quoted 5 lines
The
build_subrule intools/vtpm/Makefilecould be changed to $(MAKE) -C $(VTPM_DIR) version && $(MAKE) -C $(VTPM_DIR) all-recursive; \And the install rule in that
Makefileperhaps to
$(MAKE) -C $(VTPM_DIR) install-recursive
Right, something like that.
Quoted 1 line
I will see how that works, the failure happens rarely.
I find that adding sleeps can help repro these kind of problems.
Ian.
Quoted 8 lines · Ian Jackson
Olaf Hering writes ("Re: [Xen-devel] [PATCH]
tools/vtpm: fixversion.herror during parallel build"):Quoted 5 lines
The
build_subrule intools/vtpm/Makefilecould be changed to $(MAKE) -C $(VTPM_DIR) version && $(MAKE) -C $(VTPM_DIR) all-recursive; \And the install rule in that
Makefileperhaps to
$(MAKE) -C $(VTPM_DIR) install-recursiveRight, something like that.
I just sent a new patch which does that.
Olaf