How To Build MPV & MPV - App On An Apple Silicon Mac GitHub
How To Build MPV & MPV - App On An Apple Silicon Mac GitHub
dbrookman/build-mpv_silicon.sh
Last active last month
Star Code Revisions 28 Stars 70 Forks 11
Preparations
Before you can build mpv & mpv.app on an Apple silicon Mac, there's a couple of
required dependencies you'll need to install if you haven't already:
1. Go to System Preferences > Software Update. If there's anything there to
update, do it.
2. If you don't have the Xcode Command Line Tools installed, run xcode-select -
-install and select Install on the prompt that appears.
You'll also need a local copy of the mpv repo, which you can get by running git
clone https://github.com/mpv-player/mpv .
You can now run the attached script to build mpv & mpv.app on an Apple silicon Mac
yourself. Just make sure to run it from the root directory of the cloned repo.
Static Build
If you want to bundle a static build of mpv.app, perform these steps following the
ones above.
1. Run brew install dylibbundler .
2. Run the script from the root directory of the cloned repo, but append --static
to the command, like ./build-mpv_silicon.sh --static .
Updating
Going forward, you can update your local copy of the repo by running the following
commands from its root directory:
git reset --hard
git clean --force -d -x
git pull origin master
build-mpv_silicon.sh
1 #!/usr/bin/env bash
2
3 # Builds mpv & mpv.app on Apple silicon Macs.
4 # Run this script from the root directory of the mpv repo.
5
6 # if anything fails, gtfo
7 set -ex
8
9 meson setup build
10 meson compile -C build
11 # test the binary we just built
12 ./build/mpv --version
13
14 ./TOOLS/osxbundle.py --skip-deps build/mpv
15 if [[ $1 == "--static" ]]; then
16 dylibbundler --bundle-deps --dest-dir build/mpv.app/Contents/MacOS/lib/ --insta
17 # test the app binary to make sure all the dylibs made it okay
18 ./build/mpv.app/Contents/MacOS/mpv --version
19 fi
Cheers.
After applying, building normally worked for me and I was able to open the app bundle without any
problems.
-----------
Command line: `cc /Users/doriandiaconu/mpv/build/meson-private/tmp79t_3i4r/testfile.c
-o /Users/doriandiaconu/mpv/build/meson-private/tmp79t_3i4r/output.obj -c -O0 -
Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-
command-line-argument -Werror=ignored-optimization-argument -std=c11` -> 1
stderr:
/Users/doriandiaconu/mpv/build/meson-private/tmp79t_3i4r/testfile.c:2:18: fatal error:
'OpenGLES/ES3/glext.h' file not found
#include <OpenGLES/ES3/glext.h>
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
-----------
Header "OpenGLES/ES3/glext.h" has symbol "GL_RGB32F" : NO
Dependency /opt/vc/lib/pkgconfig/mmal.pc skipped: feature rpi-mmal disabled
Pkg-config binary for 1 is cached.
Determining dependency 'libva' with pkg-config executable '/opt/homebrew/bin/pkg-
config'
env[PKG_CONFIG_PATH]:
-----------
Called: `/opt/homebrew/bin/pkg-config --modversion libva` -> 1
stderr:
Package libva was not found in the pkg-config search path.
Perhaps you should add the directory containing `libva.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libva' found
-----------
Finding framework path by running: cc -v -E -
I managed to fix everything by reinstalling sonoma. I think I might have messed up the python
configuration
same issue, Sonoma 14.1, M1 Mac, Xcode 15, 15.0.1, 15.1 beta
Edit:
Installing this fixed it : https://vulkan.lunarg.com/sdk/home#mac
same issue, Sonoma 14.1, M1 Mac, Xcode 15, 15.0.1, 15.1 beta
Edit: Installing this fixed it : https://vulkan.lunarg.com/sdk/home#mac
Explain a bit.
Just installing this file "vulkansdk-macos-1.3.268.1.dmg"?
Edit - Yeah, selecting all the components during install did the trick.
same issue, Sonoma 14.1, M1 Mac, Xcode 15, 15.0.1, 15.1 beta
Edit: Installing this fixed it : https://vulkan.lunarg.com/sdk/home#mac
Thanks for this, I followed with installer with the dmg file, basically selected all components, and now
it's working.
This worked for me on Sonoma. I was having "flashing screen" issue and this fixed it, thanks a lot!