在SLES 12-SP2 x86_64上构建opensl 1.0.2p失败

时间:2018-09-25 11:15:30

标签: linux openssl sles

试图在SLES 12-SP2 x86_64上构建openssl 1.0.2p并失败 我以标准用户身份运行以下命令:

"NULL"

从控制台摘录

cd /usr/src/openssl-1.0.2p
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
make

1 个答案:

答案 0 :(得分:2)

./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib

随后...

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
libcrypto.a(gost_sign.o): relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a shared object;
recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
final link failed: Nonrepresentable section on output

这听起来像是您之前构建的,但省略了shared。然后,您重新配置并添加了shared

您应该执行make distclean,然后重新开始。执行distclean,然后依次运行./config ...make dependsmakemake install

OpenSSL 1.0.2需要make depends,因此请确保包括该步骤。

另请参阅OpenSSL Wiki上的Compilation and Installation