Skip to content

Rewrite doc/INSTALL-MAC.md with a working recipe for Apple Silicon and Intel Macs#1058

Open
geekrebel wants to merge 2 commits intoOpenShot:developfrom
geekrebel:modernize-install-mac-docs
Open

Rewrite doc/INSTALL-MAC.md with a working recipe for Apple Silicon and Intel Macs#1058
geekrebel wants to merge 2 commits intoOpenShot:developfrom
geekrebel:modernize-install-mac-docs

Conversation

@geekrebel
Copy link
Copy Markdown

Summary

doc/INSTALL-MAC.md has drifted badly from reality. It still tells
contributors to run commands like:

  • brew install gcc48 --enable-all-languages (the gcc48 formula 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 is qt@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 -d flag; 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-audio and libopenshot as siblings.
  • Building libopenshot-audio with the default out-of-source CMake
    workflow.
  • Building libopenshot with 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 build step 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:

  1. AGL framework removed from the macOS SDK in 10.14. Already being
    fixed by Remove dead "-framework AGL" link directive (macOS 10.14+ and all Apple Silicon) libopenshot-audio#169 (my own PR). Once that merges,
    the troubleshooting note can be tightened.
  2. cppzmq is marked optional in CMake but required in source:
    src/ZmqLogger.h unconditionally #includes <zmq.hpp>, so the
    "optional" classification in src/CMakeLists.txt is misleading. Worth
    a follow-up PR to make it actually required (or guarded by a compile
    flag).
  3. 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 to cmake/'s helper set).
  4. 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.h
    declares functions using the register specifier, which C++17 has
    removed. This blocks the Ruby bindings on every modern macOS SDK.
    Worth a follow-up PR to default ENABLE_RUBY to OFF on macOS.
  5. FFmpeg 8: Homebrew's default ffmpeg formula is already at
    FFmpeg 8, which is not yet supported on develop; until
    #1018 lands, the
    doc tells users to install ffmpeg@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.

libopenshot on both Apple Silicon (arm64) and Intel Macs. The previous
version still referenced Homebrew formulae and tools that have been gone
for a decade (gcc48, Python 3.3, Qt 5.4.2), used Intel-only
/usr/local/Cellar paths, suggested the non-existent "cmake -d" flag, and
had no Apple Silicon coverage at all. As a result, every current-day
macOS contributor who followed the file was landing on stale CMake
errors, typically the "Could not find a package configuration file
provided by OpenShotAudio" message (see libopenshot#1030).

The new document walks through the steps that were actually verified
end-to-end on macOS 15 / Apple Silicon with AppleClang 17 and CMake
4.0.3: installing Command Line Tools, installing the Homebrew
dependencies (qt@5, ffmpeg@7, libomp, cppzmq, swig, zeromq, etc.),
building libopenshot-audio, and then building libopenshot with the
OpenMP hint flags that AppleClang requires. All prefixes use
"$(brew --prefix ...)" so the same commands work on Intel Macs against
/usr/local and on Apple Silicon against /opt/homebrew.

A troubleshooting section documents the current set of macOS-specific
gotchas that contributors will still hit even with this recipe:

* AGL framework removal (recently fixed in libopenshot-audio 0.6.x).
* cppzmq marked optional in CMake but required by ZmqLogger.h.
* AppleClang OpenMP via libomp.
* Apple system Ruby headers using the C++17-removed 'register' keyword,
  which forces -DENABLE_RUBY=0 on all modern macOS builds.
* Homebrew default ffmpeg formula already being at FFmpeg 8, which the
  develop branch does not yet target (see libopenshot#1018).

This is a docs-only change. No CMake, source, or build system behaviour
is modified. Running the recipe in this file successfully produces
libopenshot.dylib, _openshot.so, and a working "import openshot" from
Python 3 on Apple Silicon.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions github-actions Bot added the conflicts A PR with unresolved merge conflicts label Apr 17, 2026
@github-actions
Copy link
Copy Markdown

Merge conflicts have been detected on this PR, please resolve.

…Shot#1027)

and updating the INSTALL-MAC.md recipe to document both Qt 5 and Qt 6
as supported options on macOS.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions github-actions Bot removed the conflicts A PR with unresolved merge conflicts label Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MacOS build error when run `cmake -d -G....'

1 participant