Skip to content

fix(build): Pin macOS builds to Homebrew OpenSSL 3 - #19945

Merged
meta-codesync[bot] merged 1 commit into
facebookincubator:mainfrom
galipremsagar:fix-macos-openssl3
Oct 30, 2026
Merged

meta-codesync[bot] merged 1 commit into
facebookincubator:mainfrom
galipremsagar:fix-macos-openssl3

Conversation

@galipremsagar

Copy link
Copy Markdown
Contributor

Homebrew's unversioned openssl formula has pointed at OpenSSL 4 since 2026-09-27 (Homebrew/homebrew-core 9a12b94a88), and that formula is no longer keg-only, so OpenSSL 4 headers and libraries are linked under $(brew --prefix). The macos-15 runner image 20261028.0489.1 ships it, and since it rolled out every macOS Build run fails while installing dependencies, because Folly at FB_OS_VERSION (v2026.09.07.00) reads ASN1_STRING fields directly and assigns X509_get_subject_name() to a non-const pointer, both of which OpenSSL 4 removed:

folly/io/async/ssl/OpenSSLUtils.cpp:126:62: error: member access into incomplete type 'ASN1_OCTET_STRING' (aka 'asn1_string_st')

Moving FB_OS_VERSION forward is not enough on its own: Folly supports OpenSSL 4 from v2026.10.12.00 (wangle from v2026.09.21.00), but the gRPC 1.48.1 that Velox bundles for its tests fails the same way (src/core/tsi/ssl_transport_security.cc; fixed upstream only in gRPC 1.85.0), as the FBOS bump in #19909 shows (run 41084854386).

  • scripts/setup-macos.sh installs openssl@3 and exports OPENSSL_ROOT_DIR for it, so every dependency it builds uses OpenSSL 3. A caller that already set OPENSSL_ROOT_DIR keeps its choice.
  • cmake_install also passes OPENSSL_ROOT_DIR as a cache variable. fbthrift ships its own FindOpenSSL.cmake that ignores the environment and otherwise runs brew --prefix openssl, which now resolves to OpenSSL 4.
  • The macOS and pyvelox workflows carry OPENSSL_ROOT_DIR into their later steps, which run in a new shell.
  • CMakeLists.txt defaults a macOS configure to Homebrew's OpenSSL 3 when no OpenSSL root was chosen (and warns when openssl@3 is missing), so a plain make in a fresh shell keeps matching the dependencies built by the script.
  • On macOS the OpenSSL include directory is added first: Folly::folly_deps exports $(brew --prefix)/include ahead of it, where OpenSSL 4's headers now live, so Velox sources that include <openssl/*.h> would otherwise compile against OpenSSL 4 headers while linking OpenSSL 3.

This can be reverted once the pinned Folly and gRPC releases both build against OpenSSL 4.

Related: #19936 and #19257 pin openssl@3 the same way. This PR additionally covers fbthrift, whose own FindOpenSSL.cmake ignores OPENSSL_ROOT_DIR from the environment (the macOS run of #19936, 41096009930, configures fbthrift against /opt/homebrew/opt/openssl@4 while folly, fizz, wangle and mvfst use openssl@3), and the include order on Velox's own compile lines.

