Even if your static archive (
libcrypto.a) has none of those relocations (obviously, it still does, even if you think you got rid of them. to check this is the case, try “
readelf -r /usr/lib/libcrypto.a”), the recommended practice is to linked shared objects to shared objects. So you have two such solutions:
- Install the shared version of libcrypto. When building openssl, specify “--enable-shared” as a configure parameter.
- Don’t try to create a shared version of libssh. When building libssh, specify “--disable-shared” as a configure parameter.
…and it’s just that simple.