Skip to content

Conversation

@n-poulsen
Copy link
Contributor

@n-poulsen n-poulsen commented Apr 15, 2024

Fixes the installation of FFmpeg in the MacOS runner. The installation on was failing because the Homebrew installation did not complete successfully because of the following error:

==> Installing libass dependency: [email protected]
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.12/manifests/3.12.3
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/5065c4d76c933aad4e13bd77c1bf37f0afe78f4608261edd170e331cb36c8a0d--python@3.12-3.12.3.bottle_manifest.json
==> Pouring [email protected]
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
  rm '/usr/local/bin/2to3'

To force the link and overwrite all conflicting files:
  brew link --overwrite [email protected]

To list all files that would be deleted:
  brew link --overwrite [email protected] --dry-run

Possible conflicting files are:
/usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/2to3
/usr/local/bin/2to3-3.12 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/2to3-3.12
/usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/idle3
/usr/local/bin/idle3.12 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/idle3.12
/usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/pydoc3
/usr/local/bin/pydoc3.12 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/pydoc3.12
/usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
/usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.12/bin/python3-config
/usr/local/bin/python3.12 -> /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
/usr/local/bin/python3.12-config -> /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12-config

Basically, one of the dependencies for FFmpeg is libass, which requires [email protected]. But due to the existing installation of python on the runner, it fails to create one of the symlinks. I believe this error can be ignored, as described here. It also says that we could then run brew link --overwrite [email protected], but this does not seem to be necessary to run the tests. I also would not want the default python version to be updated to 3.12 (instead of 3.9 or 3.10), so I think we can ignore that step.

So just updating the CI to ignore Homebrew's return code is enough to fix the issue. One issue with this fix is that in the future, if something else with homebrew fails, it might break something further down in the CI/CD pipeline. I still think this is the best way to go.

@n-poulsen n-poulsen changed the title [WIP] MacOS CI Fix - FFMpeg Installation MacOS CI Fix - FFMpeg Installation Apr 15, 2024
Copy link
Contributor

@jeylau jeylau left a comment

Choose a reason for hiding this comment

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

Good catch! And concise, elegant fix! 😊

@MMathisLab MMathisLab merged commit b8a53c3 into main Apr 16, 2024
@MMathisLab MMathisLab deleted the niels/ci_fix_ffmpeg_installation branch June 5, 2024 09:25
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.

4 participants