I am trying to build openssl from the github release https://github.com/openssl/openssl/archive/OpenSSL-fips-2_0_13.tar.gz and trying to compile it manually. I am trying to compile this on a Mac OSX version 10.11.5, this is the series of steps I have taken
./Configure darwin64-x86_64-cc
make
But I get this error
bsaes-x86_64.s:580:1: error: invalid symbol redefinition
_bsaes_enc_key_convert:
When I compile normally according to the INSTALL
file, I get en error in the link step, presumably because the archive file was built for a 32 bit system. This is the warning I get when running ./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.
And then the corresponding error when linking with the archive from the ./config && make
step is this
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 I am building this for a C++ project using a C compiler to compile the C code and using a c++ compiler (or ld
since both compilers use the same linker?) to link code (not sure if that makes a difference)
Could someone tell me how to build and link with openssl correctly?