为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

守候你守候我 2023-01-06 23:12:55
# 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 ../的时候。
查看完整描述

1 回答

?
MMTTMM

TA贡献1869条经验 获得超4个赞

cmake就是使用makefile的
看这一句:cc1: all warnings being treated as errors
You need to remove -Werror from CFLAGS, CPPFLAGS etc.; these are usually set in Makefile's or build scripts.

就是修改makefile,把-Werror去掉


查看完整回答
反对 回复 2023-01-10
  • 1 回答
  • 0 关注
  • 90 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信