From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xen.org
Subject: [PATCH] tools/vtpm: fix version.h error during parallel build
Date: Thu, 12 Jul 2012 17:08:40 +0200 [thread overview]
Message-ID: <51506c407f3ef3e238a4.1342105720@probook.site> (raw)
# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# 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)
Signed-off-by: Olaf Hering <olaf@aepfle.de>
diff -r 42f76d536b11 -r 51506c407f3e tools/vtpm/Makefile
--- a/tools/vtpm/Makefile
+++ b/tools/vtpm/Makefile
@@ -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);
diff -r 42f76d536b11 -r 51506c407f3e tools/vtpm/vtpm-0.5.1-version.h.patch
--- /dev/null
+++ b/tools/vtpm/vtpm-0.5.1-version.h.patch
@@ -0,0 +1,53 @@
+
+make[4]: Entering directory `/usr/src/packages/BUILD/xen-4.2.25602/non-dbg/tools/vtpm/vtpm'
+Making all in tpmd
+make[5]: Entering directory `/usr/src/packages/BUILD/xen-4.2.25602/non-dbg/tools/vtpm/vtpm/tpmd'
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings -Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing -I../../../../tools/vtpm_manager/manager -c -o tpm_data.o ../tpm/tpm_data.c
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings -Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing -I../../../../tools/vtpm_manager/manager -c -o tpm_startup.o ../tpm/tpm_startup.c
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings -Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing -I../../../../tools/vtpm_manager/manager -c -o tpm_storage.o ../tpm/tpm_storage.c
+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
+gcc -Wall -Wno-unused -Wpointer-arith -Wcast-align -Wwrite-strings -Wsign-compare -Wno-multichar -g -I.. -I. -O2 -fno-strict-aliasing -I../../../../tools/vtpm_manager/manager -c -o tpm_credentials.o ../tpm/tpm_credentials.c
+make[5]: *** [tpm_startup.o] Error 1
+
+---
+ Makefile | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+Index: tpm_emulator-0.5.1/Makefile
+===================================================================
+--- tpm_emulator-0.5.1.orig/Makefile
++++ tpm_emulator-0.5.1/Makefile
+@@ -14,20 +14,23 @@ SUBDIRS := tpmd
+
+ all: version all-recursive
+
+-version:
+- @echo "#ifndef _TPM_VERSION_H_" > tpm/tpm_version.h
+- @echo "#define _TPM_VERSION_H_" >> tpm/tpm_version.h
+- @echo "#define VERSION_MAJOR $(VERSION_MAJOR)" >> tpm/tpm_version.h
+- @echo "#define VERSION_MINOR $(VERSION_MINOR)" >> tpm/tpm_version.h
+- @echo "#define VERSION_BUILD $(VERSION_BUILD)" >> tpm/tpm_version.h
+- @echo "#endif /* _TPM_VERSION_H_ */" >> tpm/tpm_version.h
++tpm/tpm_version.h:
++ @echo "#ifndef _TPM_VERSION_H_" > tpm/tpm_version.h.tmp
++ @echo "#define _TPM_VERSION_H_" >> tpm/tpm_version.h.tmp
++ @echo "#define VERSION_MAJOR $(VERSION_MAJOR)" >> tpm/tpm_version.h.tmp
++ @echo "#define VERSION_MINOR $(VERSION_MINOR)" >> tpm/tpm_version.h.tmp
++ @echo "#define VERSION_BUILD $(VERSION_BUILD)" >> tpm/tpm_version.h.tmp
++ @echo "#endif /* _TPM_VERSION_H_ */" >> tpm/tpm_version.h.tmp
++ mv -f tpm/tpm_version.h.tmp tpm/tpm_version.h
++
++version: tpm/tpm_version.h
+
+ clean: clean-recursive
+ rm -f tpm/tpm_version.h
+
+ install: install-recursive
+
+-all-recursive clean-recursive install-recursive:
++all-recursive clean-recursive install-recursive: version
+ @target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $(SUBDIRS); do \
+ echo "Making $$target in $$subdir"; \
next reply other threads:[~2012-07-12 15:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 15:08 Olaf Hering [this message]
2012-07-23 16:54 ` [PATCH] tools/vtpm: fix version.h error during parallel build Ian Jackson
2012-07-23 17:12 ` Olaf Hering
2012-07-23 17:14 ` Ian Jackson
2012-07-31 8:19 ` Olaf Hering
-- strict thread matches above, loose matches on Subject: below --
2012-07-12 7:51 Olaf Hering
2012-07-12 15:07 ` Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51506c407f3ef3e238a4.1342105720@probook.site \
--to=olaf@aepfle.de \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).