Skip to content

Commit 422ac7e

Browse files
DX-120970 Fix macOS: restore original cmake order, document Homebrew regression
Newer Homebrew (runner image >=20260525) added a cmake cask with the same name as the formula and resolves brew "cmake" to the cask instead of the formula during brew bundle. Use HOMEBREW_BUNDLE_BREW_SKIP to skip cmake and boost in brew bundle; they continue to be installed with pinned versions via the local formula tap in the original position below.
1 parent b128c39 commit 422ac7e

1 file changed

Lines changed: 16 additions & 14 deletions

File tree

dev/tasks/java-jars/github.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,10 @@ jobs:
125125
# llvm@14 because llvm is newer than llvm@14.
126126
brew uninstall llvm || :
127127
128-
# Pin cmake and boost to specific versions before brew bundle to avoid
129-
# Homebrew treating cmake as a cask on newer runner images.
130-
brew uninstall -f boost || true
131-
brew uninstall -f cmake || true
132-
mkdir -p homebrew-custom/Formula
133-
curl -o homebrew-custom/Formula/cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/f68532bfe5cb87474093df8a839c3818c6aa44dd/Formula/c/cmake.rb
134-
curl -o homebrew-custom/Formula/boost.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/23f9c56c5075dd56b4471e2c93f89f6400b49ddd/Formula/b/boost.rb
135-
brew tap-new local/homebrew-custom
136-
cp ./homebrew-custom/Formula/*.rb "$(brew --repo local/homebrew-custom)/Formula/"
137-
brew install -v local/homebrew-custom/cmake
138-
brew install -v local/homebrew-custom/boost
139-
brew pin cmake
140-
brew pin boost
141-
128+
# cmake and boost are skipped here because newer Homebrew (runner image >=20260525)
129+
# added a cmake cask with the same name as the formula and now resolves
130+
# `brew "cmake"` to the cask instead of the formula. They are installed below
131+
# with pinned versions via a local formula tap.
142132
HOMEBREW_BUNDLE_BREW_SKIP="cmake boost" brew bundle --file=arrow/cpp/Brewfile
143133
# We want to link aws-sdk-cpp statically but Homebrew's
144134
# aws-sdk-cpp provides only shared library. If we have
@@ -157,6 +147,18 @@ jobs:
157147
# used on test We uninstall Homebrew's Protobuf to ensure using
158148
# bundled Protobuf.
159149
brew uninstall protobuf
150+
# fix cmake and boost versions
151+
brew uninstall -f boost || true
152+
brew uninstall -f cmake || true
153+
mkdir -p homebrew-custom/Formula
154+
curl -o homebrew-custom/Formula/cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/f68532bfe5cb87474093df8a839c3818c6aa44dd/Formula/c/cmake.rb
155+
curl -o homebrew-custom/Formula/boost.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/23f9c56c5075dd56b4471e2c93f89f6400b49ddd/Formula/b/boost.rb
156+
brew tap-new local/homebrew-custom
157+
cp ./homebrew-custom/Formula/*.rb "$(brew --repo local/homebrew-custom)/Formula/"
158+
brew install -v local/homebrew-custom/cmake
159+
brew install -v local/homebrew-custom/boost
160+
brew pin cmake
161+
brew pin boost
160162
161163
brew bundle --file=arrow/java/Brewfile
162164
- name: Build C++ libraries

0 commit comments

Comments
 (0)