MacOS macdeployqt Running from deployment folder gets SIGABRT
-
I ran a macdeployqt of my application which appears to have succeeded:
[137/138] Install the project... -- Install configuration: "Debug" -- Running Qt deploy tool for /Users/amonra/.vs/DSS/out/build/DeepSkyStackerLive/DeepSkyStackerLive.app in working directory '/Users/amonra/.vs/DSS/Darwin/arm64/Debug' '/opt/Qt/6.8.2/macos/bin/macdeployqt' '/Users/amonra/.vs/DSS/out/build/DeepSkyStackerLive/DeepSkyStackerLive.app' '-appstore-compliant' '-always-overwrite' '-hardened-runtime' '-no-strip' '-codesign=David' 'Partridge' -- Up-to-date: /Users/amonra/.vs/DSS/Darwin/arm64/Debug/./DeepSkyStackerLive.app -- Up-to-date: /Users/amonra/.vs/DSS/Darwin/arm64/Debug/./DeepSkyStackerLive.app/Contents -- Up-to-date: /Users/amonra/.vs/DSS/Darwin/arm64/Debug/./DeepSkyStackerLive.app/Contents/_CodeSignature -- Installing: /Users/amonra/.vs/DSS/Darwin/arm64/Debug/./DeepSkyStackerLive.app/Contents/_CodeSignature/CodeResources -- Up-to-date: /Users/amonra/.vs/DSS/Darwin/arm64/Debug/./DeepSkyStackerLive.app/Contents/MacOS -- Installing: /Users/amonra/.vs/DSS/Darwin/arm64/Debug/./DeepSkyStackerLive.app/Contents/MacOS/DeepSkyStackerLive -- Up-to-date: /Users/amonra/.vs/DSS/Darwin/arm64/Debug/./DeepSkyStackerLive.app/Contents/PlugIns -- Up-to-date: /Users/amonra/.vs/DSS/Darwin/arm64/Debug/./DeepSkyStackerLive.app/Contents/PlugIns/platforminputcontexts : : error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: for: /Users/amonra/.vs/DSS/Darwin/arm64/Debug/./DeepSkyStackerLive.app/Contents/MacOS/DeepSkyStackerLive (for architecture arm64) option "-add_rpath @executable_path/../Frameworks" would duplicate path, file already has LC_RPATH for: @executable_path/../Frameworks error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: /opt/Qt/6.8.2/macos/lib found in: /Users/amonra/.vs/DSS/Darwin/arm64/Debug/./DeepSkyStackerLive.app/Contents/MacOS/DeepSkyStackerLive (for architecture arm64), required for specified option "-delete_rpath /opt/Qt/6.8.2/macos/lib" Install succeeded.
Though I'm a bit concerned about the two errors at the end ...
When I try to run DeepSkyStackerLive.app from the deployment directory I get an appcrash report:
------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: DeepSkyStackerLive [37225] Path: /Users/USER/*/DeepSkyStackerLive.app/Contents/MacOS/DeepSkyStackerLive Identifier: com.yourcompany.DeepSkyStackerLive Version: 6.1 (6.1.0) Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2025-04-21 14:46:24.3968 +0100 OS Version: macOS 15.4.1 (24E263) Report Version: 12 Anonymous UUID: 0FF6C704-6753-4499-FB24-98B69528FDE2 Time Awake Since Boot: 13000 seconds System Integrity Protection: enabled Dyld Error Message: 1 Crashed Thread: 0 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace DYLD, Code 1 Library missing Library not loaded: @rpath/QtCharts.framework/Versions/A/QtCharts Referenced from: <27DC243D-46E7-366A-963E-B5E86C4C771E> /Users/USER/*/DeepSkyStackerLive.app/Contents/MacOS/DeepSkyStackerLive Reason: tried: '/usr/local/lib/QtCharts.framework/Versions/A/QtCharts' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/QtCharts.framework/Versions/A/QtCharts' (no such file), '/Users/amonra/.vs/DSS/Darwin/arm64/Debug/DeepSkyStackerLive.app/Contents/Frameworks/QtCharts.framework/Versions/A/QtCharts' (code signature in <AEB8F7ED-47A4-3211-A7BF-768FFEA62C51> '/Users/amonra/.vs/DSS/Darwin/arm64/Debug/DeepSkyStackerLive.app/Contents/Frameworks/QtCharts.framework/Versions/A/QtCharts' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/usr/local/lib/QtCharts.framework/Versions/A/QtCharts' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/QtCharts.framework/Versions/A/QtCharts' (no such file), '/Users/amonr (terminated at launch; ignore backtrace)
What's the problem please? Is it related to my use of a self-signed cert for deployment, and if so what do I need to specify in certificate to let this work?
-
Hi,
Do you have QtCharts in your app bundle after running macdeployqt ?
-
@SGaist Looks that way:
amonra@Saturn Frameworks % ls -lR QtCharts.framework total 0 lrwxr-xr-x@ 1 amonra staff 25 21 Apr 14:41 QtCharts -> Versions/Current/QtCharts lrwxr-xr-x@ 1 amonra staff 26 21 Apr 14:41 Resources -> Versions/Current/Resources drwxr-xr-x@ 4 amonra staff 128 22 Apr 02:27 Versions QtCharts.framework/Versions: total 0 drwxr-xr-x@ 5 amonra staff 160 22 Apr 02:27 A lrwxr-xr-x@ 1 amonra staff 1 21 Apr 14:41 Current -> A QtCharts.framework/Versions/A: total 7112 drwxr-xr-x@ 3 amonra staff 96 22 Apr 02:27 _CodeSignature -rwxr-xr-x@ 1 amonra staff 3640928 22 Apr 02:27 QtCharts drwxr-xr-x@ 4 amonra staff 128 22 Apr 02:27 Resources QtCharts.framework/Versions/A/_CodeSignature: total 8 -rw-r--r--@ 1 amonra staff 2690 22 Apr 02:27 CodeResources QtCharts.framework/Versions/A/Resources: total 16 -rw-r--r--@ 1 amonra staff 768 24 Jan 13:36 Info.plist -rw-r--r--@ 1 amonra staff 343 24 Jan 13:36 PrivacyInfo.xcprivacy amonra@Saturn Frameworks %
I think this an RPATH problem - need to look into it some more. Hmmm otool says:
cmd LC_RPATH cmdsize 48 path @executable_path/../Frameworks (offset 12)
which looks as if it ought to be correct ...
I think that is confirmed by the error message in the crash report:
DeepSkyStackerLive.app/Contents/Frameworks/QtCharts.framework/Versions/A/QtCharts' (code signature in <AEB8F7ED-47A4-3211-A7BF-768FFEA62C51> '/Users/amonra/.vs/DSS/Darwin/arm64/Debug/DeepSkyStackerLive.app/Contents/Frameworks/QtCharts.framework/Versions/A/QtCharts' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs),
Why is macdeployqt re-signing all the libraries in the Frameworks directory of the .app (like the Qt libraries) they already have a valid signature don't they?