Skip to content

ci: build with openssl@3 on macOS, brew's openssl is OpenSSL 4 now - #121

Merged
everoddandeven merged 1 commit into
libmonero:mainfrom
everoddandeven:ci/macos-openssl-3
Oct 30, 2026
Merged

everoddandeven merged 1 commit into
libmonero:mainfrom
everoddandeven:ci/macos-openssl-3

Conversation

@everoddandeven

Copy link
Copy Markdown
Member

The macos-15-arm64 runner image of 28 October (20261028.0489) ships openssl@4 4.1.0, and brew --prefix openssl points to it. monero-project and monero-cpp both run that command on macOS and overwrite OPENSSL_ROOT_DIR with the result, and boost 1.85 does not build with OpenSSL 4: asio's rfc2818_verification.ipp reads ASN1_IA5STRING members, which are opaque now, so "Build monero" fails in epee/abstract_http_client.cpp. GitHub rolls the images out gradually, the run of the release pull request landed on the previous image (20260907, openssl@3 3.6.4) and passed, the next ones on main did not. macos-14 and macos-15-intel are still on images with openssl@3 and will follow.

Install openssl@3, export its prefix in OPENSSL_ROOT_DIR and pass it with -D to the cmake of monero-project and monero-cpp, which ignore the environment. The module finds it in the environment. Applies to Tests and Build MacOS.

@codacy-production

codacy-production Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage · +0.01% coverage variation

Metric Results
Coverage variation ✅ +0.01% coverage variation (-1.00%)
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (e46cc00) 13862 13247 95.56%
Head commit (7773eeb) 13862 (+0) 13248 (+1) 95.57% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#121) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Two things broke the builds on the new runner images and on a cache restored
from another machine.

macOS: the macos-15-arm64 image of 28 October (20261028.0489) ships openssl@4
4.1.0, brew --prefix openssl points to it, and boost 1.85 does not build with
OpenSSL 4 (asio's rfc2818_verification.ipp reads ASN1_IA5STRING members, which
are opaque now), so "Build monero" failed in epee/abstract_http_client.cpp.
GitHub rolls the images out gradually: the run of the release pull request
landed on the previous one (openssl@3 3.6.4) and passed, the next ones did not.
Install openssl@3, export its prefix in OPENSSL_ROOT_DIR and pass it with -D to
the cmake of monero-project and monero-cpp, which overwrite it with
brew --prefix openssl and ignore the environment. The module finds it in the
environment. openssl@4 is also linked into /opt/homebrew, and the
-I/opt/homebrew/include of boost and zeromq comes before the one of openssl@3,
so its headers were still found first in monero-cpp: unlink it, the keg stays
where it is for the formulae that depend on it.

Linux: monero-project builds with -march=native unless ARCH is set, and ccache
does not know the cpu. The Linux build of a pull request hit 207 of 207 objects
from the cache that main saved on another runner, and pytest died with an
illegal instruction (exit 132) as soon as it loaded the module. The same
objects end up in the deb packages and in the macOS Intel wheels, which then
need the instructions of the cpu that built them. Pass ARCH explicitly, as the
Windows job and monero-cpp already do: x86-64 on x86_64, armv8-a on arm64, the
old default elsewhere (armhf). The flags change, so the objects in the existing
caches are not used any more.

Applies to Tests, Build MacOS and docker/build.sh.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@everoddandeven
everoddandeven merged commit ea48edb into libmonero:main Oct 30, 2026
23 checks passed
@everoddandeven
everoddandeven deleted the ci/macos-openssl-3 branch October 30, 2026 04:44
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.

1 participant