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

Command for building mpv.app exits with homebrew related error but app seems to run correctly #13603

Closed
xanadu6291 opened this issue Feb 29, 2024 · 9 comments · Fixed by #13606
Labels

Comments

@xanadu6291
Copy link

Important Information

Provide following Information:

  • mpv version v0.37.0-444-g0897604298
  • macOS Version macOS 14.3.1
  • Source of the mpv binary or bundle git head
  • If known which version of mpv introduced the problem v0.37.0-444-g0897604298?
  • Possible screenshot or video of visual glitches none

If you're not using git master or the latest release, update.
Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

Try to reproduce your issue with --no-config first. If it isn't reproducible
with --no-config try to first find out which option or script causes your issue.

Describe the reproduction steps as precise as possible. It's very likely that
the bug you experience wasn't reproduced by the developer because the workflow
differs from your own.

run command "TOOLS/osxbundle.py build/mpv" in build directory.

Note: I'm not using homebrew!!

Expected behavior

Build mpv.app without error.

Actual behavior

$ TOOLS/osxbundle.py build/mpv
Creating macOS application bundle (version: 0.37.0-UNKNOWN)...

copying bundle skeleton
copying binary
generating Info.plist
bundling dependencies

gathering all linked libraries
copying and processing all linked libraries
removing rpath definitions towards dev tools
copying and processing swift libraries
setting additional rpath for swift libraries
copying and processing vulkan loader
/bin/sh: brew: command not found
Traceback (most recent call last):
File "/Volumes/mpv_compile/compile/mpv/TOOLS/osxbundle.py", line 89, in
main()
File "/Volumes/mpv_compile/compile/mpv/TOOLS/osxbundle.py", line 81, in main
dylib_unhell.process(target_binary(binary_name))
File "/Volumes/mpv_compile/compile/mpv/TOOLS/dylib_unhell.py", line 256, in process
process_vulkan_loader(binary, "MoltenVK_icd.json", "vulkan/icd.d", "ICD")
File "/Volumes/mpv_compile/compile/mpv/TOOLS/dylib_unhell.py", line 190, in process_vulkan_loader
os.path.join(get_homebrew_prefix(), 'share', loaderRelativeFolder),
^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/mpv_compile/compile/mpv/TOOLS/dylib_unhell.py", line 99, in get_homebrew_prefix
return subprocess.check_output("brew --prefix", universal_newlines=True, shell=True).strip()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'brew --prefix' returned non-zero exit status 127.
roushinoMacBook-Air:mpv roushi$ rm build/mpv.app/Contents/MacOS/mpv-bundle
rm: build/mpv.app/Contents/MacOS/mpv-bundle: No such file or directory

Log file

Make a log file made with -v -v or --log-file=output.txt, attach it to
the issue, and replace this text with a link to it.

If you use the Bundle, a default log is created for your last run at
~/Library/Logs/mpv.log. You can jump to that file via the
Help > Show log File… menu.

Without the log file, this issue will be closed for ignoring the issue template.

In the case of a crash, please provide the macOS Crash Report (Backtrace).

Since this is build issue, there's no log file.

Sample files

Sample files needed to reproduce this issue can be attached to the issue
(preferred), or be uploaded to https://0x0.st/ or similar sites.
(Only needed if the issue cannot be reproduced without it.)
Do not use garbage like "cloud storage", especially not Google Drive.

Since this is build issue, there's no sample file.

@xanadu6291 xanadu6291 changed the title Command for building mpv.app exits with homebrew relater error but app seems to run correctly Command for building mpv.app exits with homebrew related error but app seems to run correctly Feb 29, 2024
@Akemi
Copy link
Member

Akemi commented Feb 29, 2024

what does brew --prefix return on your system?

or rather are you not using homebrew for installing mpv, or is homebrew not installed on your system?

@Akemi
Copy link
Member

Akemi commented Feb 29, 2024

it fails at the last step when bundling the vulkan loaders. just means that if distributing the app bundle vulkan might not work out of the box. if you locally have the vulkan loaders+driver installed the bundle will work with vulkan.

so yeah, it's expected that the app bundle works without any hard errors. though the bundling script should be fixed.

run command "TOOLS/osxbundle.py build/mpv" in build directory.
...

Actual behavior

$ TOOLS/osxbundle.py build/mpv Creating macOS application bundle (version: 0.37.0-UNKNOWN)...

don't use that script directly anymore. use our custom target in our build system meson compile -C build macos-bundle.
the custom target was added here #13529.

@xanadu6291
Copy link
Author

what does brew --prefix return on your system?

or rather are you not using homebrew for installing mpv, or is homebrew not installed on your system?

Since I'm not using homebrew, it returns "-bash: brew: command not found".

@xanadu6291
Copy link
Author

it fails at the last step when bundling the vulkan loaders. just means that if distributing the app bundle vulkan might not work out of the box. if you locally have the vulkan loaders+driver installed the bundle will work with vulkan.

so yeah, it's expected that the app bundle works without any hard errors. though the bundling script should be fixed.

run command "TOOLS/osxbundle.py build/mpv" in build directory.
...

Actual behavior

$ TOOLS/osxbundle.py build/mpv Creating macOS application bundle (version: 0.37.0-UNKNOWN)...

don't use that script directly anymore. use our custom target in our build system meson compile -C build macos-bundle. the custom target was added here #13529.

OK. I understand the reason why I get error. I don't have "vulkan loaders+driver" on my system...
By using meson compile -C build macos-bundle, I get same error and ninja stops with error "ninja: build stopped: subcommand failed.". What should I do?

@Akemi
Copy link
Member

Akemi commented Feb 29, 2024

should be fixed by #13606.

@Akemi
Copy link
Member

Akemi commented Feb 29, 2024

OK. I understand the reason why I get error. I don't have "vulkan loaders+driver" on my system... By using meson compile -C build macos-bundle, I get same error and ninja stops with error "ninja: build stopped: subcommand failed.". What should I do?

sry, you misunderstood me. that comment was only on a side note. the custom target uses the same underlying script that needs fixing, see my PR. though i might rename/rewrite the script in the future and the command won't work anymore, the custom target though will.

you don't need to have the vulkan loaders or drivers installed. there is an error in the script and that's completely my fault.

@xanadu6291
Copy link
Author

xanadu6291 commented Feb 29, 2024

should be fixed by #13606.

Solved the issue with my environment. Thank you for prompt fix...

@xanadu6291
Copy link
Author

OK. I understand the reason why I get error. I don't have "vulkan loaders+driver" on my system... By using meson compile -C build macos-bundle, I get same error and ninja stops with error "ninja: build stopped: subcommand failed.". What should I do?

sry, you misunderstood me. that comment was only on a side note. the custom target uses the same underlying script that needs fixing, see my PR. though i might rename/rewrite the script in the future and the command won't work anymore, the custom target though will.

you don't need to have the vulkan loaders or drivers installed. there is an error in the script and that's completely my fault.

Issue would be solved with #13606 . I'm awaiting...

@Akemi
Copy link
Member

Akemi commented Feb 29, 2024

fix has been merged. thanks for reporting.

xrun1 pushed a commit to xrun1/mpv-svp-fix that referenced this issue Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants