Skip to content
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

Make OpenSSL static link on all operating systems preferentially #1229

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

g-robertson
Copy link
Contributor

This should resolve issue #1215 as it will make the binaries generated for Linux static link OpenSSL so ubuntu 22.04 should not need to have OpenSSL 1.1 to function.

The reason this was chosen over switching to OpenSSL 3.0 with maintaining dynamic linking on Linux is because doing this would create the same problem for Ubuntu 20.04 LTS as they are stuck with OpenSSL 1.1. The CI for Etterna also uses Ubuntu 20.04 which means trying to switch to OpenSSL 3.0 would make that build fail without manually grabbing the package from the Ubuntu 22.04 repositories.

The reason dynamic linking is still allowed in the build process is for operating systems (Arch Linux) that lack static versions of packages and must dynamically link if they want to compile the game (see #952)

@nico-abram
Copy link
Member

Is there a reason to automatically switch to dynamic linking in the cmake script if we fail to find a static openssl? That seems bad to me if the user explicitly sets OPENSSL_USE_STATIC_LIBS

@g-robertson
Copy link
Contributor Author

The aim was for compilation to "just work" without any additional flags on the same devices that it currently does regardless of if they don't have dynamic or static versions of openssl. I could make it error if it's not found statically with an error message more explicit in what needs to be done in order to make compilation work on systems without static versions of OpenSSL (e.g. "No static version of OpenSSL was found, try setting the flag -OPENSSL_USE_STATIC_LIBS=OFF".)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants