From: Ian Campbell Subject: Re: vTPM Manager Date: Mon, 22 Aug 2011 09:42:01 +0100 Message-ID: <1314002521.5010.395.camel@zakaz.uk.xensource.com> References: <4E520471.5010804@seceng.informatik.tu-darmstadt.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <4E520471.5010804@seceng.informatik.tu-darmstadt.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Sebastian Biedermann Cc: "Xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Mon, 2011-08-22 at 08:25 +0100, Sebastian Biedermann wrote: > Dear List, > > I have a problem installing the vTPM extension for Xen. > I selected the option vTPM Manager (=y) in the Config.mk before > compiling the xen-tools, but there is always the same error during the > compilation in every xen version which I have tried: I haven't seen anyone using or maintaining the vtpm stuff for ages now. I expect it has bitrotted something rotten (if you'll excuse the pun). I'm afraid this may mean you need to dig into the code. (For future reference it is useful to reproduce build errors with LANG=C before posting to the lists) > gcc -Werror -g3 -I. -D_GNU_SOURCE > -DLOGGING_MODULES="(BITMASK(VTPM_LOG_TCS)|BITMASK(VTPM_LOG_VTSP)|BITMASK(VTPM_LOG_VTPM))" > -I../../../tools/vtpm_manager/crypto -I../../../tools/vtpm_manager/util > -I../../../tools/vtpm_manager/tcs -I../../../tools/vtpm_manager/manager > -c -o sym_crypto.o sym_crypto.c > cc1: warnings being treated as errors > sym_crypto.c: In function âCrypto_symcrypto_initkeyâ: > sym_crypto.c:71:3: error: format â%sâ expects type âchar *â, but > argument 6 has type âintâ This appears to be from the TPMTRYRETURN macro in tools/vtpm_manager/util/tcg.h which is: // Try command c. If it fails, print error message, set status to actual return code. Goto abort #define TPMTRYRETURN(c) do { status = c; \ if (status != TPM_SUCCESS) { \ fprintf(stderr, "ERROR in %s at %s:%i code: %s.\n", __func__, __FILE__, __LINE__, tpm_get_error_name(status)); \ goto abort_egress; \ } \ } while(0) argument 6 is "tpm_get_error_name(status)" which is defined as const char* tpm_get_error_name (TPM_RESULT code); in tools/vtpm_manager/util/log.h. This is a "char *" as the %s requires and not an "int" like the message is complaining. If the prototype for tpm_get_error_name were missing it would default to returning int but I'm pretty sure gcc would way something if this were the case -- but you could maybe try adding #include "log.h" to sym_crypto.c right above the include of tcg.h? Ian. > sym_crypto.c: In function âCrypto_symcrypto_genkeyâ: > sym_crypto.c:94:3: error: format â%sâ expects type âchar *â, but > argument 6 has type âintâ > sym_crypto.c: In function âCrypto_symcrypto_encryptâ: > sym_crypto.c:134:3: error: format â%sâ expects type âchar *â, but > argument 6 has type âintâ > sym_crypto.c: In function âCrypto_symcrypto_decryptâ: > sym_crypto.c:165:3: error: format â%sâ expects type âchar *â, but > argument 6 has type âintâ > sym_crypto.c:172:3: error: format â%sâ expects type âchar *â, but > argument 6 has type âintâ > make[5]: *** [sym_crypto.o] Fehler 1 > make[5]: *** Warte auf noch nicht beendete Prozesse... > make[5]: Verlasse Verzeichnis > '/home/toor/xen-4.1.1/tools/vtpm_manager/crypto' > make[4]: *** [subdir-install-crypto] Fehler 2 > make[4]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager' > make[3]: *** [subdirs-install] Fehler 2 > make[3]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager' > make[2]: *** [subdir-install-vtpm_manager] Fehler 2 > make[2]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools' > make[1]: *** [subdirs-install] Fehler 2 > make[1]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools' > make: *** [install-tools] Fehler 2 > > Any suggestions? What is wrong? Thanks for help! >