我在安装tpm emulator的时候,执行以下readme中的指令:

# tar -xvzf tpm_emulator-X.Y.tar.gz
# cd tpm_emulator-X.Y
# mkdir build
# cd build
# cmake ../
# make
# make install
在执行到cmake ../的时候,就提示一下错误:
jianglu@jianglu-K43SJ:~/tpm_emulator-0.7/build$ make 
[ 2%] Building C object tpm/CMakeFiles/tpm.dir/tpm_migration.c.o 
/home/jianglu/tpm_emulator-0.7/tpm/tpm_migration.c: 在函数‘TPM_CMK_ApproveMA’中: 
/home/jianglu/tpm_emulator-0.7/tpm/tpm_migration.c:385:14: 错误: 变量‘res’被设定但未被使用 [-Werror=unused-but-set-variable] 
cc1: all warnings being treated as errors 
make[2]: *** [tpm/CMakeFiles/tpm.dir/tpm_migration.c.o] 错误 1 
make[1]: *** [tpm/CMakeFiles/tpm.dir/all] 错误 2 
make: *** [all] 错误 2

希望高手指教,谢谢……
哦,是执行到make的时候,不是执行到cmake ../的时候。

守候你守候我
浏览 91回答 1
1回答

MMTTMM

cmake就是使用makefile的看这一句:cc1: all warnings being treated as errorsYou need to remove -Werror from CFLAGS, CPPFLAGS etc.; these are usually set in Makefile's or build scripts.就是修改makefile,把-Werror去掉
打开App,查看更多内容
随时随地看视频慕课网APP