CarterLi / iina

The modern video player for macOS with additional features and bug fixes.
https://iina.io
GNU General Public License v3.0
678 stars 29 forks source link

Build fails while building the mpv-iina dependency #63

Closed low-batt closed 2 years ago

low-batt commented 2 years ago

System and IINA version:

Expected behavior: Building using make completes successfully.

Actual behavior: Build fails while building the mpv-iina dependency.

I've not been pushing commits because I've been stuck trying to figure out why make is not working for me. Have you seen this failure before?:

==> Installing mpv-iina --HEAD
==> Patching
==> /opt/homebrew/opt/python@3.9/bin/python3 bootstrap.py
Last 15 lines from /Users/low-batt/Library/Logs/Homebrew/mpv-iina/01.python3:
2022-08-29 22:16:21 +0000

/opt/homebrew/opt/python@3.9/bin/python3
bootstrap.py

Do not report this issue to Homebrew/brew or Homebrew/core!

Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
make: *** [depends] Error 1

The full build output:

Terminal Output: ```bash gag:iina low-batt$ make clean rm -rf archive.xcarchive iina.dmg gag:iina low-batt$ make git submodule update --init --progress cp homebrew-mpv-iina/other/* other/ # Make brew use our IINA FFmpeg and mpv formulas. cp homebrew-mpv-iina/*-iina.rb "/opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula" # Brew will build for the macOS version running on the local machine. brew install --build-from-source ffmpeg-iina Running `brew update --auto-update`... To restore the stashed changes to /opt/homebrew/Library/Taps/homebrew/homebrew-core, run: cd /opt/homebrew/Library/Taps/homebrew/homebrew-core && git stash pop ==> Auto-updated Homebrew! Updated 2 taps (homebrew/core and homebrew/cask). ==> New Formulae burst kalign purescript-language-server rdb shaderc vineyard ghorg linux-headers@5.15 pymol ripsecrets swiftdraw ==> New Casks bookwright cider decentr filen fresh glance-chamburr goxel mints texifier You have 23 outdated formulae installed. You can upgrade them with brew upgrade or list them with brew outdated. Warning: ffmpeg-iina 5.1 is already installed and up-to-date. To reinstall 5.1, run: brew reinstall ffmpeg-iina brew install mpv-iina --HEAD Warning: No available formula with the name "mpv-iina". ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching taps on GitHub... Error: No formulae found in taps. make: *** [depends] Error 1 gag:iina low-batt$ make Error: No available formula with the name "mpv-iina". Error: No available formula with the name "mpv-iina". git submodule update --init --progress cp homebrew-mpv-iina/other/* other/ # Make brew use our IINA FFmpeg and mpv formulas. cp homebrew-mpv-iina/*-iina.rb "/opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula" # Brew will build for the macOS version running on the local machine. brew install --build-from-source ffmpeg-iina Warning: ffmpeg-iina 5.1 is already installed and up-to-date. To reinstall 5.1, run: brew reinstall ffmpeg-iina brew install mpv-iina --HEAD ==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/manifests/3.9.13_4 ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/blobs/sha256:be863850ed496aa19533e3ee42ddffae24025bd5f8b23d9c551095c283956cd0 ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:be863850ed496aa19533e3ee42ddffae24025bd5f8b23d9c551095c283956cd0?se=2022-08-29T22%3A ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/glib/manifests/2.72.3_1-1 ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/glib/blobs/sha256:4b041b944a868e12c7e57ce19f2564bcbf9e8e5932c8aac76798946d8f196757 ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:4b041b944a868e12c7e57ce19f2564bcbf9e8e5932c8aac76798946d8f196757?se=2022-08-29T22%3A ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/libxau/manifests/1.0.10 ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/libxau/blobs/sha256:c01ab4cba7bbcbbe8cc8690781389393a42b5ff7f8a50228f1b89316c4c63f55 ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c01ab4cba7bbcbbe8cc8690781389393a42b5ff7f8a50228f1b89316c4c63f55?se=2022-08-29T22%3A ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/yt-dlp/manifests/2022.8.19 ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/yt-dlp/blobs/sha256:a9587fc1d0271fe254ac3fc56252b414d81b71ec4552f61663f6e0acc8b02a08 ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:a9587fc1d0271fe254ac3fc56252b414d81b71ec4552f61663f6e0acc8b02a08?se=2022-08-29T22%3A ######################################################################## 100.0% ==> Cloning https://github.com/mpv-player/mpv.git Updating /Users/low-batt/Library/Caches/Homebrew/mpv-iina--git From https://github.com/mpv-player/mpv 891c9c869f..0f30b0757f master -> origin/master ==> Checking out branch master Already on 'master' Your branch is behind 'origin/master' by 10 commits, and can be fast-forwarded. (use "git pull" to update your local branch) HEAD is now at 0f30b0757f DOCS/mpv: remove spaces at EOL, ensure 80 cols ==> Installing dependencies for mpv-iina: python@3.9, glib, libxau and yt-dlp ==> Installing mpv-iina dependency: python@3.9 ==> Pouring python@3.9--3.9.13_4.arm64_monterey.bottle.tar.gz ==> /opt/homebrew/Cellar/python@3.9/3.9.13_4/bin/python3.9 -m ensurepip ==> /opt/homebrew/Cellar/python@3.9/3.9.13_4/bin/python3.9 -m pip install -v --no-deps --no-index --upgrade --isolated --target=/opt/homebrew/lib/python3.9/site-packages 🍺 /opt/homebrew/Cellar/python@3.9/3.9.13_4: 3,069 files, 57.4MB ==> Installing mpv-iina dependency: glib ==> Pouring glib--2.72.3_1.arm64_monterey.bottle.1.tar.gz 🍺 /opt/homebrew/Cellar/glib/2.72.3_1: 449 files, 21.5MB ==> Installing mpv-iina dependency: libxau ==> Pouring libxau--1.0.10.arm64_monterey.bottle.tar.gz 🍺 /opt/homebrew/Cellar/libxau/1.0.10: 20 files, 123KB ==> Installing mpv-iina dependency: yt-dlp ==> Pouring yt-dlp--2022.8.19.arm64_monterey.bottle.tar.gz 🍺 /opt/homebrew/Cellar/yt-dlp/2022.8.19: 2,266 files, 25.3MB ==> Installing mpv-iina --HEAD ==> Patching ==> /opt/homebrew/opt/python@3.9/bin/python3 bootstrap.py Last 15 lines from /Users/low-batt/Library/Logs/Homebrew/mpv-iina/01.python3: 2022-08-29 22:16:21 +0000 /opt/homebrew/opt/python@3.9/bin/python3 bootstrap.py Do not report this issue to Homebrew/brew or Homebrew/core! Please create pull requests instead of asking for help on Homebrew's GitHub, Twitter or any other official channels. make: *** [depends] Error 1 gag:iina low-batt$ gag:iina low-batt$ make git submodule update --init --progress cp homebrew-mpv-iina/other/* other/ # Make brew use our IINA FFmpeg and mpv formulas. cp homebrew-mpv-iina/*-iina.rb "/opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula" # Brew will build for the macOS version running on the local machine. brew install --build-from-source ffmpeg-iina Warning: ffmpeg-iina 5.1 is already installed and up-to-date. To reinstall 5.1, run: brew reinstall ffmpeg-iina brew install mpv-iina --HEAD ==> Cloning https://github.com/mpv-player/mpv.git Updating /Users/low-batt/Library/Caches/Homebrew/mpv-iina--git ==> Checking out branch master Already on 'master' Your branch is up to date with 'origin/master'. HEAD is now at 0f30b0757f DOCS/mpv: remove spaces at EOL, ensure 80 cols ==> Patching ==> /opt/homebrew/opt/python@3.9/bin/python3 bootstrap.py Last 15 lines from /Users/low-batt/Library/Logs/Homebrew/mpv-iina/01.python3: 2022-08-29 22:17:27 +0000 /opt/homebrew/opt/python@3.9/bin/python3 bootstrap.py Do not report this issue to Homebrew/brew or Homebrew/core! Please create pull requests instead of asking for help on Homebrew's GitHub, Twitter or any other official channels. make: *** [depends] Error 1 gag:iina low-batt$ ```