Note: with dependencies building again, the macOS Build step still fails on main with VectorIndexBuildTest.cpp:17:10: fatal error: 'gmock/gmock.h' file not found (from #19886); #19942 fixes that, so the macOS job here can only turn green once it has landed and main is merged into this branch.

Homebrew's unversioned `openssl` formula has pointed at OpenSSL 4 since
2026-09-27, and that formula is no longer keg-only, so OpenSSL 4 headers
and libraries are linked under $(brew --prefix). The macos-15 runner
image 20261028.0489.1 ships it, and since it rolled out every macOS CI
build fails while installing dependencies: Folly at FB_OS_VERSION
(v2026.09.07.00) reads ASN1_STRING fields directly and assigns
X509_get_subject_name() to a non-const pointer, both of which OpenSSL 4
removed:

    folly/io/async/ssl/OpenSSLUtils.cpp:126:62: error: member access
    into incomplete type 'ASN1_OCTET_STRING' (aka 'asn1_string_st')

Moving FB_OS_VERSION forward is not enough on its own: Folly supports
OpenSSL 4 from v2026.10.12.00, but the gRPC 1.48.1 that Velox bundles
for its tests fails the same way (src/core/tsi/ssl_transport_security.cc).

setup-macos.sh now installs openssl@3 and exports OPENSSL_ROOT_DIR for
it, and cmake_install passes it as a cache variable as well, because
fbthrift ships its own FindOpenSSL that ignores the environment and
otherwise asks Homebrew for its default openssl. The macOS and pyvelox
workflows carry OPENSSL_ROOT_DIR into their later steps. CMakeLists.txt
defaults a macOS configure to Homebrew's OpenSSL 3 when no OpenSSL root
was chosen, so a plain `make` in a fresh shell keeps matching the
dependencies, and puts the OpenSSL include directory ahead of
$(brew --prefix)/include, which Folly::folly_deps exports and where
OpenSSL 4's headers now live. Setting OPENSSL_ROOT_DIR yourself still
wins.
@netlify

netlify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit e7a43e0
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/6ae4e1cb6f8e571363cff507

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 30, 2026

@pedroerp pedroerp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Let's wait until the job finishes, then I'll get it merged.

@github-actions

Copy link
Copy Markdown

Selective Build Plan

Linux release with adapters is running a full build (changes touch velox/experimental/ or velox/external/). See the CI workflows README for what this means.


Selective build plan

@meta-codesync

meta-codesync Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

@pedroerp has imported this pull request. If you are a Meta employee, you can view this in D128692789.

@pedroerp pedroerp added the ready-to-merge PR that have been reviewed and are ready for merging. PRs with this tag notify the Velox Meta oncall label Oct 30, 2026
@meta-codesync
meta-codesync Bot merged commit 8a97c9e into facebookincubator:main Oct 30, 2026
73 of 74 checks passed
tinadu1018 added a commit to tinadu1018/velox that referenced this pull request Oct 30, 2026
## Summary
Merge upstream main at 8f6c946 into the
FBOS upgrade branch. Align the signature-comparison baseline with upstream
changes already present in CI's merged checkout.

Keep upstream's OpenSSL 3 selection and targeted VectorIndex GoogleMock
linkage. Remove our superseded OpenSSL selection block, duplicate setup
export, and broad aggregates-test GoogleMock dependency. The remaining
PR diff contains only the dependency upgrade and its FBThrift/xxhash
compatibility fixes.

## Prompting Intent
Fix the reported Fuzzer Jobs failures reasonably without pipeline,
test-selection, coverage, or unnecessary component changes. The engineer
explicitly approved a normal merge of upstream main, without history
rewriting or force-pushing, and requested inspection of macOS 15 Debug.

## Linked Sources
- Upgrade PR: facebookincubator#19909
- Failed Fuzzer Jobs: https://github.com/facebookincubator/velox/actions/runs/41132095439
- Baseline and contender provenance: https://github.com/facebookincubator/velox/actions/runs/41132095439/job/124325288109
- Upstream timezone signature change: facebookincubator#19632
- Upstream collect_set companion: facebookincubator#19894
- Upstream OpenSSL fix: facebookincubator#19945
- Upstream targeted GoogleMock fix: facebookincubator#19942
- Current macOS Debug job: https://github.com/facebookincubator/velox/actions/runs/41132095473/job/124331293031
- Presto mismatch: https://github.com/facebookincubator/velox/actions/runs/41132095439/job/124333376983

## Rationale
CI compared signatures saved for merge base 5df6f9b with a contender
containing upstream commits c853cce and b8e1609. Those upstream commits
intentionally removed at_timezone_convert and added collect_set_merge_extract.
Do not restore removed functions, filter signatures, modify skip lists, or
replace the failing jobs. Updating the branch baseline avoids attributing
inherited upstream changes to this dependency upgrade.

Upstream now supplies the macOS build fixes, so preserve its implementation
instead of keeping duplicate or broader local workarounds. Retain the
version/checksum updates and the proven compiler-export and xxhash-target
compatibility fixes. No independent fix for the saved Presto value/null
mismatch is claimed by this merge.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fdd7945e-1c8f-4e79-ac56-0fbeeedaffbd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. ready-to-merge PR that have been reviewed and are ready for merging. PRs with this tag notify the Velox Meta oncall

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants