gpt4 book ai didi

c++ - OpenSSL 编译在测试中失败

转载 作者:太空宇宙 更新时间:2023-11-04 12:32:49 29 4
gpt4 key购买 nike

我已经编译了 Openssl FIPS object module 2.0.16,我正在尝试用 FIPS 2.0.16 编译可兼容的 openssl 1.0.2

这里是使用的选项

./config fips no-shared --with-fipsdir=/home/dinesh/openssl-fips-install
make depend
make

test目录编译失败

make[2]: Entering directory '/home/dinesh/openssl-1.0.2t/test'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl -L.. -lcrypto -ldl}"; LDCMD="${LDCMD:-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -I/home/dinesh/openssl-fips-install/include -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM}"; LIBPATH=`for x in $LIBDEPS; do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=dtlstest} dtlstest.o ssltestlib.o ${LIBDEPS} )
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: ssltestlib.o: in function `main':
ssltestlib.c:(.text.startup+0x0): multiple definition of `main'; dtlstest.o:dtlstest.c:(.text.startup+0x0): first defined here
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: dtlstest.o: in function `test_dtls_unprocessed':
dtlstest.c:(.text+0x6d): undefined reference to `create_ssl_ctx_pair'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: dtlstest.c:(.text+0xaf): undefined reference to `bio_f_tls_dump_filter'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: dtlstest.c:(.text+0xde): undefined reference to `create_ssl_objects'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: dtlstest.c:(.text+0x124): undefined reference to `mempacket_test_inject'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: dtlstest.c:(.text+0x133): undefined reference to `create_ssl_connection'
collect2: error: ld returned 1 exit status
make[2]: *** [../Makefile.shared:164: link_app.] Error 1
make[2]: Leaving directory '/home/dinesh/openssl-1.0.2t/test'
make[1]: *** [Makefile:583: dtlstest] Error 2
make[1]: Leaving directory '/home/dinesh/openssl-1.0.2t/test'
make: *** [Makefile:295: build_tests] Error 1

我读过一些论坛建议以 root 身份登录并尝试 make clean 并运行 make。我仍然遇到同样的错误。请提出建议。

最佳答案

终于可以编译了。这是我发现的。虽然 config 告诉我们运行 make depend,但它不需要运行 make depend 因为这是一个新的编译。通过以 root 用户身份登录并运行 make 而没有 make depend 解决了这个问题。

关于c++ - OpenSSL 编译在测试中失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58007617/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com