Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux - MPV is missing Wayland dependency #169315

Open
4 tasks done
lamyergeier opened this issue Apr 17, 2024 · 7 comments
Open
4 tasks done

Linux - MPV is missing Wayland dependency #169315

lamyergeier opened this issue Apr 17, 2024 · 7 comments
Labels
bug Reproducible Homebrew/homebrew-core bug help wanted Task(s) needing PRs from the community or maintainers

Comments

@lamyergeier
Copy link

lamyergeier commented Apr 17, 2024

brew gist-logs <formula> link OR brew config AND brew doctor output

HOMEBREW_VERSION: 4.2.18-15-g40d2f5c
ORIGIN: https://github.com/Homebrew/brew
HEAD: 40d2f5c23ade973ca899c748185d574e0133fe5b
Last commit: 26 hours ago
Core tap HEAD: 911c679f0c801cc77990e81a3018085fd8a714ea
Core tap last commit: 20 hours ago
Core tap JSON: 15 Apr 14:26 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_BROWSER: firefox
HOMEBREW_CASK_OPTS: []
HOMEBREW_CURL_PATH: /bin/curl
HOMEBREW_DISPLAY: :0
HOMEBREW_EDITOR: codium
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 16
HOMEBREW_NO_AUTO_UPDATE: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.1.4 => /mnt/Data/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 16-core 64-bit unknown_0x6_0x9a
Clang: 17.0.6
Git: 2.44.0 => /home/linuxbrew/.linuxbrew/bin/git
Curl: 8.2.1 => /bin/curl
Kernel: Linux 6.7.6-200.fc39.x86_64 x86_64 GNU/Linux
OS: Fedora release 39 (Thirty Nine)
Host glibc: 2.38
/usr/bin/gcc: 13.2.1
/usr/bin/ruby: 3.2.2
glibc: N/A
gcc@11: 11.4.0
gcc: 13.2.0
xorg: N/A

Output of brew doctor

  • NOTE: I purposefully appended homebrew path after the system binary path.
$ 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: /usr/bin occurs before /home/linuxbrew/.linuxbrew/bin in your PATH.
This means that system-provided programs will be used instead of those
provided by Homebrew. Consider setting your PATH so that
/home/linuxbrew/.linuxbrew/bin occurs before /usr/bin. Here is a one-liner:
  echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' &gt;\&gt; /home/lamy/.bash_profile
