Closed lamyergeier closed 1 month ago
Please add the Wayland dependency as currently no video is displayed when playing on Fedora 40.
Can you open a PR to update the formula?
@carlocab I am unfamiliar with mpv, I just quoted from the developers of mpv in the above report. Also I am not much familiar with the homebrew and ruby. I was hoping that the person who created the mpv formula could update it.
I am also not sure if just adding that dependency would solve the problem.
Also i saw that Wayland package is already installed with homebrew on Linux (not by mpv formula but by some other formula).
I was hoping that the person who created the mpv formula could update it.
The formula was added almost 10 years ago in 2d564147041f0070ec7b678c5aed96130dc0493c, and the author has not contributed to Homebrew/core since then.
Formulae in homebrew/core are maintained by the community, so there isn't really anyone better to try to fix this problem than you! I am happy to try to help you with this, though.
I am also not sure if just adding that dependency would solve the problem.
Also i saw that Wayland package is already installed with homebrew on Linux (not by mpv formula but by some other formula).
Yes, you are correct. mpv
does depend transitively on wayland
, so adding the dependency is unlikely to be sufficient.
However, can you try to apply this patch and rebuild mpv
?
diff --git a/Formula/m/mpv.rb b/Formula/m/mpv.rb
index ec274dcc262..f6a8c2af7dd 100644
--- a/Formula/m/mpv.rb
+++ b/Formula/m/mpv.rb
@@ -34,6 +34,9 @@ class Mpv < Formula
on_linux do
depends_on "alsa-lib"
+ depends_on "wayland"
+ depends_on "wayland-protocols"
+ depends_on "libxkbcommon"
end
def install
To do this, copy the patch above into, say, mpv.patch
, and then do:
export HOMEBREW_NO_INSTALL_FROM_API=1
brew update
cd "$(brew --repo homebrew/core)"
patch -p1 </path/to/mpv.patch
brew reinstall -sv mpv
Hopefully this should fix your issue. You can unset HOMEBREW_NO_INSTALL_FROM_API
after doing this.
Let me know if it helps so we can fix the formula. I don't have a Linux machine to test this, so I am unable to try it myself.
@carlocab getting following Log, which states that A full log can be found at /tmp/mpv-20240428-705281-r9t4ca/mpv-0.38.0/build/meson-logs/meson-log.txt
but it does not exists!
$ file /tmp/mpv-20240428-705281-r9t4ca
/tmp/mpv-20240428-705281-r9t4ca: cannot open `/tmp/mpv-20240428-705281-r9t4ca' (No such file or directory)
$ brew reinstall -sv mpv
Warning: building from source is not supported!
You're on your own. Failures are expected so don't create any issues, please!
==> Fetching mpv
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/e55fd45d9a15dca624f78eb71ed0eac8fc0241ed/Formula/m/mpv.rb
######################################################################################################################################################### 100.0%
==> Downloading https://github.com/mpv-player/mpv/archive/refs/tags/v0.38.0.tar.gz
Already downloaded: /home/lamy/.cache/Homebrew/downloads/62b9a9757b39204c5943355cf991af8a38542d352b37ed45c8758c2e468167c9--mpv-0.38.0.tar.gz
==> Reinstalling mpv
/usr/bin/env tar --extract --no-same-owner --file /home/lamy/.cache/Homebrew/downloads/62b9a9757b39204c5943355cf991af8a38542d352b37ed45c8758c2e468167c9--mpv-0.38.0.tar.gz --directory /tmp/homebrew-unpack20240428-705281-lsv8mi
/usr/bin/env cp -pR /tmp/homebrew-unpack20240428-705281-lsv8mi/mpv-0.38.0/. /tmp/mpv-20240428-705281-r9t4ca/mpv-0.38.0
==> meson setup build -Dhtml-build=enabled -Djavascript=enabled -Dlibmpv=true -Dlua=luajit -Dlibarchive=enabled -Duchardet=enabled --sysconfdir=/home/linuxbrew/.linuxbrew/etc/mpv --datadir=/home/linuxbrew/.linuxbrew/Cellar/mpv/0.38.0/share/mpv --mandir=/home/linuxbrew/.linuxbrew/Cellar/mpv/0.38.0/share/man --prefix=/home/linuxbrew/.linuxbrew/Cellar/mpv/0.38.0 --libdir=/home/linuxbrew/.linuxbrew/Cellar/mpv/0.38.0/lib --buildtype=release --wrap-mode=nofallback
The Meson build system
Version: 1.4.0
Source dir: /tmp/mpv-20240428-705281-r9t4ca/mpv-0.38.0
Build dir: /tmp/mpv-20240428-705281-r9t4ca/mpv-0.38.0/build
Build type: native build
Project name: mpv
Project version: 0.38.0
meson.build:1:0: ERROR: Compiler gcc-11 cannot compile programs.
A full log can be found at /tmp/mpv-20240428-705281-r9t4ca/mpv-0.38.0/build/meson-logs/meson-log.txt
READ THIS: https://docs.brew.sh/Troubleshooting
/mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github/api.rb:368:in `raise_error': GitHub API Error: Bad credentials (GitHub::API::AuthenticationFailedError)
HOMEBREW_GITHUB_API_TOKEN may be invalid or expired; check:
\e[4mhttps://github.com/settings/tokens\e[24m
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github/api.rb:276:in `open_rest'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:178:in `search'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:182:in `search_results_items'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:36:in `search_issues'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:62:in `issues_for_formula'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/exceptions.rb:492:in `fetch_issues'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/call_validation.rb:270:in `bind_call'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/call_validation.rb:270:in `validate_call'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/exceptions.rb:487:in `issues'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/call_validation.rb:270:in `bind_call'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/call_validation.rb:270:in `validate_call'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/exceptions.rb:543:in `dump'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/call_validation.rb:270:in `bind_call'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/call_validation.rb:270:in `validate_call'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:152:in `rescue in <main>'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:140:in `<main>'
/mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2876:in `block in system': Failed executing: meson setup build -Dhtml-build=enabled -Djavascript=enabled -Dlibmpv=true -Dlua=luajit -Dlibarchive=enabled -Duchardet=enabled --sysconfdir=/home/linuxbrew/.linuxbrew/etc/mpv --datadir=/home/linuxbrew/.linuxbrew/Cellar/mpv/0.38.0/share/mpv --mandir=/home/linuxbrew/.linuxbrew/Cellar/mpv/0.38.0/share/man --prefix=/home/linuxbrew/.linuxbrew/Cellar/mpv/0.38.0 --libdir=/home/linuxbrew/.linuxbrew/Cellar/mpv/0.38.0/lib --buildtype=release --wrap-mode=nofallback (BuildError)
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2812:in `open'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2812:in `system'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/call_validation.rb:270:in `bind_call'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/call_validation.rb:270:in `validate_call'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/sorbet-runtime-0.5.11358/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
from /home/lamy/.cache/Homebrew/api-source/Homebrew/homebrew-core/e55fd45d9a15dca624f78eb71ed0eac8fc0241ed/Formula/mpv.rb:63:in `install'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/build.rb:177:in `block (3 levels) in install'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:514:in `with_env'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/build.rb:137:in `block (2 levels) in install'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1505:in `block in brew'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:3044:in `block (2 levels) in stage'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:514:in `with_env'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:3043:in `block in stage'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/resource.rb:127:in `block (2 levels) in unpack'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/download_strategy.rb:121:in `chdir'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/download_strategy.rb:121:in `chdir'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/download_strategy.rb:108:in `stage'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/resource.rb:123:in `block in unpack'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:76:in `block in run'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:76:in `chdir'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:76:in `run'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/resource.rb:224:in `stage_resource'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/resource.rb:122:in `unpack'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/resource.rb:96:in `stage'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/forwardable.rb:238:in `stage'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:3021:in `stage'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1498:in `brew'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/build.rb:131:in `block in install'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:514:in `with_env'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/build.rb:123:in `install'
from /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/build.rb:229:in `<main>'
Try looking for the log somewhere inside $(brew --cache)
, probably $(brew --cache)/Logs/mpv
(or similar).
The whole mpv
directory should contain logs that are useful.
Logs: https://0x0.st/XHgn.zip
I want How I can do
I want How I can do
How
Hi / These my profile for security
I would guess minimum would be missing mesa
(OpenGL / EGL support) which should enable egl-wayland support.
There is a Vulkan backend though I don't know what state of drivers are (mesa
may ship with some that can be detected at runtime via vulkan-loader
but no idea if they work). Maybe manually adding GPU-specific ICDs (e.g. ones provided by AMD/Intel/Nvidia) would allow video to correctly display.
Personally not able to test GL/Wayland-based backend since I only have Linux container on macOS. So, only can confirm old X11 backend can work running through XQuartz (would need to support libxpresent
). Outside of libxpresent
, there is not much cost adding X11 since most of dependencies are already included with mesa
.
brew reinstall mpv
should allow trying out new bottle.
Closing as complete. Feel free to report if there are still issues.
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputOutput of
brew doctor
Verification
brew doctor
output saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Use mpv on Linux
Description of issue
This issue was reported at MPV repository but developers closed it as the scope of it lies with Homebrew.
Please check: https://github.com/mpv-player/mpv/issues/13893
Diagnosis
Missing Wayland dependency on Linux!
What happened (include all command output)?
What did you expect to happen?
There is no video output!
MPV Log file
https://0x0.st/X-DK.txt
Step-by-step reproduction instructions (by running
brew
commands)Installation of MPV with BREW (output)
https://0x0.st/X-DZ.txt