Rewrite doc/INSTALL-MAC.md with a working recipe for Apple Silicon and Intel Macs
Summary
doc/INSTALL-MAC.md has drifted badly from reality. It still tells
contributors to run commands like:
brew install gcc48 --enable-all-languages(thegcc48formula was removed from Homebrew years ago; GCC 4.8 is from 2013),brew install unittest-cpp --cc=gcc-4.8,brew install qt5(the current formula isqt@5),- point CMake at
/usr/local/Cellar/qt5/5.4.2/and/usr/local/Cellar/python3/3.3.2/...(Intel-only paths, Python 3.3 has been EOL since 2017), - pass
cmake -d -G ...(there is no-dflag; that is what the reporter of #1030 was doing, straight from this file).
As a result, anyone following the existing doc on a current Mac, and
especially any contributor on Apple Silicon, lands on opaque CMake
errors. The most common one, and the subject of #1030, is the follow-on
"Could not find a package configuration file provided by OpenShotAudio",
which hides the actual problem that libopenshot-audio itself no longer
builds with the commands the doc suggests.
What this PR changes
A full rewrite of doc/INSTALL-MAC.md with a recipe that was
verified end-to-end on:
- macOS 15
- Apple Silicon (
arm64) - AppleClang 17.0.0 (Command Line Tools)
- CMake 4.0.3
- Homebrew at
/opt/homebrew
Every prefix is derived via $(brew --prefix ...), so the same commands
work on Intel Macs against /usr/local without modification.
The new document covers:
- Supported platforms.
- Installing Xcode Command Line Tools and Homebrew.
- The real list of required Homebrew formulae (
cmake,swig,qt@5,ffmpeg@7,libomp,zeromq,cppzmq,pkgconf), plus optional ones. - Cloning
libopenshot-audioandlibopenshotas siblings. - Building
libopenshot-audiowith the default out-of-source CMake workflow. - Building
libopenshotwith the exact flags AppleClang needs, in particular the five-DOpenMP_*hints that work around AppleClang not shipping an OpenMP runtime. - Verifying the build with
python3 -c "import openshot; ...". - Optional
cmake --install buildstep and how to point it at Homebrew's prefix. - Optional test build via Catch2 / UnitTest++.
- A Troubleshooting section documenting the current set of macOS-specific gotchas that a contributor will hit even with this recipe.
What is documented in Troubleshooting
These are genuine current issues, surfaced while walking the build on Apple Silicon. Each has a sensible workaround captured in the doc, and each is worth its own small follow-up PR:
- AGL framework removed from the macOS SDK in 10.14. Already being fixed by OpenShot/libopenshot-audio#169 (my own PR). Once that merges, the troubleshooting note can be tightened.
cppzmqis marked optional in CMake but required in source:src/ZmqLogger.hunconditionally#includes<zmq.hpp>, so the "optional" classification insrc/CMakeLists.txtis misleading. Worth a follow-up PR to make it actually required (or guarded by a compile flag).- AppleClang OpenMP detection:
find_package(OpenMP REQUIRED)fails out of the box on macOS because AppleClang does not ship OpenMP. Worth a follow-up PR to add a small macOS fallback path to the CMake module (or at least tocmake/'s helper set). - Ruby bindings fail on macOS due to
register: Apple's/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Headers/ruby/ruby/intern.hdeclares functions using theregisterspecifier, which C++17 has removed. This blocks the Ruby bindings on every modern macOS SDK. Worth a follow-up PR to defaultENABLE_RUBYtoOFFon macOS. - FFmpeg 8: Homebrew's default
ffmpegformula is already at FFmpeg 8, which is not yet supported ondevelop; until #1018 lands, the doc tells users to installffmpeg@7.
Scope
Docs-only. CMakeLists.txt, source, and every build target are
unchanged. The recipe in this file was used to build libopenshot.dylib
and _openshot.so from a clean clone on an Apple Silicon Mac; running
python3 -c "import openshot; print(openshot.OPENSHOT_VERSION_FULL)"
prints 0.7.0.
Fixes
Fixes #1030.
Context
This is my first PR to libopenshot proper. It is the documentation
half of a small series of Apple Silicon contributor fixes I have been
working on. On the packaging side, the corresponding openshot-qt PRs
are #6003,
#6004,
#6005, and
#6006; on the
audio-library side, the corresponding fix is
OpenShot/libopenshot-audio#169. The follow-up CMake fixes enumerated in
Troubleshooting above will land as separate small PRs.
Merge conflicts have been detected on this PR, please resolve.