我正在尝试从 github 版本构建 opensslhttps://github.com/openssl/openssl/archive/OpenSSL-fips-2_0_13.tar.gz https://github.com/openssl/openssl/archive/OpenSSL-fips-2_0_13.tar.gz并尝试手动编译它。我正在尝试在 Mac OSX 版本 10.11.5 上编译它,这是我采取的一系列步骤
./Configure darwin64-x86_64-cc
make
但我收到这个错误
bsaes-x86_64.s:580:1: error: invalid symbol redefinition
_bsaes_enc_key_convert:
当我按照正常编译时INSTALL
文件,我在链接步骤中遇到错误,大概是因为存档文件是为 32 位系统构建的。这是我运行时收到的警告./config
WARNING! If you wish to build 64-bit library, then you have to
invoke './Configure darwin64-x86_64-cc' *manually*.
You have about 5 seconds to press Ctrl-C to abort.
然后与存档链接时出现相应的错误./config && make
步骤是这个
ld: warning: ld: warning: ignoring file openssl/lib/libssl.a, file was
built for archive which is not the architecture being linked (x86_64):
openssl/lib/libssl.aignoring file openssl/lib/libcrypto.a, file was built
for archive which is not the architecture being linked (x86_64):
openssl/lib/libcrypto.a
Note我正在为一个 C++ 项目构建这个项目,使用 C 编译器来编译 C 代码并使用 C++ 编译器(或ld
因为两个编译器都使用相同的链接器?)来链接代码(不确定这是否有区别)
有人可以告诉我如何正确构建和链接 openssl 吗?