GH-36329: [C++][CI] Use OpenSSL 3 on macOS (#36336) #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale for this change
GitHub Actions self-hosted runner for macOS has
/usr/local/include/openssl/ provided by OpenSSL 3 (
openssl@ 3
). Our include paths have... -isystem /usr/local/include -isystem /usr/local/opt/openssl@ 1.1/include ...
. It means that/usr/local/include/openssl/...
is used for#include <openssl/...>
.If we mix OpenSSL 3 headers and OpenSSL 1.1 libraries, we may get some problems such as a link error.
What changes are included in this PR?
This uses OpenSSL 3 instead of OpenSSL 1.1 because GitHub Actions self-hosted runner for macOS provides OpenSSL 3 by /usr/local/include/openssl/. Note that
$(brew --prefix openssl@ 3)/include
isn't linked as /usr/local/include/openssl` by default. So I think that Homebrew GitHub Actions self-hosted runner for macOS does it explicitly.Other solution: Unlinking
/usr/local/include/openssl
bybrew unlink openssl@ 3
. But there is no reason to use OpenSSL 1.1 for us. So this PR doesn't use this solution.Are these changes tested?
Yes.
Are there any user-facing changes?
Yes.
Authored-by: Sutou Kouhei [email protected]