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

molten-vk package should install ICD json file to etc instead of share #203233

Open
4 tasks done
msridhar opened this issue Jan 4, 2025 · 4 comments
Open
4 tasks done
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@msridhar
Copy link
Contributor

msridhar commented Jan 4, 2025

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

$ brew config ; brew doctor
HOMEBREW_VERSION: 4.4.14
ORIGIN: https://github.com/Homebrew/brew
HEAD: f84082963da8af8c9ccd6dffbe932eba457e2b78
Last commit: 5 days ago
Branch: stable
Core tap JSON: 04 Jan 23:30 UTC
Core cask tap JSON: 04 Jan 23:30 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.P5q6SbcVsl/org.xquartz:0
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.6 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 16.0.0 build 1600
Git: 2.47.1 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.2-arm64
CLT: 16.2.0.0.1.1733547573
Xcode: 16.1
Rosetta 2: false
Your system is ready to brew.

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

I was trying to use mpv with --vo=gpu-next under the new Ghostty terminal to play a video, but the video failed to display. I reported this to mpv and the maintainers indicated the issue is the directory where the molten-vk Homebrew package is configured to install the ICD json file; see mpv-player/mpv#15642 (comment).

What happened (include all command output)?

I'm on an M1 Pro 2021 MB Pro, and I've installed mpv 0.39.0_1 from Homebrew. When I try to play any video with mpv using the --vo=gpu-next option from ghostty, I don't see any video. E.g., if I download this file and try to play it here's what I see at the console:

$ mpv --vo=gpu-next sample-5s.mp4
● Video  --vid=1               (h264 1920x1080 30 fps) [default]
● Audio  --aid=1  --alang=eng  (aac 2ch 44100 Hz 128 kbps) [default]
[vo/gpu-next] Failed initializing any suitable GPU context!
Error opening/initializing the selected video_out (--vo) device.
Video: no video
AO: [coreaudio] 44100Hz stereo 2ch floatp

I hear audio, but see no video. If I don't pass the --vo=gpu-next option and just run mpv sample-5s.mp4, the video plays fine from ghostty. And, from iTerm2 and Terminal, mpv --vo=gpu-next sample-5s.mp4 succeeds in playing the video.

What did you expect to happen?

I expected the video to be visible in all cases.

Step-by-step reproduction instructions (by running brew commands)

I believe just `brew install mpv` followed by the steps outlined above under "What happened."
@msridhar msridhar added the bug Reproducible Homebrew/homebrew-core bug label Jan 4, 2025
@SMillerDev
Copy link
Member

What does the title have to do with the content of the issue? What makes you say the install location is wrong?

@carlocab
Copy link
Member

carlocab commented Jan 5, 2025

CC @cho-m

@msridhar
Copy link
Contributor Author

msridhar commented Jan 5, 2025

Sorry for not explaining the title! That was the title suggested by @m154k1 in the mpv issue where they diagnosed the problem:

mpv-player/mpv#15642 (comment)

If you like I can change the title to more directly reflect the symptom of the problem.

@cho-m
Copy link
Member

cho-m commented Jan 6, 2025

Odd of Ghostty to force set the XDG_DATA_DIRS (https://github.com/ghostty-org/ghostty/blob/main/src/termio/shell_integration.zig#L470-L482). Looks like it is due to them manipulating the variable in shells, e.g. Fish and Elvish.

As note, this will introduce the same issues we hit on Linux (assuming not on old /usr/local prefix), i.e. it will break some functionality in glib and maybe other formulae

Originally on Linux we would automatically add Homebrew's directory to XDG_DATA_DIRS; however, we reverted this as Linux desktops are usually built on top of glib which led to incompatibilities with system packages - Homebrew/brew#18643

For macOS users, we can reconsider the recommendation given there should be no incompatibilities and we may get issue reports from Ghostty users on glib dependents.


Now on topic of Vulkan, it is probably less of a concern if setting XDG_DATA_DIRS but probably okay to move to etc.

The share directory is the standard/default, but etc is still a documented alternative (in Linux docs, but macOS loads same paths unless ICD is found in app bundle)

https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderDriverInterface.md#driver-discovery-on-linux

2 SYSCONFDIR /etc Compile-time option set to possible location of drivers installed from non-Linux-distribution-provided packages.

https://github.com/KhronosGroup/Vulkan-Loader/blob/vulkan-sdk-1.3.296.0/loader/loader.c#L3292-L3301


If going this route, probably want to put files inside #{prefix}/etc/... and let brew handle linking/unlinking.

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
Projects
None yet
Development

No branches or pull requests

4 participants