Skip to content

brew CI: install non-rotary build deps#1452

Merged
scpeters merged 1 commit intomasterfrom
scpeters/brew_build_bottle
Mar 3, 2026
Merged

brew CI: install non-rotary build deps#1452
scpeters merged 1 commit intomasterfrom
scpeters/brew_build_bottle

Conversation

@scpeters
Copy link
Contributor

@scpeters scpeters commented Mar 2, 2026

Follow-up to #1451 to fix the failure in gazebosim/gz-utils#203.

The brew install $(brew deps --1 --include-build ${PROJECT_FORMULA}) line is an attempt to install the build dependencies of a formula. I had previously not included --HEAD in this command since it would try to install the HEAD version of build tools (which we don't want), but now it's failing if the package has rotary dependencies. For now, I think the simplest thing is to filter out the gz-rotary-* dependencies.

Testing

Testing in gazebosim/gz-utils#203

Build Status https://build.osrfoundation.org/job/gz_utils-ci-pr_any-homebrew-arm64/22/

Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
@scpeters scpeters force-pushed the scpeters/brew_build_bottle branch from 4a08fbb to 3542f94 Compare March 2, 2026 23:52
@scpeters scpeters changed the title brew CI: install build deps with --build-bottle brew CI: install non-rotary build deps Mar 2, 2026
@scpeters scpeters marked this pull request as ready for review March 2, 2026 23:56
@scpeters scpeters requested a review from j-rivero as a code owner March 2, 2026 23:56
@scpeters scpeters requested a review from azeey March 2, 2026 23:57
brew install ${PROJECT_FORMULA} ${PROJECT_ARGS} --only-dependencies ${HEAD_FLAG}
# the following is needed to install :build dependencies of a formula
brew install $(brew deps --1 --include-build ${PROJECT_FORMULA})
# filter out the rotary dependencies since they require --HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

I was going to ask about this but I saw that you had reverted a commit adding - -HEAD. With this change you're r filtering out rotary packages? Do they not need to be installed?

Copy link
Contributor Author

@scpeters scpeters Mar 3, 2026

Choose a reason for hiding this comment

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

the issue is that brew install --only-dependencies doesn't install :build dependencies like pybind11. My initial fix for this in #630 was to run brew install a second time and explicitly pass it all dependencies (including build dependencies).

The initial form of this PR in 4a08fbb removed the second brew install invocation and added --build-bottle to the brew install --only-dependencies call. I think this would work if we didn't have formulae using --HEAD, but it failed when I tested it:

https://build.osrfoundation.org/job/gz_utils-ci-pr_any-homebrew-arm64/21/console

15:41:28 + brew install gz-utils5 --only-dependencies --build-bottle --HEAD
...
15:41:30 ==> Installing gz-rotary-utils from osrf/simulation
15:41:30 Error: The following formula cannot be installed from bottle and must be
15:41:30 built from source.
15:41:30   gz-rotary-cmake

So that would have been a more elegant approach, but it explicitly doesn't work with --HEAD formulae. So my hacky alternative is to just exclude gz-rotary-* formulae from the second brew install call so that we don't have to pass --HEAD to that call

Let me know if I should include any of this in the script comments, since I apparently didn't explain it enough there

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay. The part I was missing was that brew deps --1 include-build will include all dependencies including :build, not just the :build dependencies.

@scpeters scpeters merged commit e506c15 into master Mar 3, 2026
3 checks passed
@scpeters scpeters deleted the scpeters/brew_build_bottle branch March 3, 2026 07:08
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.

2 participants