Closed liuqun closed 6 years ago
Hardware: x86 VMWare OS: Ubuntu Mate 16.04.3-desktop i386
/usr/bin/gcc -Wall -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Werror -Wsign-compare -c -ggdb -O0 -DTPM_POSIX -D_POSIX_ -I../utils -I. AlgorithmCap.c -o AlgorithmCap.o
In file included from BnValues.h:281:0,
from Global.h:84,
from Tpm.h:71,
from AlgorithmCap.c:67:
TpmToOsslMath.h:79:4: error: #error "Ossl library is using different radix"
# error "Ossl library is using different radix"
^
makefile:79: recipe for target 'AlgorithmCap.o' failed
Reference:
For 32 bit i386 and Raspberry Pi, you must change RADIX_BITS defined in "ibmtpm974.tar.gz/./src/Implementation.h"
Raspian is 32-bit (at least its openssl is 32-bit) while the TPM crypto defaults to 64-bit. For Raspian, change Implementation.h RADIX_BITS from 64 to 32.
#ifdef TPM_POSIX #define RADIX_BITS 32
This is a sample patch that works for 32 bit system:
https://github.com/stefanberger/libtpms/commit/33c1f3c3c40e307663359a3505fc52cdaf311fd8 tpm2: Make RADIX_BITS dependent on openssl
Hardware: Raspberry Pi 3B OS: Ubuntu mate for Raspberry Pi Error message: