Skip to content

Commit a8a13b5

Browse files
DX-120970 Fix macOS build: pin cmake/boost before brew bundle
Move cmake and boost local-tap setup before the first `brew bundle` call. Newer Homebrew on macos-15-intel treats `cmake` as a cask during `brew bundle`, causing the build to fail. Pre-installing from the pinned local formula ensures brew bundle skips it cleanly.
1 parent 780dc22 commit a8a13b5

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

dev/tasks/java-jars/github.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,20 @@ jobs:
131131
done
132132
brew install --overwrite python
133133
134+
# Pin cmake and boost to specific versions before brew bundle to avoid
135+
# Homebrew treating cmake as a cask on newer runner images.
136+
brew uninstall -f boost || true
137+
brew uninstall -f cmake || true
138+
mkdir -p homebrew-custom/Formula
139+
curl -o homebrew-custom/Formula/cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/f68532bfe5cb87474093df8a839c3818c6aa44dd/Formula/c/cmake.rb
140+
curl -o homebrew-custom/Formula/boost.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/23f9c56c5075dd56b4471e2c93f89f6400b49ddd/Formula/b/boost.rb
141+
brew tap-new local/homebrew-custom
142+
cp ./homebrew-custom/Formula/*.rb "$(brew --repo local/homebrew-custom)/Formula/"
143+
brew install -v local/homebrew-custom/cmake
144+
brew install -v local/homebrew-custom/boost
145+
brew pin cmake
146+
brew pin boost
147+
134148
brew bundle --file=arrow/cpp/Brewfile
135149
# We want to link aws-sdk-cpp statically but Homebrew's
136150
# aws-sdk-cpp provides only shared library. If we have
@@ -148,20 +162,6 @@ jobs:
148162
# used on test We uninstall Homebrew's Protobuf to ensure using
149163
# bundled Protobuf.
150164
brew uninstall protobuf
151-
# fix cmake and boost versionsAdd commentMore actions
152-
brew uninstall -f boost || true
153-
brew uninstall -f cmake || true
154-
mkdir -p homebrew-custom/Formula
155-
curl -o homebrew-custom/Formula/cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/f68532bfe5cb87474093df8a839c3818c6aa44dd/Formula/c/cmake.rb
156-
curl -o homebrew-custom/Formula/boost.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/23f9c56c5075dd56b4471e2c93f89f6400b49ddd/Formula/b/boost.rb
157-
brew tap-new local/homebrew-custom
158-
cp ./homebrew-custom/Formula/*.rb "$(brew --repo local/homebrew-custom)/Formula/"
159-
brew install -v local/homebrew-custom/cmake
160-
brew install -v local/homebrew-custom/boost
161-
brew pin cmake
162-
brew pin boost
163-
#
164-
165165
166166
brew bundle --file=arrow/java/Brewfile
167167
- name: Build C++ libraries

0 commit comments

Comments
 (0)