tpm2-tss包的的安装方法参考:
tpm2-tss/INSTALL.md at master · tpm2-software/tpm2-tss · GitHub
1. 源码下载
$ git clone https://github.com/tpm2-software/tpm2-tss.git
下载完成后,源码内容如下所示:
$ ls
afl-fuzzing CHANGELOG.md configure.ac dist Doxyfile.in include lib m4 Makefile.am Makefile-test.am README.md script sphinx test tss2-dlopen
bootstrap CODE_OF_CONDUCT.md CONTRIBUTING.md doc git.mk INSTALL.md LICENSE MAINTAINERS Makefile-fuzz.am man RELEASE.md SECURITY.md src tpm2-tss.sln$ ls -l
总用量 504
drwxrwxr-x 2 ph ph 4096 12月 1 16:07 afl-fuzzing
-rwxrwxr-x 1 ph ph 2969 12月 1 16:07 bootstrap
-rw-rw-r-- 1 ph ph 53489 12月 1 16:07 CHANGELOG.md
-rw-rw-r-- 1 ph ph 5492 12月 1 16:07 CODE_OF_CONDUCT.md
-rw-rw-r-- 1 ph ph 28121 12月 1 16:07 configure.ac
-rw-rw-r-- 1 ph ph 2901 12月 1 16:07 CONTRIBUTING.md
drwxrwxr-x 5 ph ph 4096 12月 1 16:07 dist
drwxrwxr-x 2 ph ph 4096 12月 1 16:07 doc
-rw-rw-r-- 1 ph ph 115070 12月 1 16:07 Doxyfile.in
-rw-rw-r-- 1 ph ph 12871 12月 1 16:07 git.mk
drwxrwxr-x 3 ph ph 4096 12月 1 16:07 include
-rw-rw-r-- 1 ph ph 7037 12月 1 16:07 INSTALL.md
drwxrwxr-x 2 ph ph 4096 12月 1 16:07 lib
-rw-rw-r-- 1 ph ph 1236 12月 1 16:07 LICENSE
drwxrwxr-x 2 ph ph 4096 12月 1 16:07 m4
-rw-rw-r-- 1 ph ph 121 12月 1 16:07 MAINTAINERS
-rw-rw-r-- 1 ph ph 33267 12月 1 16:07 Makefile.am
-rw-rw-r-- 1 ph ph 2074 12月 1 16:07 Makefile-fuzz.am
-rw-rw-r-- 1 ph ph 132776 12月 1 16:07 Makefile-test.am
drwxrwxr-x 2 ph ph 4096 12月 1 16:07 man
-rw-rw-r-- 1 ph ph 13111 12月 1 16:07 README.md
-rw-rw-r-- 1 ph ph 6191 12月 1 16:07 RELEASE.md
drwxrwxr-x 3 ph ph 4096 12月 1 16:07 script
-rw-rw-r-- 1 ph ph 1609 12月 1 16:07 SECURITY.md
drwxrwxr-x 2 ph ph 4096 12月 1 16:07 sphinx
drwxrwxr-x 10 ph ph 4096 12月 1 16:07 src
drwxrwxr-x 8 ph ph 4096 12月 1 16:07 test
-rw-rw-r-- 1 ph ph 7040 12月 1 16:07 tpm2-tss.sln
drwxrwxr-x 2 ph ph 4096 12月 1 16:07 tss2-dlopen
2. 安装依赖
To build and install the tpm2-tss software the following software packages are required. In many cases dependencies are platform specific and so the following sections describe them for the supported platforms.
编译并安装tpm2-tss需要以下软件依赖。在很多情况下,依赖是特定于平台的,以下段描述支持的平台:
- GNU Autoconf
- GNU Autoconf Archive, version >= 2017.03.21
- GNU Automake
- GNU Libtool
- C compiler
- C library development libraries and header files
- pkg-config
- doxygen
- OpenSSL development libraries and header files, version >= 1.1.0
- libcurl development libraries
- Access Control List utility (acl)
- JSON C Development library
编译测试套件时需要的包:
- Integration test suite (see ./configure option --enable-integration):
- uthash development libraries and header files
- ps executable (usually in the procps package)
- ss executable (usually in the iproute2 package)
- tpm_server executable (from IBM's Software TPM 2.0 download | SourceForge.net)
- Unit test suite (see ./configure option --enable-unit):
- cmocka unit test framework, version >= 1.0
- Code coverage analysis:
- lcov
Ubuntu(Ubuntu 22.04)环境下,安装依赖步骤:
- autoconf-archive安装
$ sudo apt install autoconf-archive
[sudo] ph 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:autoconf-archive
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
需要下载 676 kB 的归档。
解压缩后会消耗 5,967 kB 的额外空间。
获取:1 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 autoconf-archive all 20210219-2.1 [676 kB]
已下载 676 kB,耗时 7秒 (99.8 kB/s)
正在选中未选择的软件包 autoconf-archive。
(正在读取数据库 ... 系统当前共安装有 257780 个文件和目录。)
准备解压 .../autoconf-archive_20210219-2.1_all.deb ...
正在解压 autoconf-archive (20210219-2.1) ...
正在设置 autoconf-archive (20210219-2.1) ...
正在处理用于 install-info (6.8-4build1) 的触发器 ...
- libcmocka0安装
$ sudo apt install libcmocka0
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:libcmocka0
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
需要下载 21.1 kB 的归档。
解压缩后会消耗 67.6 kB 的额外空间。
获取:1 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 libcmocka0 amd64 1.1.5-2 [21.1 kB]
已下载 21.1 kB,耗时 1秒 (19.0 kB/s)
正在选中未选择的软件包 libcmocka0:amd64。
(正在读取数据库 ... 系统当前共安装有 258952 个文件和目录。)
准备解压 .../libcmocka0_1.1.5-2_amd64.deb ...
正在解压 libcmocka0:amd64 (1.1.5-2) ...
正在设置 libcmocka0:amd64 (1.1.5-2) ...
正在处理用于 libc-bin (2.35-0ubuntu3.1) 的触发器 ...
- libcmocka-dev安装
$ sudo apt install libcmocka-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:cmocka-doc
下列【新】软件包将被安装:cmocka-doc libcmocka-dev
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
需要下载 100 kB 的归档。
解压缩后会消耗 1,106 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 cmocka-doc all 1.1.5-2 [84.2 kB]
获取:2 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 libcmocka-dev amd64 1.1.5-2 [15.9 kB]
已下载 100 kB,耗时 3秒 (39.3 kB/s)
正在选中未选择的软件包 cmocka-doc。
(正在读取数据库 ... 系统当前共安装有 258957 个文件和目录。)
准备解压 .../cmocka-doc_1.1.5-2_all.deb ...
正在解压 cmocka-doc (1.1.5-2) ...
正在选中未选择的软件包 libcmocka-dev:amd64。
准备解压 .../libcmocka-dev_1.1.5-2_amd64.deb ...
正在解压 libcmocka-dev:amd64 (1.1.5-2) ...
正在设置 libcmocka-dev:amd64 (1.1.5-2) ...
正在设置 cmocka-doc (1.1.5-2) ...
- procps安装
$ sudo apt install procps
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
procps 已经是最新版 (2:3.3.17-6ubuntu2)。
procps 已设置为手动安装。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
- iproute2安装
$ sudo apt install iproute2
[sudo] ph 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
iproute2 已经是最新版 (5.15.0-1ubuntu2)。
iproute2 已设置为手动安装。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
- build-essential安装
$ sudo apt install build-essential
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
build-essential 已经是最新版 (12.9ubuntu3)。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
- git安装
$ sudo apt install git
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
git 已经是最新版 (1:2.34.1-1ubuntu1.5)。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
- pkg-config安装
$ sudo apt install pkg-config
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
pkg-config 已经是最新版 (0.29.2-1ubuntu3)。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
- gcc安装
$ sudo apt install gcc
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
gcc 已经是最新版 (4:11.2.0-1ubuntu1)。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
- libtool安装
$ sudo apt install libtool
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
libtool 已经是最新版 (2.4.6-15build2)。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
- automake安装
$ sudo apt install automake
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
automake 已经是最新版 (1:1.16.5-1.3)。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
- libssl-dev安装
$ sudo apt install libssl-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
libssl-dev 已经是最新版 (3.0.2-0ubuntu1.7)。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
- uthash-dev安装
$ sudo apt install uthash-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:uthash-dev
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
需要下载 176 kB 的归档。
解压缩后会消耗 938 kB 的额外空间。
获取:1 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 uthash-dev amd64 2.3.0-1 [176 kB]
已下载 176 kB,耗时 2秒 (72.5 kB/s)
正在选中未选择的软件包 uthash-dev:amd64。
(正在读取数据库 ... 系统当前共安装有 259148 个文件和目录。)
准备解压 .../uthash-dev_2.3.0-1_amd64.deb ...
正在解压 uthash-dev:amd64 (2.3.0-1) ...
正在设置 uthash-dev:amd64 (2.3.0-1) ...
正在处理用于 man-db (2.10.2-1) 的触发器 ...
- autoconf安装
$ sudo apt install autoconf
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
autoconf 已经是最新版 (2.71-2)。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
- doxygen安装
$ sudo apt install doxygen
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:libclang-cpp14 libxapian30
建议安装:doxygen-latex doxygen-doc doxygen-gui graphviz xapian-tools
下列【新】软件包将被安装:doxygen libclang-cpp14 libxapian30
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
需要下载 17.4 MB 的归档。
解压缩后会消耗 78.6 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 libclang-cpp14 amd64 1:14.0.0-1ubuntu1 [12.1 MB]
获取:2 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 libxapian30 amd64 1.4.18-4 [701 kB]
获取:3 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 doxygen amd64 1.9.1-2ubuntu2 [4,620 kB]
已下载 17.4 MB,耗时 11秒 (1,600 kB/s)
正在选中未选择的软件包 libclang-cpp14。
(正在读取数据库 ... 系统当前共安装有 259293 个文件和目录。)
准备解压 .../libclang-cpp14_1%3a14.0.0-1ubuntu1_amd64.deb ...
正在解压 libclang-cpp14 (1:14.0.0-1ubuntu1) ...
正在选中未选择的软件包 libxapian30:amd64。
准备解压 .../libxapian30_1.4.18-4_amd64.deb ...
正在解压 libxapian30:amd64 (1.4.18-4) ...
正在选中未选择的软件包 doxygen。
准备解压 .../doxygen_1.9.1-2ubuntu2_amd64.deb ...
正在解压 doxygen (1.9.1-2ubuntu2) ...
正在设置 libxapian30:amd64 (1.4.18-4) ...
正在设置 libclang-cpp14 (1:14.0.0-1ubuntu1) ...
正在设置 doxygen (1.9.1-2ubuntu2) ...
正在处理用于 man-db (2.10.2-1) 的触发器 ...
正在处理用于 libc-bin (2.35-0ubuntu3.1) 的触发器 ...
- libjson-c-dev安装
$ sudo apt install libjson-c-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:libjson-c-dev
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
需要下载 60.5 kB 的归档。
解压缩后会消耗 290 kB 的额外空间。
获取:1 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libjson-c-dev amd64 0.15-3~ubuntu1.22.04.1 [60.5 kB]
已下载 60.5 kB,耗时 1秒 (46.3 kB/s)
正在选中未选择的软件包 libjson-c-dev:amd64。
(正在读取数据库 ... 系统当前共安装有 259323 个文件和目录。)
准备解压 .../libjson-c-dev_0.15-3~ubuntu1.22.04.1_amd64.deb ...
正在解压 libjson-c-dev:amd64 (0.15-3~ubuntu1.22.04.1) ...
正在设置 libjson-c-dev:amd64 (0.15-3~ubuntu1.22.04.1) ...
- libini-config-dev
$ sudo apt install libini-config-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:libbasicobjects-dev libbasicobjects0 libcollection-dev libcollection4 libini-config5 libpath-utils1 libref-array-dev libref-array1
下列【新】软件包将被安装:libbasicobjects-dev libbasicobjects0 libcollection-dev libcollection4 libini-config-dev libini-config5 libpath-utils1 libref-array-dev libref-array1
升级了 0 个软件包,新安装了 9 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
需要下载 215 kB 的归档。
解压缩后会消耗 1,047 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 libbasicobjects0 amd64 0.6.2-1 [6,160 B]
获取:2 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 libbasicobjects-dev amd64 0.6.2-1 [4,148 B]
获取:3 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 libcollection4 amd64 0.6.2-1 [23.9 kB]
获取:4 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 libcollection-dev amd64 0.6.2-1 [43.1 kB]
获取:5 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 libpath-utils1 amd64 0.6.2-1 [9,254 B]
获取:6 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 libref-array1 amd64 0.6.2-1 [7,720 B]
获取:7 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 libini-config5 amd64 0.6.2-1 [44.5 kB]
获取:8 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 libref-array-dev amd64 0.6.2-1 [7,914 B]
获取:9 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 libini-config-dev amd64 0.6.2-1 [68.7 kB]
已下载 215 kB,耗时 3秒 (70.2 kB/s)
正在选中未选择的软件包 libbasicobjects0:amd64。
(正在读取数据库 ... 系统当前共安装有 259349 个文件和目录。)
准备解压 .../0-libbasicobjects0_0.6.2-1_amd64.deb ...
正在解压 libbasicobjects0:amd64 (0.6.2-1) ...
正在选中未选择的软件包 libbasicobjects-dev。
准备解压 .../1-libbasicobjects-dev_0.6.2-1_amd64.deb ...
正在解压 libbasicobjects-dev (0.6.2-1) ...
正在选中未选择的软件包 libcollection4:amd64。
准备解压 .../2-libcollection4_0.6.2-1_amd64.deb ...
正在解压 libcollection4:amd64 (0.6.2-1) ...
正在选中未选择的软件包 libcollection-dev。
准备解压 .../3-libcollection-dev_0.6.2-1_amd64.deb ...
正在解压 libcollection-dev (0.6.2-1) ...
正在选中未选择的软件包 libpath-utils1:amd64。
准备解压 .../4-libpath-utils1_0.6.2-1_amd64.deb ...
正在解压 libpath-utils1:amd64 (0.6.2-1) ...
正在选中未选择的软件包 libref-array1:amd64。
准备解压 .../5-libref-array1_0.6.2-1_amd64.deb ...
正在解压 libref-array1:amd64 (0.6.2-1) ...
正在选中未选择的软件包 libini-config5:amd64。
准备解压 .../6-libini-config5_0.6.2-1_amd64.deb ...
正在解压 libini-config5:amd64 (0.6.2-1) ...
正在选中未选择的软件包 libref-array-dev。
准备解压 .../7-libref-array-dev_0.6.2-1_amd64.deb ...
正在解压 libref-array-dev (0.6.2-1) ...
正在选中未选择的软件包 libini-config-dev。
准备解压 .../8-libini-config-dev_0.6.2-1_amd64.deb ...
正在解压 libini-config-dev (0.6.2-1) ...
正在设置 libpath-utils1:amd64 (0.6.2-1) ...
正在设置 libbasicobjects0:amd64 (0.6.2-1) ...
正在设置 libbasicobjects-dev (0.6.2-1) ...
正在设置 libcollection4:amd64 (0.6.2-1) ...
正在设置 libcollection-dev (0.6.2-1) ...
正在设置 libref-array1:amd64 (0.6.2-1) ...
正在设置 libref-array-dev (0.6.2-1) ...
正在设置 libini-config5:amd64 (0.6.2-1) ...
正在设置 libini-config-dev (0.6.2-1) ...
正在处理用于 libc-bin (2.35-0ubuntu3.1) 的触发器 ...
- libcurl4-openssl-dev
$ sudo apt install libcurl4-openssl-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
建议安装:libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev
下列软件包将被【卸载】:libcurl4-gnutls-dev
下列【新】软件包将被安装:libcurl4-openssl-dev
升级了 0 个软件包,新安装了 1 个软件包,要卸载 1 个软件包,有 6 个软件包未被升级。
需要下载 385 kB 的归档。
解压缩后会消耗 25.6 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libcurl4-openssl-dev amd64 7.81.0-1ubuntu1.6 [385 kB]
已下载 385 kB,耗时 2秒 (183 kB/s)
(正在读取数据库 ... 系统当前共安装有 259410 个文件和目录。)
正在卸载 libcurl4-gnutls-dev:amd64 (7.81.0-1ubuntu1.6) ...
正在选中未选择的软件包 libcurl4-openssl-dev:amd64。
(正在读取数据库 ... 系统当前共安装有 259387 个文件和目录。)
准备解压 .../libcurl4-openssl-dev_7.81.0-1ubuntu1.6_amd64.deb ...
正在解压 libcurl4-openssl-dev:amd64 (7.81.0-1ubuntu1.6) ...
正在设置 libcurl4-openssl-dev:amd64 (7.81.0-1ubuntu1.6) ...
正在处理用于 man-db (2.10.2-1) 的触发器 ...
- libuuid-dev(未找到)
$ sudo apt install libuuid-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
E: 无法定位软件包 libuuid-dev
尝试uuid-dev
$ sudo apt install uuid-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:uuid-dev
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
需要下载 33.1 kB 的归档。
解压缩后会消耗 176 kB 的额外空间。
获取:1 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 uuid-dev amd64 2.37.2-4ubuntu3 [33.1 kB]
已下载 33.1 kB,耗时 1秒 (25.8 kB/s)
正在选中未选择的软件包 uuid-dev:amd64。
(正在读取数据库 ... 系统当前共安装有 259408 个文件和目录。)
准备解压 .../uuid-dev_2.37.2-4ubuntu3_amd64.deb ...
正在解压 uuid-dev:amd64 (2.37.2-4ubuntu3) ...
正在设置 uuid-dev:amd64 (2.37.2-4ubuntu3) ...
正在处理用于 man-db (2.10.2-1) 的触发器 ...
- libltdl-dev
$ sudo apt install libltdl-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
libltdl-dev 已经是最新版 (2.4.6-15build2)。
libltdl-dev 已设置为手动安装。
下列软件包是自动安装的并且现在不需要了:golang-1.18-go golang-1.18-src golang-src libflashrom1 libftdi1-2
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。
3. 源码构建
- 引导构建
在配置tpm2-tss前,首先要运行引导(自举)脚本,此脚本产生源文件列表,并且创建配置脚本。如下所示:
$ ./bootstrap
Generating file lists: src_vars.mk
aclocal: installing 'm4/ax_ac_append_to_file.m4' from '/usr/share/aclocal/ax_ac_append_to_file.m4'
aclocal: installing 'm4/ax_ac_print_to_file.m4' from '/usr/share/aclocal/ax_ac_print_to_file.m4'
aclocal: installing 'm4/ax_add_am_macro_static.m4' from '/usr/share/aclocal/ax_add_am_macro_static.m4'
aclocal: installing 'm4/ax_add_fortify_source.m4' from '/usr/share/aclocal/ax_add_fortify_source.m4'
aclocal: installing 'm4/ax_am_macros_static.m4' from '/usr/share/aclocal/ax_am_macros_static.m4'
aclocal: installing 'm4/ax_check_compile_flag.m4' from '/usr/share/aclocal/ax_check_compile_flag.m4'
aclocal: installing 'm4/ax_check_enable_debug.m4' from '/usr/share/aclocal/ax_check_enable_debug.m4'
aclocal: installing 'm4/ax_check_gnu_make.m4' from '/usr/share/aclocal/ax_check_gnu_make.m4'
aclocal: installing 'm4/ax_check_link_flag.m4' from '/usr/share/aclocal/ax_check_link_flag.m4'
aclocal: installing 'm4/ax_code_coverage.m4' from '/usr/share/aclocal/ax_code_coverage.m4'
aclocal: installing 'm4/ax_file_escapes.m4' from '/usr/share/aclocal/ax_file_escapes.m4'
aclocal: installing 'm4/ax_is_release.m4' from '/usr/share/aclocal/ax_is_release.m4'
aclocal: installing 'm4/ax_normalize_path.m4' from '/usr/share/aclocal/ax_normalize_path.m4'
aclocal: installing 'm4/ax_prog_doxygen.m4' from '/usr/share/aclocal/ax_prog_doxygen.m4'
aclocal: installing 'm4/ax_recursive_eval.m4' from '/usr/share/aclocal/ax_recursive_eval.m4'
aclocal: installing 'm4/ax_valgrind_check.m4' from '/usr/share/aclocal/ax_valgrind_check.m4'
aclocal: installing 'm4/libtool.m4' from '/usr/share/aclocal/libtool.m4'
aclocal: installing 'm4/ltdl.m4' from '/usr/share/aclocal/ltdl.m4'
aclocal: installing 'm4/ltoptions.m4' from '/usr/share/aclocal/ltoptions.m4'
aclocal: installing 'm4/ltsugar.m4' from '/usr/share/aclocal/ltsugar.m4'
aclocal: installing 'm4/ltversion.m4' from '/usr/share/aclocal/ltversion.m4'
aclocal: installing 'm4/lt~obsolete.m4' from '/usr/share/aclocal/lt~obsolete.m4'
aclocal: installing 'm4/pkg.m4' from '/usr/share/aclocal/pkg.m4'
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
configure.ac:28: installing './compile'
configure.ac:23: installing './config.guess'
configure.ac:23: installing './config.sub'
configure.ac:12: installing './install-sh'
configure.ac:12: installing './missing'
aminclude_static.am:63: warning: GITIGNOREFILES was already defined in condition TRUE, which includes condition AUTOCONF_CODE_COVERAGE_2019_01_06 and CODE_COVERAGE_ENABLED ...
Makefile.am:56: 'aminclude_static.am' included from here
Makefile.am:52: ... 'GITIGNOREFILES' previously defined here
Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
- 配置构建
Invoking the configure script with the --help
option will display all supported options.
先运行带--help选项的configure脚本来查看所有支持的选项。如下所示:
$ ./configure --help
`configure' configures tpm2-tss 4.0.0-rc0 to adapt to many kinds of systems.Usage: ./configure [OPTION]... [VAR=VALUE]...To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.Defaults for the options are specified in brackets.Configuration:-h, --help display this help and exit--help=short display options specific to this package--help=recursive display the short help of all the included packages-V, --version display version information and exit-q, --quiet, --silent do not print `checking ...' messages--cache-file=FILE cache test results in FILE [disabled]-C, --config-cache alias for `--cache-file=config.cache'-n, --no-create do not create output files--srcdir=DIR find the sources in DIR [configure dir or `..']Installation directories:--prefix=PREFIX install architecture-independent files in PREFIX[/usr/local]--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX[PREFIX]By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.For better control, use the options below.Fine tuning of the installation directories:--bindir=DIR user executables [EPREFIX/bin]--sbindir=DIR system admin executables [EPREFIX/sbin]--libexecdir=DIR program executables [EPREFIX/libexec]--sysconfdir=DIR read-only single-machine data [PREFIX/etc]--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]--localstatedir=DIR modifiable single-machine data [PREFIX/var]--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]--libdir=DIR object code libraries [EPREFIX/lib]--includedir=DIR C header files [PREFIX/include]--oldincludedir=DIR C header files for non-gcc [/usr/include]--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]--datadir=DIR read-only architecture-independent data [DATAROOTDIR]--infodir=DIR info documentation [DATAROOTDIR/info]--localedir=DIR locale-dependent data [DATAROOTDIR/locale]--mandir=DIR man documentation [DATAROOTDIR/man]--docdir=DIR documentation root [DATAROOTDIR/doc/tpm2-tss]--htmldir=DIR html documentation [DOCDIR]--dvidir=DIR dvi documentation [DOCDIR]--pdfdir=DIR pdf documentation [DOCDIR]--psdir=DIR ps documentation [DOCDIR]Program names:--program-prefix=PREFIX prepend PREFIX to installed program names--program-suffix=SUFFIX append SUFFIX to installed program names--program-transform-name=PROGRAM run sed PROGRAM on installed program namesSystem types:--build=BUILD configure for building on BUILD [guessed]--host=HOST cross-compile to build programs to run on HOST [BUILD]Optional Features:--disable-option-checking ignore unrecognized --enable/--with options--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)--enable-FEATURE[=ARG] include FEATURE [ARG=yes]--enable-silent-rules less verbose build output (undo: "make V=1")--disable-silent-rules verbose build output (undo: "make V=0")--enable-debug=[yes/info/profile/no]compile with debugging--enable-dependency-trackingdo not reject slow dependency extractors--disable-dependency-trackingspeeds up one-time build--enable-shared[=PKGS] build shared libraries [default=yes]--enable-static[=PKGS] build static libraries [default=yes]--enable-fast-install[=PKGS]optimize for fast installation [default=yes]--disable-libtool-lock avoid locking (might break parallel builds)--enable-unit build cmocka unit tests--disable-esys don't build the esys layer--enable-fapi build the fapi layer (default is yes)--enable-fapi-async-testsForce fapi to spin asynchronously. (NOT FORPRODUCTION!)--enable-policy build the tss2-policy library (default is yes)--enable-vendor build vendor specific extensions (default is yes)--disable-tcti-device don't build the tcti-device module--disable-tcti-mssim don't build the tcti-mssim module--disable-tcti-swtpm don't build the tcti-swtpm module--disable-tcti-pcap don't build the tcti-pcap module--disable-tcti-libtpms don't build the tcti-libtpms module--disable-tcti-cmd don't build the tcti-cmd module--disable-tcti-spi-helperdon't build the tcti-spi-helper module--enable-tcti-fuzzing build the tcti-fuzzing module--enable-nodl link against TCTIs directly, do not use dlopen--enable-integration build and execute integration tests--enable-valgrind Whether to enable Valgrind on the unit tests--disable-valgrind-memcheckWhether to skip memcheck during the Valgrind tests--disable-valgrind-helgrindWhether to skip helgrind during the Valgrind tests--disable-valgrind-drd Whether to skip drd during the Valgrind tests--disable-valgrind-sgcheckWhether to skip sgcheck during the Valgrind tests--enable-ld-version-scriptenable linker version script (default is enabledwhen possible)--disable-log-file write logging to stderr only--disable-defaultflags Disable default preprocessor, compiler, and linkerflags.--disable-weakcrypto Disable crypto algorithms considered weak--enable-self-generated-certificateAlllow usage of self generated root certifcate--disable-doxygen-doc don't generate any doxygen documentation--enable-doxygen-dot generate graphics for doxygen documentation--disable-doxygen-man don't generate doxygen manual pages--disable-doxygen-rtf don't generate doxygen RTF documentation--enable-doxygen-xml generate doxygen XML documentation--enable-doxygen-chm generate doxygen compressed HTML help documentation--enable-doxygen-chi generate doxygen separate compressed HTML help indexfile--disable-doxygen-html don't generate doxygen plain HTML documentation--enable-doxygen-ps generate doxygen PostScript documentation--enable-doxygen-pdf generate doxygen PDF documentation--enable-code-coverage Whether to enable code coverage supportOptional Packages:--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=useboth]--with-aix-soname=aix|svr4|bothshared library versioning (aka "SONAME") variant toprovide on AIX, [default=aix].--with-gnu-ld assume the C compiler uses GNU ld [default=no]--with-sysroot[=DIR] Search for dependent libraries within DIR (or thecompiler's sysroot if not specified).--with-pkgconfigdir pkg-config installation directory['${libdir}/pkgconfig']--with-imameasurements=<file>sets file with the IMA measurements")--with-sysmeasurements=<file>sets file with the binary bios measurements")--with-runstatedir=<dir>replacement for --runstatedir in Autoconf <2.70--with-userstatedir=<dir>sets the relative path in the user's home (defaultis ".local/share")--with-sysusersdir=<dir>sets the sysusers.d directory (default is"${sysconfdir}/sysusers.d")--with-tmpfilesdir=<dir>sets the tmpfiles.d directory (default is"${sysconfdir}/tmpfiles.d")--with-crypto={ossl,mbed,none}sets the ESYS crypto backend (default is OpenSSL)--with-tctidefaultmoduleThe default TCTI module for ESYS. (Default:libtss2-tcti-default.so)--with-tctidefaultconfigThe default tcti module's configuration.--with-udevrulesdir=DIR udev rules directory--with-udevrulesprefix=XYprefix for udev rules file--with-device=<device> TPM device for testing--with-devicetests=<case>Comma-separated values of possible tests:destructive,mandatory,optional default is mandatory--with-sanitizer={none,address,undefined}build with the given sanitizer--with-fuzzing={none,libfuzzer,ossfuzz}fuzzing to build with (default is none)--with-maxloglevel={none,error,warning,info,debug,trace}sets the maximum log level (default is trace)--with-gcov=GCOV use given GCOV for coverage (GCOV=gcov).--with-default-test-fapi-profile=PROFILEsets the default FAPI profile used in testsSome influential environment variables:CC C compiler commandCFLAGS C compiler flagsLDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in anonstandard directory <lib dir>LIBS libraries to pass to the linker, e.g. -l<library>CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> ifyou have headers in a nonstandard directory <include dir>CXX C++ compiler commandCXXFLAGS C++ compiler flagsLT_SYS_LIBRARY_PATHUser-defined run-time library search path.CXXCPP C++ preprocessorPKG_CONFIG path to pkg-config utilityPKG_CONFIG_PATHdirectories to add to pkg-config's search pathPKG_CONFIG_LIBDIRpath overriding pkg-config's built-in search pathCMOCKA_CFLAGSC compiler flags for CMOCKA, overriding pkg-configCMOCKA_LIBS linker flags for CMOCKA, overriding pkg-configCRYPTO_CFLAGSC compiler flags for CRYPTO, overriding pkg-configCRYPTO_LIBS linker flags for CRYPTO, overriding pkg-configJSONC_CFLAGSC compiler flags for JSONC, overriding pkg-configJSONC_LIBS linker flags for JSONC, overriding pkg-configCURL_CFLAGS C compiler flags for CURL, overriding pkg-configCURL_LIBS linker flags for CURL, overriding pkg-configUUID_CFLAGS C compiler flags for UUID, overriding pkg-configUUID_LIBS linker flags for UUID, overriding pkg-configDOXYGEN_PAPER_SIZEa4wide (default), a4, letter, legal or executiveUse these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.Report bugs to <https://github.com/tpm2-software/tpm2-tss/issues>.
tpm2-tss home page: <https://github.com/tpm2-software/tpm2-tss>.