Repository navigation
fix(cpn): restore macOS deployment target for Companion and simulator plugins - #7737
Merged
pfeerick merged 2 commits intoSep 1, 2026
Merged
Conversation
… plugins
Companion 2.12.3 refuses to start below macOS 15 ("The application requires
macOS 15.0 or later"). Its executable and all 55 simulator plugins are stamped
minos 15.0 - the Xcode 16 SDK default - where 2.12.2 shipped 10.15. The bundled
SDL2/SDL3 copies are fine, so this is not the SDL3 packaging work.
build-companion.sh passes -DCMAKE_OSX_DEPLOYMENT_TARGET only to the top level
superbuild. The 'native' ExternalProject that actually compiles Companion only
receives variables the forwarding loop collects by matching the "specified on
the command line" helpstring, and CMake's Platform/Darwin-Initialize.cmake
re-declares CMAKE_OSX_DEPLOYMENT_TARGET as a documented cache entry, replacing
that helpstring. The flag never reaches the compiler.
Export MACOSX_DEPLOYMENT_TARGET as well, which Darwin-Initialize.cmake reads on
every configure, and forward the variable explicitly via CMAKE_CACHE_ARGS.
Target 12.0 rather than 11.0: Qt 6.9's frameworks are minos 12.0, so the bundle
already cannot start below macOS 12. Declare it in LSMinimumSystemVersion too,
so older systems get a clear message instead of a dyld failure.
Also give the ExternalProjects a LIST_SEPARATOR and escape ';' when building
CMAKE_ARGS. Without it -DCMAKE_PREFIX_PATH='<qt>;<sdl>' split into a truncated
-DCMAKE_PREFIX_PATH=<qt> plus a stray positional argument, so the sub-build
never saw the SDL prefix the -D was added to provide.
Finally, extend bundle_verify to fail packaging when any Mach-O in the bundle
is stamped above the deployment target, so this cannot regress unnoticed again.
Fixes #7732
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
pfeerick
marked this pull request as draft
August 31, 2026 13:01
… log CPack discards message(STATUS) output from install scripts, so the verification summary never reached the CI log - the run that validated #7732 showed no sign the check had run at all. Echo it through a subprocess instead, the same way the neighbouring "Re-signing:" line does, so the bundle's real macOS floor is recorded in every build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
pfeerick
marked this pull request as ready for review
September 1, 2026 02:34
1 task done
pfeerick
added a commit
that referenced
this pull request
Sep 2, 2026
… plugins (#7737) Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
Fixes #7732 — Companion 2.12.3 will not start on macOS below 15 ("The application requires macOS 15.0 or later").
What actually broke
Reading
LC_BUILD_VERSIONout of the shipped DMGs:companionexecutablelibedgetx-*-simulator.dyliblibSDL2-2.0.0.dylib/libSDL3.dylibThis is not the SDL3 packaging work (#7549, #7653) — the bundled SDL copies are correct. Everything EdgeTX itself compiles lost its deployment target and got the Xcode 16 SDK default of 15.0.
MacOSXBundleInfo.plist.inhas noLSMinimumSystemVersion, so LaunchServices falls back to the executable'sminos, which is where the error text comes from verbatim.Root cause
build-companion.shpasses-DCMAKE_OSX_DEPLOYMENT_TARGETonly to the top-level superbuild. Companion and the plugins are compiled in thenativeExternalProject, which only receives variables the forwarding loop collects by matching the helpstring"No help, variable specified on the command line.". CMake'sPlatform/Darwin-Initialize.cmakere-declares that variable as a documented cache entry, replacing the helpstring — so the loop skips it and the flag never reaches the compiler. Confirmed against CMake 3.31.6 and 4.3.3.mainis unaffected: it configures the native build directly (cmake -B native -S ... -DEdgeTX_SUPERBUILD:BOOL=0), and its artifact is minos 11.0.Changes
tools/build-companion.sh— exportMACOSX_DEPLOYMENT_TARGET, whichDarwin-Initialize.cmakereads on every configure including nested ones.CMakeLists.txt— forwardCMAKE_OSX_DEPLOYMENT_TARGETexplicitly throughCMAKE_CACHE_ARGS(native only; irrelevant to the ARM cross build).MacOSXBundleInfo.plist.in— declareLSMinimumSystemVersion, so macOS 11 gets a clear dialog instead of an opaque dyld failure.CMakeLists.txt, separate defect —LIST_SEPARATOR+;escaping when buildingCMAKE_ARGS.-DCMAKE_PREFIX_PATH='<qt>;<sdl>'was splitting into a truncated-DCMAKE_PREFIX_PATH=<qt>plus a stray positional argument, so the sub-build never saw the SDL prefix that-Dwas added to provide. Latent (SDL is still found via the environment copy), but the forwarding did not do what its comment claimed.bundle_verify.cmake.in— fail packaging if any Mach-O in the bundle is stamped above the deployment target, and report the bundle's real floor. This class of bug shipped precisely because nothing checked it;setup-sdl.shalready does the equivalent for the SDL libs, which is why those were correct.Verification
CMAKE_ARGS: -DCMAKE_PREFIX_PATH=/opt/qt|/opt/sdlas a single entry, and the generated nested configure command carries the full prefix path with no stray argument.bundle_verify.cmake.inparses undercmake -P; the minos matcher was exercised against realotool -lfragments — 15.0 flagged, 12.0/11.0 pass, andLC_ID_DYLIB'scurrent version 2.32.10correctly does not false-positive.EXECUTErow and all 55 plugin dylibs read12.0.0, and asking the reporter (macOS 12.7.6, Intel) to try it.Follow-ups (not in this PR)
A follow-up PR against
mainshould carry the11.0→12.0bump, thebundle_verifygate,LSMinimumSystemVersionand theLIST_SEPARATORfix — everything here except the deployment-target propagation itself, whichmaindoes not need. Done via #7740, as this cannot be cherry-picked into main.Final check
Now reports in CI