The following tools exist at both paths:
  2to3
  2to3-3.12
  analyseplugin
  applyplugin
  aserver
  autopoint
  brotli
  bunzip2
  bzcat
  bzcmp
  bzdiff
  bzegrep
  bzfgrep
  bzgrep
  bzip2
  bzip2recover
  bzless
  bzmore
  cal
  captoinfo
  chmem
  choom
  chrt
  clear
  col
  colcrt
  colrm
  column
  curl
  curve_keygen
  danetool
  dbus-cleanup-sockets
  dbus-daemon
  dbus-launch
  dbus-monitor
  dbus-run-session
  dbus-send
  dbus-test-tool
  dbus-update-activation-environment
  dbus-uuidgen
  dmesg
  dumpsexp
  eject
  encguess
  envsubst
  fadvise
  fallocate
  fc-cache
  fc-cat
  fc-conflist
  fc-list
  fc-match
  fc-pattern
  fc-query
  fc-scan
  fc-validate
  ffmpeg
  ffplay
  ffprobe
  fincore
  findmnt
  flock
  freetype-config
  fribidi
  funzip
  fusermount3
  gapplication
  gdbus
  gdbus-codegen
  getopt
  gettext
  gettext.sh
  gettextize
  gio
  git
  git-receive-pack
  git-shell
  git-upload-archive
  git-upload-pack
  glib-compile-resources
  glib-compile-schemas
  glib-genmarshal
  glib-gettextize
  glib-mkenums
  gnutls-cli
  gnutls-cli-debug
  gnutls-serv
  gobject-query
  gpg-error
  gpg-error-config
  gpgrt-config
  gr2fonttest
  gresource
  gsettings
  gtester
  gtester-report
  hardlink
  hb-info
  hb-ot-shape-closure
  hb-shape
  hb-subset
  hb-view
  hexdump
  hmac256
  i386
  icu-config
  icuinfo
  infocmp
  infotocap
  ionice
  ipcmk
  ipcrm
  ipcs
  irqtop
  isosize
  jpegoptim
  jq
  json_pp
  lame
  last
  lastb
  libgcrypt-config
  libpng-config
  libpng16-config
  libtool
  libtoolize
  linux32
  linux64
  listplugins
  logger
  look
  lsblk
  lscpu
  lsfd
  lsipc
  lsirq
  lslocks
  lslogins
  lsmem
  lsns
  m4
  mcookie
  mesg
  more
  mount
  mountpoint
  mpicalc
  mpv
  msgattrib
  msgcat
  msgcmp
  msgcomm
  msgconv
  msgen
  msgexec
  msgfilter
  msgfmt
  msggrep
  msginit
  msgmerge
  msgunfmt
  msguniq
  namei
  nano
  ngettext
  nsenter
  ocsptool
  openssl
  orc-bugreport
  p11-kit
  p11tool
  pango-list
  pango-segmentation
  pango-view
  pcre2-config
  perl
  perl5.38.2
  perldoc
  piconv
  pip
  pip3
  pip3.12
  pipesz
  pkg-config
  png-fix-itxt
  pngfix
  pod2html
  pod2man
  pod2text
  pod2usage
  prlimit
  psktool
  ptar
  ptardiff
  ptargrep
  pydoc3
  pydoc3.12
  python3
  python3-config
  python3.12
  python3.12-config
  qt-faststart
  recode-sr-latin
  rename
  renice
  reset
  rev
  rg
  rnano
  rubberband
  rubberband-r3
  scalar
  script
  scriptlive
  scriptreplay
  sed
  setarch
  setsid
  setterm
  shasum
  sqlite3
  streamzip
  tabs
  taskset
  tesseract
  tic
  toe
  tput
  tree
  trust
  tset
  uchardet
  uclampset
  ul
  umount
  uname26
  unshare
  unxz
  unzip
  unzipsfx
  utmpdump
  uuidgen
  uuidparse
  waitpid
  wall
  wayland-scanner
  wdctl
  whereis
  x86_64
  xgettext
  xml2-config
  xmlcatalog
  xmllint
  xmlwf
  xsltproc
  xz
  xzcat
  xzcmp
  xzdec
  xzdiff
  xzegrep
  xzfgrep
  xzgrep
  xzless
  xzmore
  yat2m
  yt-dlp
  zipdetails
  zipgrep
  zipinfo

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

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: mpv-player/mpv#13893

Diagnosis

Missing Wayland dependency on Linux!

What happened (include all command output)?

mpv --no-config 01-12-02.2019-03-08.QkQapdgAa7o.1440.webm
 (+) Video --vid=1 (*) (av1 2560x1440 25.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
File tags:
 Comment: https://www.youtube.com/watch?v=QkQapdgAa7o
Error opening/initializing the selected video_out (--vo) device.
Video: no video
Exiting... (Errors when loading file)

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

@lamyergeier lamyergeier added the bug Reproducible Homebrew/homebrew-core bug label Apr 17, 2024
@lamyergeier
Copy link
Author

lamyergeier commented Apr 27, 2024

Please add the Wayland dependency as currently no video is displayed when playing on Fedora 40.

@carlocab
Copy link
Member

Can you open a PR to update the formula?

@lamyergeier
Copy link
Author

lamyergeier commented Apr 28, 2024

@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).

@carlocab
Copy link
Member

I was hoping that the person who created the mpv formula could update it.

The formula was added almost 10 years ago in 2d56414, 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 carlocab added the help wanted Task(s) needing PRs from the community or maintainers label Apr 28, 2024
@lamyergeier
Copy link
Author

lamyergeier commented Apr 28, 2024

@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)

Log

$ 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>'

@carlocab
Copy link
Member

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.

@lamyergeier
Copy link
Author

Logs: https://0x0.st/XHgn.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug help wanted Task(s) needing PRs from the community or maintainers
Projects
None yet
Development

No branches or pull requests

3 participants
@carlocab @lamyergeier and others