-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve options for linking with OpenSSL especially on MacOS
Starting a few MacOS majors ago, OpenSSL was no longer included in a way that applications could link against. Even the system Ruby at /usr/bin/ruby was modified to use a MacOS internal SSL implementation. The most common workaround is to use Homebrew to install OpenSSL. Using GitHub Actions as the project's CI tool, we found that both openssl@1.1 and openssl@3 were installed in the default image, and that openssl@3 was returned by default but this mismatched the version the MySQL client libraries were compiled against. While the quick workaround might be to look for openssl@1.1 instead of openssl, a more general improvement is to provide an option for users to specify where OpenSSL is installed. Indeed this issue has been the cause of dozen so GH issues and Stack Overflow postings. Hopefully this PR improves the situation for a broad swath of users! Unlike the existing option `--with-opt-dir`, the new option `--with-openssl-dir` will fail if the argument is not a valid path rather than producing unexpected results at runtime. This is the default behavior on MacOS: --with-openssl-dir=$(brew --prefix openssl) If you have both openssl@1.1 and openssl@3 installed, be explicit: --with-openssl-dir=$(brew --prefix openssl@1.1) The option is available on all platforms and may be helpful for non-default OpenSSL installations on Linux or FreeBSD as well. Co-Authored-By: Jun Aruga <jaruga@redhat.com>
- Loading branch information
Showing
2 changed files
with
47 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters