gobject-introspection building in Homebrew for ffmpeg 5.0

I haven’t been able to get ffmpeg (or a few other things) to build in Homebrew for a while, it’s been rather frustrating - especially when it fails with a message saying “do not contact Homebrew about this” … you packaged it! How else could I fix it?

Turns out, there’s a brew doctor command that can help sort things out.

➜ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  unpaper
  ipython
  pango
  harfbuzz
  sdl2_ttf
  libraqm
  gobject-introspection
  pillow
  librsvg
  graphviz
  handbrake
  ocrmypdf
  libass

Copied the list of kegs above and ran this to force the update:

pbpaste | xargs -n1 brew link

Also, in my ~/.zshrc file I was referring to /opt/Homebrew because that’s how it’d been set up when the M1-supported releases happened originally.

vi ~/.zshrc

%s/Homebrew/homebrew/g

:wq

Then I restarted shell and tried building again.

❯ brew install ffmpeg
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 4 taps (homebrew/cask-versions, homebrew/core, homebrew/cask and homebrew/cask-drivers).
==> Updated Formulae
Updated 15 formulae.
==> New Casks
quit-all
==> Updated Casks
Updated 64 casks.

ffmpeg 4.4_2 is already installed but outdated (so it will be upgraded).
==> Downloading https://ghcr.io/v2/homebrew/core/gobject-introspection/manifests/1.70.0_3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gobject-introspection/blobs/sha256:379087244dbb609dbee15ddc275aa9535eb2
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:379087244dbb609dbee15ddc275aa9535eb
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/manifests/3.3.2
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/a3a1c1c93f743d614b2c361a9cb287d17169c9c95f7f6130059b1d69ef82caec--harfbuzz-3.3.2.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/blobs/sha256:78f9bed30a6a617cc5abb97ff6b0750244f9960d90788be42
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/67ef153b29178f20059cf3bc8874787ee264fd6e49cb97f10bea411b9e51a380--harfbuzz--3.3.2.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/libass/manifests/0.15.2
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/e2f5fe958610fb9bb1c3482a92b51639fd03f845eb295914b9c495e3d02cd467--libass-0.15.2.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/libass/blobs/sha256:960fdb749807d168b8cb1a5078d3ed6c94c12b1a8fea10b69c0
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/91f8924c832d02bfcf8b98903257a8c91438c01b035e62ac6e31bb8aa289281c--libass--0.15.2.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/cmocka/manifests/1.1.5
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/169ccbfb4e85b9a8d9bfa169bfe23a2583438beac65ad9634c6b6baabef84c1d--cmocka-1.1.5.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/cmocka/blobs/sha256:a504b57668ab63e04fd3ca656d6a0a48a215779b9779dad64e6
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/49b83f197dc5c472ad7d8853bde52b32ec0a06366fd69068c74b4343efaa3a1a--cmocka--1.1.5.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/mbedtls/manifests/3.1.0
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/db78bd99e969ca7a86d34a8f23b279e3772cad7b0359ef031e58d596c9d147b7--mbedtls-3.1.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/mbedtls/blobs/sha256:61f953e197aae82f30b1126b09282e05603cac9e3510ee16c8
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/2092a06c2a680fb05d6b728e26167a8684e538d399bba50cf4cc11f189809703--mbedtls--3.1.0.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/librist/manifests/0.2.6_1
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/952c4daec28d32009e4fb8ce7bf5102eb2d0bb3f514ccc47b2c75afc3585e91c--librist-0.2.6_1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/librist/blobs/sha256:4d72554a101bdc2828090eb8403226f041226b2a19e73ac22f
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/56e184e3425b9dd7ae0549a0614f3055a6fca842d93a28ecf100eb9101e550de--librist--0.2.6_1.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/ffmpeg/manifests/5.0-1
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/23c9bcc03b281fcb3d6090ba35326a5a466b8c8e4eb5f2cf6adabb627cd43062--ffmpeg-5.0-1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/ffmpeg/blobs/sha256:ce63680952edd4c82bc73a00143ad5f87a2cc1f7c8e57078457
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/c9446be2f5fb7e235502920abcc8bd15c68a7b953159aecec9a4694c815bbfa6--ffmpeg--5.0.arm64_monterey.bottle.1.tar.gz
==> Upgrading ffmpeg
  4.4_2 -> 5.0

==> Installing dependencies for ffmpeg: gobject-introspection, harfbuzz, libass, cmocka, mbedtls and librist
==> Installing ffmpeg dependency: gobject-introspection
==> Pouring gobject-introspection--1.70.0_3.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/gobject-introspection/1.70.0_3: 191 files, 13MB
==> Installing ffmpeg dependency: harfbuzz
==> Pouring harfbuzz--3.3.2.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/harfbuzz/3.3.2: 68 files, 7.2MB
==> Installing ffmpeg dependency: libass
==> Pouring libass--0.15.2.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libass/0.15.2: 11 files, 502.5KB
==> Installing ffmpeg dependency: cmocka
==> Pouring cmocka--1.1.5.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/cmocka/1.1.5: 17 files, 238.1KB
==> Installing ffmpeg dependency: mbedtls
==> Pouring mbedtls--3.1.0.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/mbedtls/3.1.0: 152 files, 10.5MB
==> Installing ffmpeg dependency: librist
==> Pouring librist--0.2.6_1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/librist/0.2.6_1: 20 files, 795.8KB
==> Installing ffmpeg
==> Pouring ffmpeg--5.0.arm64_monterey.bottle.1.tar.gz
🍺  /opt/homebrew/Cellar/ffmpeg/5.0: 272 files, 48.4MB
==> Running `brew cleanup ffmpeg`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /opt/homebrew/Cellar/ffmpeg/4.4_2... (276 files, 48.9MB)
==> Upgrading 7 dependents:
Disable this behaviour by setting HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
graphviz 2.49.0 -> 2.50.0, libraqm 0.7.1 -> 0.9.0, librsvg 2.50.7 -> 2.52.5, ocrmypdf 12.4.0 -> 13.3.0, pango 1.48.9 -> 1.50.4, pillow 8.3.2 -> 9.0.1, unpaper 6.1_7 -> 6.1_8
==> Downloading https://ghcr.io/v2/homebrew/core/pango/manifests/1.50.4
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/39e0c2d51cb8a9e29dfda476e7f4af09b7fda6daf06ef76244f796f90342aab3--pango-1.50.4.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/pango/blobs/sha256:df36e5f3b64895adf6a5a5de39ef71b01c99c6bda6a8ac45e6a5
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/a2d616c535b9d35d3a84fb5b7ae69e4a4c365d24c6907a7d6174c42758125851--pango--1.50.4.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/manifests/2.52.5
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/blobs/sha256:83e2f0abdc61c62986ce60cb243c9996ddc14321fab83b64af
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:83e2f0abdc61c62986ce60cb243c9996ddc
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/graphviz/manifests/2.50.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:63196085bc578e617fe22196d25dd88b8b261ceaf72243ed8
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:63196085bc578e617fe22196d25dd88b8b2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libraqm/manifests/0.9.0
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/71570c7b653b339b29cb9b96daa5e24fe43f5c7252eddbaff4451fefac2b05df--libraqm-0.9.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/libraqm/blobs/sha256:069e6e0f6bab066c06811c7abd7578404b9eb9ee6833629a2b
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/74ccf6c43e7e0b1906f78b7200fba2d5dfa677e3b4b3d15c7d2684dae91b0609--libraqm--0.9.0.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/pillow/manifests/9.0.1
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/0fa897bd24df4a54ab9414c569bf959fbf700d003a188800c13c7138aa97e840--pillow-9.0.1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/pillow/blobs/sha256:3258034d4ca51ba3539193eac70f6792d37b40769d8a16410df
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/518c79b1c72c0bebee5e1355a6f34c251de69b7bf01a412198bd293ed1d72267--pillow--9.0.1.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/ffmpeg/4/manifests/4.4.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ffmpeg/4/blobs/sha256:e5bb29c1f83c1c48bc0b3adcb05b5bc9ac04f5d99d5d1e1f8
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:e5bb29c1f83c1c48bc0b3adcb05b5bc9ac0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/unpaper/manifests/6.1_8
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/331199da336a957540178f11ad5e4323d19421c582613ff911b7710b0b7239a3--unpaper-6.1_8.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/unpaper/blobs/sha256:15a1aa7548aed02a7f8c82e541386b9122b2d74e628f0e123c
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/b1b23dbde64d11da710a8362c91294b39f037ecfba334163fb88e0d9ec47a3cf--unpaper--6.1_8.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/ocrmypdf/manifests/13.3.0
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/2cc29f5d04ea04b08e38d81e6a1e41ed87e452a04016c8be9cb7e74112085cd0--ocrmypdf-13.3.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/ocrmypdf/blobs/sha256:49683ec3c25f8c0b7c2aa12a3ad95238be24e48dd2450a65e
Already downloaded: /Users/yaleman/Library/Caches/Homebrew/downloads/a35ca359240658c1b5eccb44fd784b46c1f55267a8a9d788db977b6d747156a8--ocrmypdf--13.3.0.arm64_monterey.bottle.tar.gz
==> Upgrading pango
  1.48.9 -> 1.50.4

==> Pouring pango--1.50.4.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/pango/1.50.4: 68 files, 3.5MB
==> Running `brew cleanup pango`...
Removing: /opt/homebrew/Cellar/pango/1.48.9... (65 files, 3.1MB)
==> Upgrading librsvg
  2.50.7 -> 2.52.5

==> Pouring librsvg--2.52.5.arm64_monterey.bottle.tar.gz
==> /opt/homebrew/opt/gdk-pixbuf/bin/gdk-pixbuf-query-loaders --update-cache
🍺  /opt/homebrew/Cellar/librsvg/2.52.5: 53 files, 55.4MB
==> Running `brew cleanup librsvg`...
Removing: /opt/homebrew/Cellar/librsvg/2.50.7... (48 files, 140.6MB)
==> Upgrading graphviz
  2.49.0 -> 2.50.0

==> Pouring graphviz--2.50.0.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/graphviz/2.50.0: 292 files, 7.4MB
==> Running `brew cleanup graphviz`...
Removing: /opt/homebrew/Cellar/graphviz/2.49.0... (301 files, 8.3MB)
==> Upgrading libraqm
  0.7.1 -> 0.9.0

==> Pouring libraqm--0.9.0.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libraqm/0.9.0: 11 files, 89.8KB
==> Running `brew cleanup libraqm`...
Removing: /opt/homebrew/Cellar/libraqm/0.7.1... (26 files, 203.9KB)
==> Upgrading pillow
  8.3.2 -> 9.0.1

==> Pouring pillow--9.0.1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/pillow/9.0.1: 317 files, 5.7MB
==> Running `brew cleanup pillow`...
Removing: /opt/homebrew/Cellar/pillow/8.3.2... (232 files, 4.1MB)
==> Upgrading unpaper
  6.1_7 -> 6.1_8

==> Installing dependencies for unpaper: ffmpeg@4
==> Installing unpaper dependency: ffmpeg@4
==> Pouring ffmpeg@4--4.4.1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/ffmpeg@4/4.4.1: 276 files, 47.9MB
==> Installing unpaper
==> Pouring unpaper--6.1_8.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/unpaper/6.1_8: 38 files, 535.0KB
==> Running `brew cleanup unpaper`...
Removing: /opt/homebrew/Cellar/unpaper/6.1_7... (38 files, 533.9KB)
==> Upgrading ocrmypdf
  12.4.0 -> 13.3.0

==> Pouring ocrmypdf--13.3.0.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/ocrmypdf/13.3.0: 1,484 files, 32.6MB
==> Running `brew cleanup ocrmypdf`...
Removing: /opt/homebrew/Cellar/ocrmypdf/12.4.0... (1,657 files, 32MB)
==> Checking for dependents of upgraded formulae...
==> No broken dependents found!

➜ ffmpeg -version
ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 13.0.0 (clang-1300.0.29.30)

Woot!

I was able to go back to this post on gnome gitlab and report some success. Hopefully it’ll help some folks.



#homebrew #macOS #fixes #ffmpeg