You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve options for linking with OpenSSL especially on MacOS (#1303)
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 [email protected] 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 [email protected] 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 many postings on
GH issues and Stack Overflow over the years. 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 [email protected] and openssl@3 installed, be explicit:
--with-openssl-dir=$(brew --prefix [email protected])
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 <[email protected]>
0 commit comments