Steps to reproduce: For me all I have to do is run make.

How often does this happen? Everytime.

CarterLi commented 2 years ago

If you have built mpv before, the next build fails always. It happened to me also, and if you try again mpv will be built successfully.

Details unknown.

low-batt commented 2 years ago

I've experienced that. This is not that. You reminded me that I'm up to date with all the brew stuff. I'm using brew 3.5.10. Checking brew sources the homebrew file the mpv-iina build is patching, super.rb has been recently modified. Line 62 referenced in the homebrew_arm.patch is now line 64. I suspect that is why the build is failing. The patch file for homebrew is incompatible with the latest version of brew.

CarterLi commented 2 years ago

I don't think iina-plus use that patch

https://github.com/iina-plus/homebrew-mpv-iina

low-batt commented 2 years ago

That would explain why I could not find the patch file, but where is the patch the build is trying to apply?

CarterLi commented 2 years ago

I don't use other patches.

IINA-plus on x64 builds directly on macOS 10.15, thus requires no additional patches.

Also note: https://github.blog/changelog/2022-07-20-github-actions-the-macos-10-15-actions-runner-image-is-being-deprecated-and-will-be-removed-by-8-30-22/ IINA-plus may require macOS 11 soon

low-batt commented 2 years ago

The failure appears to be due to mpv-iina.rb establishing a dependency upon python@3.9 here and brew ignoring that and deciding that the dependency is on version 3.10:

==> Installing dependencies for mpv-iina: python@3.10
==> Installing mpv-iina dependency: python@3.10
==> Pouring python@3.10--3.10.6_1.arm64_monterey.bottle.tar.gz

That breaks the rest of the formula that expects 3.9.

I spent a lot of time fighting with brew trying to get it to stay with 3.9. I did not find a way to get brew to not upgrade python to 3.10. Possibly this is due to brew's special handling of python discussed in Homebrew-and-Python. Could be brew recently decided to switch from 3.9 to 3.10?

I ended up changing mpv-iina.rb to use 3.10. With that change make completed successfully.

low-batt commented 2 years ago

Bummer about GitHub and 10.15. I keep my development MacBook up to date, but my older personal MacBook is still using Catalina. Big Sur broke some of the stuff I use. Monterey is better but broke other stuff. Sure glad Apple has fixed powerd in the Ventura Beta. I was beginning to worry that Ventura might go out the door with that regression unfixed.

low-batt commented 2 years ago

I have confirmed the recent changes to upgrade the dependencies have fixed this issue.