-
Notifications
You must be signed in to 8000 change notification settings - Fork 2.5k
Unclear how to link with OpenSSL 3 #6869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is the problem OpenSSL 3 or dynamic linking? Is there a backward compatibility mode for OpenSSL 3? I ask because I can build, link, and run against a typical (shared library) build of OpenSSL 3.3.2 without any difficulty. |
The problem is scanty documentation. I finally stumbled upon this tip, hidden in an error message:
Indeed, setting OPENSSL_ROOT_DIR resolved my issue. But it is not mentioned in the README file. |
I see; that's helpful feedback; I updated the README to include this. 🙏 |
Great, thanks! |
When building libgit2 it is not clear how to properly build with OpenSSL 3. By deafult, OpenSSL 1 on my system is linked with dynamically but I want to link (statically) with a local build of Open SSL 3. The only way to configure this is to set the OPENSSL_SSL_LIBRARY and OPENSSL_CRYPTO_LIBRARY variables when running "cmake .." but I just modifying the linking can cleary not be sufficient since OpenSSL 3 is not backward compatible with OpenSSL 1. And sure enough I get linking error.
Reproduction steps
cmake .. -DOPENSSL_SSL_LIBRARY=/Downloads/openssl-3.3.0/libssl.a -D OPENSSL_CRYP
TO_LIBRARY=/Downloads/openssl-3.3.0/libcrypto.a
cmake --build .
Expected behavior
At least a clear description of which OpenSSL versions are supported and how the build process selects either and how to override this selection if possible.
Actual behavior
/Downloads/libgit2-1.8.1/src/libgit2/streams/openssl.c:398: undefined reference to `SSL_get_peer_certificate'
Version of libgit2 (release number or SHA1)
1.8.1
Operating system(s) tested
RHEL 8.6
The text was updated successfully, but these errors were encountered: