tpm2-software / tpm2-tools

The source repository for the Trusted Platform Module (TPM2.0) tools
https://tpm2-software.github.io
705 stars 377 forks source link

tpm2_encryptdecrypt, undefined reference to Tss2_Sys_EncryptDecrypt2' #654

Closed iolivergithub closed 6 years ago

iolivergithub commented 6 years ago

tpm2-tools-3.0-rc1

tools/tpm2_encryptdecrypt.o: In function encrypt_decrypt': /home/ioliver/code/tpm2/tpm2-tools-3.0-rc1/tools/tpm2_encryptdecrypt.c:104: undefined reference toTss2_Sys_EncryptDecrypt2' collect2: error: ld returned 1 exit status Makefile:1589: recipe for target 'tools/tpm2_encryptdecrypt' failed make: *** [tools/tpm2_encryptdecrypt] Error 1

475$grep Decrypt2 tools/.c tools/tpm2_encryptdecrypt.c: / try EncryptDecrypt2 first, fallback to EncryptDecrypt if not supported */ tools/tpm2_encryptdecrypt.c: TPM_RC rval = TSS2_RETRY_EXP(Tss2_Sys_EncryptDecrypt2(sapi_context, ctx.key_handle,

Compilation against tpm2-tools3.0.rc,tss-1.3.0.rc2 and absrums-1.2.0.rc1. tools-3.0-rc1 works if the Makefile is hand edited to remove compilation of tpm2_encryptdecrypt

martinezjavier commented 6 years ago

@iolivergithub I thought we agreed to move the conversation to the mailing list, but I see you filled a new issue :smiley:

Are you sure that you installed the correct version of the libraries? The SAPI library in tpm2-tss 1.3.0-rc2 does define the Tss2_Sys_EncryptDecrypt2 function.

williamcroberts commented 6 years ago

This is a question, use the mailing list.

It's on that tag: https://github.com/intel/tpm2-tss/blob/1.3.0-rc1/sysapi/sysapi/Tss2_Sys_EncryptDecrypt2.c

So its likely a local configuration issue.