Repository navigation
Add ARM64 library builds and newer dependency compatibility - #1117
Merged
Merged
Conversation
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) <noreply@anthropic.com>
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) <noreply@anthropic.com>
…dec 61+) FFmpeg 7 removed the codec capability lists (pix_fmts, supported_samplerates, sample_fmts, ch_layouts, channel_layouts) from the public AVCodec struct. Accessing them no longer compiles against current FFmpeg releases (e.g. 8.x/9.x as shipped by MSYS2 and newer distros), breaking the build entirely. Add wrapper helpers in FFmpegUtilities.h: ffmpeg_codec_pix_fmts() -> AV_CODEC_CONFIG_PIX_FORMAT ffmpeg_codec_sample_rates() -> AV_CODEC_CONFIG_SAMPLE_RATE ffmpeg_codec_sample_fmts() -> AV_CODEC_CONFIG_SAMPLE_FORMAT ffmpeg_codec_ch_layouts() -> AV_CODEC_CONFIG_CHANNEL_LAYOUT For LIBAVCODEC_VERSION_MAJOR >= 61 they call avcodec_get_supported_config(); for older FFmpeg they return the existing struct fields directly. All call sites in FFmpegWriter.cpp now go through these helpers, so behavior is identical on FFmpeg <= 6. Also fix a pre-existing bug visible on the new path: the channel-layout loop used 'if (av_channel_layout_compare(...))' — treating NON-matching layouts as valid — instead of comparing == 0. On FFmpeg 7 this would have accepted the first non-matching layout; now it matches upstream intent (accept only an equal layout). And add the missing #include "Exceptions.h" to tests/BeatSync.cpp, which uses openshot::InvalidJSON but previously got it transitively. Verified on Windows/MSYS2 with FFmpeg 9.0.1 (libavcodec 63) + GCC 16: full build passes and a Timeline render + libx264/AAC export via FFmpegWriter produces a valid MP4.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ting the INSTALL-MAC.md recipe to match: dropping zeromq and cppzmq from the Homebrew install list, removing the obsolete zmq.hpp troubleshooting entry, noting that the AGL link fix shipped in libopenshot-audio 1.0.1, and recording the macOS 27 / AppleClang 21 re-verification. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrite doc/INSTALL-MAC.md with a working recipe for Apple Silicon and Intel Macs
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1117 +/- ##
===========================================
+ Coverage 70.87% 73.87% +3.00%
===========================================
Files 262 275 +13
Lines 34458 36905 +2447
===========================================
+ Hits 24421 27264 +2843
+ Misses 10037 9641 -396 ☔ View full report in Codecov by Harness. |
This was referenced Oct 16, 2026
Member
Author
Keep the existing OpenCV 4 minimum and 4.5.1 exclusion. Prefer Protobuf config packages for their transitive libraries, falling back to FindProtobuf on older builders. Print invalid Ninja rules if the Windows build fails so that the remaining generator issue can be diagnosed.
Use VERBATIM for the coverage-disabled test targets so CMake escapes dollar signs in anchored CTest label expressions. Windows Ninja otherwise rejects build.ninja before compilation.
The Windows ARM64 libc++ build does not indirectly declare std::insert_iterator through other standard headers.
Adapt the focused MagickCore linkage fix from #1096 (head 37a2106). Windows requires direct linkage for the core functions used by the image readers and writers. Retain the existing fallback for older CMake packages. Co-authored-by: Gordon Lam (SH) (from Dev Box) <yeelam@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the CrashHandler include inside the existing non-Windows guard. The SIGPIPE test has no Windows body and does not need to include Windows SDK headers after Catch2.
Keep spherical side data on the encoder context across parameter initialization. Verify the saved MP4 orientation independently, and only bypass reader angle assertions when libavformat 62 or 63 returns exactly zero for all three angles. Log the submitted upstream patch and retain normal assertions for fixed versions and other results.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This prepares ARM64 library builds and updates dependency compatibility for validation alongside the matching audio and application branches.
0,0,0bypasses reader-angle assertions, with an upstream-patch warning; fixed versions automatically run the normal assertions.arm64-support.Validation: current GitHub checks pass, including both ARM64 builds. #1096 is only partially incorporated; its remaining changes are outside this PR.
Integration order: audio → libopenshot → openshot-qt. Keep these integration branches separate from develop until final builder and packaging verification is complete.
Companion PRs: OpenShot/libopenshot-audio#174, OpenShot/openshot-qt#6205.