Skip to content

feat: rvbuild-withbrew command to build openrv with homebrew packages#1207

Open
mcoliver wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
mcoliver:rvbuild-build-with-homebrew-pakacges
Open

feat: rvbuild-withbrew command to build openrv with homebrew packages#1207
mcoliver wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
mcoliver:rvbuild-build-with-homebrew-pakacges

Conversation

@mcoliver
Copy link
Copy Markdown
Contributor

@mcoliver mcoliver commented Mar 20, 2026

Summarize your change.

This branch introduces a new experimental build command rvbuild-withbrew that allows users on macOS to more quickly install OpenRV with publicly released packages of dependencies. Users get the latest versions, and build conflicts with already present brew packages are avoided.

Additionally this is a first step towards the ability to easily and quickly install with homebrew eg: brew install openrv as homebrew best practice requires formulas to install existing packages rather than build from source.

It is experimental because the OpenRV project is currently beholden to the https://vfxplatform.com/ which stipulates max rather than min versions allowed for a given CY year, and public packages like openexr may exceed that. However this command also presents an opportunity to canary newer versions of dependencies in hopes of highlighting breaking changes to the community.

Describe the reason for the change.

Currently the build process for OpenRV takes quite a while and can cause conflicts with currently installed packages via homebrew. This is because OpenRV is using a hybrid of brew installed packages and bundled dependencies that are version pinned, pulled and built from source. During the build process on macOS, OpenRV will download and build all the dependencies, but subsequently during linking will find the homebrew installed packages and fail to build.

A common issue I have ran into is when having openexr installed and linked, the rvmk command will download and build the openexr version specified for the CY year, however when it comes time to link (eg when building OpenImageIO, it will link back to the homebrew installed version of openexr and imath causing build errors. Temporarily unlinking openexr via brew unlink openexr resolves this, and then after I have to brew link openexr to return my system to the way I want it.

There are ways of disabling the Homebrew path for cmake, however this causes issues with dependencies that are not bundled (eg xz or zlib). We can also be more explicit in each dependency to link only to the paths within the _build folder. There are improvements to be made here.

While building with the latest homebrew packages of various software will break CY Year conformance, the reality is that there are a lot of non-technical people out there who just want to easily build and run RV with the latest dependencies (eg openexr) to take advantage of performance, security, bug and feature improvements. They don't care about legacy CY Year things. This PR allows that to happen.

Describe what you have tested and on which operating system.

macOS 26 on a macbook air m4

source rvcmds.sh
rvclean
rvsetup
time (rvbuild-withbrew)

Builds OpenRV in around 6 minutes on a macbook air m4

✓ Build completed successfully!
( rvbuild-withbrew; )  373.42s user 160.58s system 351% cpu 2:31.95 total

Biggest time sinks are Boost and ImgGui

lines = open("_build/.ninja_log").readlines()[1:]
data = [l.split() for l in lines]
data = [(int(d[1]) - int(d[0]), d[3]) for d in data]
data.sort(reverse=True)
[print(f"{t/1000.0:>8.2f}s | {n}") for t, n in data[:20]]

Add a list of changes, and note any that might need special attention during the review.

This branch introduces a new build command that sets an env var RV_USE_BREW_DEPS. That env var is checked for inside individual package cmake files so the change is isolated and does not affect anything with the current build config.

This PR is dependent on merging of the following PR's:

If possible, provide screenshots.

@mcoliver mcoliver force-pushed the rvbuild-build-with-homebrew-pakacges branch from 5359264 to b4f2c49 Compare March 20, 2026 19:31
This update allows OpenRV to leverage Homebrew-installed dependencies more effectively, reducing build times and avoiding redundant downloads.

Key changes:
- Provided namespaced targets (e.g., TIFF::TIFF) for major dependencies when using Homebrew.
- Added support for skipping internal Python and PySide builds.
- Integrated Homebrew mbedtls for AJA by disabling internal plugin loading.
- Standardized dependency detection using PkgConfig where appropriate.
Signed-off-by: Michael Oliver <mcoliver@gmail.com>
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.

1 participant