fix(macos): Install gflags and glog from source instead of Homebrew#16165
Closed
yaooqinn wants to merge 1 commit intofacebookincubator:mainfrom
Closed
fix(macos): Install gflags and glog from source instead of Homebrew#16165yaooqinn wants to merge 1 commit intofacebookincubator:mainfrom
yaooqinn wants to merge 1 commit intofacebookincubator:mainfrom
Conversation
Homebrew's glog 0.7.x has breaking API changes that are incompatible with folly - the GLOG_EXPORT macro requires CMake target linking which breaks direct header includes. This change: - Removes gflags and glog from MACOS_VELOX_DEPS (Homebrew packages) - Adds install_gflags function for macOS - Installs both gflags (v2.2.2) and glog (v0.6.0) from source using the pinned versions from setup-versions.sh - Updates the CI workflow to call install_gflags and install_glog Fixes facebookincubator#16135
✅ Deploy Preview for meta-velox canceled.
|
juwentus1234
approved these changes
Jan 29, 2026
kgpai
approved these changes
Jan 29, 2026
|
@kagamiori has imported this pull request. If you are a Meta employee, you can view this in D91798238. |
czentgr
reviewed
Jan 29, 2026
|
|
||
| function install_gflags { | ||
| wget_and_untar https://github.com/gflags/gflags/archive/"${GFLAGS_VERSION}".tar.gz gflags | ||
| cmake_install_dir gflags -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON |
Collaborator
There was a problem hiding this comment.
Suggest also setting BUILD_TESTING=OFF
Collaborator
|
Thanks for the quick fix. This explains the CI failures for macOS as well. |
|
@kagamiori merged this pull request in 1979ab8. |
This was referenced Jan 29, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR fixes the macOS build failure caused by Homebrew's glog 0.7.x breaking API changes.
Problem
Homebrew recently upgraded glog to version 0.7.1 which has breaking API changes - the
GLOG_EXPORTmacro requires CMake target linking which breaks direct header includes. This causes folly compilation to fail with the error:The root cause is that Velox pins glog to
v0.6.0insetup-versions.sh, but the macOS setup script uses Homebrew which installs the latest incompatible version.Solution
This change:
gflagsandglogfromMACOS_VELOX_DEPS(Homebrew packages)install_gflagsfunction for macOS (similar to other setup scripts)setup-versions.shinstall_gflagsandinstall_glogThis approach is consistent with how other Linux setup scripts handle these dependencies.
Testing
This fix has been validated based on feedback from issue #16135 where contributors confirmed that:
Fixes #16135