'错误:'CKM_AES_CTR'未声明'在编译libreswan-3.15时

时间:2015-09-14 15:17:27

标签: linux pkcs#11 ipsec l2tp

编译libreswan-3.15源代码时出现编译错误。

make [3]:进入目录/root/libreswan-3.15/OBJ.linux.i386/programs/pluto' cc -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-all -fno-strict-aliasing -fPIE -DPIE -DFORCE_PR_ASSERT -DDNSSEC -DFIPS_CHECK -DFIPSPRODUCTCHECK=\"/etc/system-fips\" -DKLIPS -DLIBCURL -DUSE_LINUX_AUDIT -DUSE_MD5 -DHAVE_NM -DUSE_SHA2 -DUSE_SHA1 -DFIPSPRODUCTCHECK=\"/etc/system-fips\" -DIPSEC_CONF=\"/etc/ipsec.conf\" -DIPSEC_CONFDDIR=\"/etc/ipsec.d\" -DIPSEC_NSSDIR=\"/etc/ipsec.d\" -DIPSEC_CONFDIR=\"/etc\" -DIPSEC_EXECDIR=\"/usr/local/libexec/ipsec\" -DIPSEC_SBINDIR=\"/usr/local/sbin\" -DIPSEC_VARDIR=\"/var\" -DPOLICYGROUPSDIR=\"/etc/ipsec.d/policies\" -DSHARED_SECRETS_FILE=\"/etc/ipsec.secrets\" -DGCC_LINT -DALLOW_MICROSOFT_BAD_PROPOSAL -Wall -Wextra -Wformat -Wformat-nonliteral -Wformat-security -Wundef -Wmissing-declarations -Wredundant-decls -Wnested-externs -I/root/libreswan-3.15/ports/linux/include -I/root/libreswan-3.15/ports/linux/include -I/root/libreswan-3.15/ports/linux/include -I/root/libreswan-3.15/ports/linux/include -I/root/libreswan-3.15/programs/pluto/linux26 -I/root/libreswan-3.15/include -I/root/libreswan-3.15/lib/libcrypto -I/root/libreswan-3.15/linux/include -DUSE_KEYRR -DNETKEY_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES -DPFKEY -DUSE_TWOFISH -DUSE_SERPENT -DKLIPS -DPFKEY -DUSE_AES -DUSE_3DES -DUSE_SHA2 -DUSE_SHA1 -DUSE_MD5 -DUSE_CAMELLIA -DXAUTH_HAVE_PAM -DLIBCURL -DFIPS_CHECK -DHAVE_LIBCAP_NG -DHAVE_NM -I/usr/include/nss3 -I/usr/include/nspr4 \ -MMD -MF ./ctr_test_vectors.d \ -o ./ctr_test_vectors.o \ -c /root/libreswan-3.15/programs/pluto/ctr_test_vectors.c /root/libreswan-3.15/programs/pluto/ctr_test_vectors.c: In function ‘test_aes_ctr’: /root/libreswan-3.15/programs/pluto/ctr_test_vectors.c:243: error: ‘CKM_AES_CTR’ undeclared (first use in this function) /root/libreswan-3.15/programs/pluto/ctr_test_vectors.c:243: error: (Each undeclared identifier is reported only once /root/libreswan-3.15/programs/pluto/ctr_test_vectors.c:243: error: for each function it appears in.) make[3]: *** [ctr_test_vectors.o] Error 1 make[3]: Leaving directory / root / libreswan-3.15 / OBJ.linux.i386 / programs / pluto' make [2]: * [local-base]错误2 make [2]:离开目录/root/libreswan-3.15/programs/pluto' make[1]: *** [all] Error 2 make[1]: Leaving directory / root / libreswan-3.15 / programs' make:* [all]错误2

尝试在互联网上搜索但未找到解决方案。请提供一些指示,以便我可以解决这个问题。

1 个答案:

答案 0 :(得分:0)

在我的系统上,/usr/include/nss/pkcs11t.h机制在文件pk11pub.h中声明(通过/usr/include/nss3/pkcs11t.h包含在受影响的源文件中)。

检查您的文件ionic setup sass (因为您的libnss可能已过时)。

(我无法在文档中找到构建libreswan所需的libnss版本)