如何解决丢失的符号:__chkstd_darwin in libSystem.B.dylib (OSX)
how to resolve missing symbol: __chkstd_darwin in libSystem.B.dylib (OSX)
我有一个使用 Qt 框架开发的桌面应用程序。关于 OSX 的向后兼容性,我有一个问题:该应用程序是在 10.15 上编译的,在 10.15 和 10.14 上运行良好。该二进制文件也随 10.13 一起启动,但有时会抛出有关 libSystem.B.dylib:
中缺少符号 (__chkstk_darwin ) 的错误
Process: soundjack [36008]
Path: /Applications/SJC200731.app/Contents/MacOS/soundjack
Identifier: com.yourcompany.soundjack
Version: 0
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: soundjack [36008]
User ID: 501
Date/Time: 2020-08-03 14:27:37.091 -0400
OS Version: Mac OS X 10.13.6 (17G12034)
Report Version: 12
Anonymous UUID: B29E683E-6761-8C04-33C0-BC84BEE092BE
Time Awake Since Boot: 610000 seconds
System Integrity Protection: enabled
Crashed Thread: 3
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x4] Symbol missing
Dyld Error Message:
Symbol not found: ____chkstk_darwin
Referenced from: /Applications/SJC200731.app/Contents/MacOS/soundjack
Expected in: /usr/lib/libSystem.B.dylib
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff6d3f11fa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6d3f0714 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff452c9f65 __CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff452c92b7 __CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff452c8927 CFRunLoopRunSpecific + 487
5 com.apple.HIToolbox 0x00007fff445a8d96 RunCurrentEventLoopInMode + 286
6 com.apple.HIToolbox 0x00007fff445a8b06 ReceiveNextEventCommon + 613
7 com.apple.HIToolbox 0x00007fff445a8884 _BlockUntilNextEventMatchingListInModeWithFilter + 64
8 com.apple.AppKit 0x00007fff42855a3b _DPSNextEvent + 2085
9 com.apple.AppKit 0x00007fff42febe34 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
10 com.apple.AppKit 0x00007fff4284a84d -[NSApplication run] + 764
11 libqcocoa.dylib 0x00000001100ab5d3 0x110073000 + 230867
12 org.qt-project.QtCore 0x000000010e2b7a7f QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 431
13 org.qt-project.QtCore 0x000000010e2bc002 QCoreApplication::exec() + 130
14 com.yourcompany.soundjack 0x000000010cf54875 main + 3141
15 libdyld.dylib 0x00007fff6d2aa015 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fff6d3fbbea kevent + 10
1 com.yourcompany.soundjack 0x000000010cf68ebe 0x10cf4d000 + 114366
2 com.yourcompany.soundjack 0x000000010cf689e5 0x10cf4d000 + 113125
3 com.yourcompany.soundjack 0x000000010cf68591 0x10cf4d000 + 112017
4 com.yourcompany.soundjack 0x000000010cf5b351 boost::asio::io_context::run() + 65
5 com.yourcompany.soundjack 0x000000010cfc8f28 0x10cf4d000 + 507688
6 libsystem_pthread.dylib 0x00007fff6d5c2661 _pthread_body + 340
7 libsystem_pthread.dylib 0x00007fff6d5c250d _pthread_start + 377
8 libsystem_pthread.dylib 0x00007fff6d5c1bf9 thread_start + 13
Thread 2:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff6d3facf2 __select + 10
1 com.apple.CoreFoundation 0x00007fff45303a4b __CFSocketManager + 635
2 libsystem_pthread.dylib 0x00007fff6d5c2661 _pthread_body + 340
3 libsystem_pthread.dylib 0x00007fff6d5c250d _pthread_start + 377
4 libsystem_pthread.dylib 0x00007fff6d5c1bf9 thread_start + 13
Thread 3 Crashed:
0 dyld 0x000000010d4c2256 __abort_with_payload + 10
1 dyld 0x000000010d4c1bc8 abort_with_payload_wrapper_internal + 89
2 dyld 0x000000010d4c1bf5 abort_with_payload + 9
3 dyld 0x000000010d495482 dyld::halt(char const*) + 354
4 dyld 0x000000010d4955a9 dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 170
5 libdyld.dylib 0x00007fff6d2aa292 dyld_stub_binder + 282
6 ??? 0x000000010d010000 0 + 4513136640
7 com.yourcompany.soundjack 0x000000010cf74bcb sender::doCompression() + 2347
8 com.yourcompany.soundjack 0x000000010cf738d4 sender::sendItThreadFunction() + 564
9 com.yourcompany.soundjack 0x000000010cfc8f28 0x10cf4d000 + 507688
10 libsystem_pthread.dylib 0x00007fff6d5c2661 _pthread_body + 340
11 libsystem_pthread.dylib 0x00007fff6d5c250d _pthread_start + 377
12 libsystem_pthread.dylib 0x00007fff6d5c1bf9 thread_start + 13
任何人都可以向我解释如何处理这个问题吗?
提前致谢,
最佳
亚历克斯
QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13 必须是 PRO-File 的一部分。情况已经如此,这就是我感到困惑的原因。最终我们可以确定涉及一个额外的库,它不是为 10.13 编译的,并导致了实际问题。为 10.13 编译并使用这个库后,问题就解决了。
我有一个使用 Qt 框架开发的桌面应用程序。关于 OSX 的向后兼容性,我有一个问题:该应用程序是在 10.15 上编译的,在 10.15 和 10.14 上运行良好。该二进制文件也随 10.13 一起启动,但有时会抛出有关 libSystem.B.dylib:
中缺少符号 (__chkstk_darwin ) 的错误Process: soundjack [36008]
Path: /Applications/SJC200731.app/Contents/MacOS/soundjack
Identifier: com.yourcompany.soundjack
Version: 0
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: soundjack [36008]
User ID: 501
Date/Time: 2020-08-03 14:27:37.091 -0400
OS Version: Mac OS X 10.13.6 (17G12034)
Report Version: 12
Anonymous UUID: B29E683E-6761-8C04-33C0-BC84BEE092BE
Time Awake Since Boot: 610000 seconds
System Integrity Protection: enabled
Crashed Thread: 3
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x4] Symbol missing
Dyld Error Message:
Symbol not found: ____chkstk_darwin
Referenced from: /Applications/SJC200731.app/Contents/MacOS/soundjack
Expected in: /usr/lib/libSystem.B.dylib
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff6d3f11fa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6d3f0714 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff452c9f65 __CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff452c92b7 __CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff452c8927 CFRunLoopRunSpecific + 487
5 com.apple.HIToolbox 0x00007fff445a8d96 RunCurrentEventLoopInMode + 286
6 com.apple.HIToolbox 0x00007fff445a8b06 ReceiveNextEventCommon + 613
7 com.apple.HIToolbox 0x00007fff445a8884 _BlockUntilNextEventMatchingListInModeWithFilter + 64
8 com.apple.AppKit 0x00007fff42855a3b _DPSNextEvent + 2085
9 com.apple.AppKit 0x00007fff42febe34 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
10 com.apple.AppKit 0x00007fff4284a84d -[NSApplication run] + 764
11 libqcocoa.dylib 0x00000001100ab5d3 0x110073000 + 230867
12 org.qt-project.QtCore 0x000000010e2b7a7f QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 431
13 org.qt-project.QtCore 0x000000010e2bc002 QCoreApplication::exec() + 130
14 com.yourcompany.soundjack 0x000000010cf54875 main + 3141
15 libdyld.dylib 0x00007fff6d2aa015 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fff6d3fbbea kevent + 10
1 com.yourcompany.soundjack 0x000000010cf68ebe 0x10cf4d000 + 114366
2 com.yourcompany.soundjack 0x000000010cf689e5 0x10cf4d000 + 113125
3 com.yourcompany.soundjack 0x000000010cf68591 0x10cf4d000 + 112017
4 com.yourcompany.soundjack 0x000000010cf5b351 boost::asio::io_context::run() + 65
5 com.yourcompany.soundjack 0x000000010cfc8f28 0x10cf4d000 + 507688
6 libsystem_pthread.dylib 0x00007fff6d5c2661 _pthread_body + 340
7 libsystem_pthread.dylib 0x00007fff6d5c250d _pthread_start + 377
8 libsystem_pthread.dylib 0x00007fff6d5c1bf9 thread_start + 13
Thread 2:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff6d3facf2 __select + 10
1 com.apple.CoreFoundation 0x00007fff45303a4b __CFSocketManager + 635
2 libsystem_pthread.dylib 0x00007fff6d5c2661 _pthread_body + 340
3 libsystem_pthread.dylib 0x00007fff6d5c250d _pthread_start + 377
4 libsystem_pthread.dylib 0x00007fff6d5c1bf9 thread_start + 13
Thread 3 Crashed:
0 dyld 0x000000010d4c2256 __abort_with_payload + 10
1 dyld 0x000000010d4c1bc8 abort_with_payload_wrapper_internal + 89
2 dyld 0x000000010d4c1bf5 abort_with_payload + 9
3 dyld 0x000000010d495482 dyld::halt(char const*) + 354
4 dyld 0x000000010d4955a9 dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 170
5 libdyld.dylib 0x00007fff6d2aa292 dyld_stub_binder + 282
6 ??? 0x000000010d010000 0 + 4513136640
7 com.yourcompany.soundjack 0x000000010cf74bcb sender::doCompression() + 2347
8 com.yourcompany.soundjack 0x000000010cf738d4 sender::sendItThreadFunction() + 564
9 com.yourcompany.soundjack 0x000000010cfc8f28 0x10cf4d000 + 507688
10 libsystem_pthread.dylib 0x00007fff6d5c2661 _pthread_body + 340
11 libsystem_pthread.dylib 0x00007fff6d5c250d _pthread_start + 377
12 libsystem_pthread.dylib 0x00007fff6d5c1bf9 thread_start + 13
任何人都可以向我解释如何处理这个问题吗?
提前致谢, 最佳
亚历克斯
QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13 必须是 PRO-File 的一部分。情况已经如此,这就是我感到困惑的原因。最终我们可以确定涉及一个额外的库,它不是为 10.13 编译的,并导致了实际问题。为 10.13 编译并使用这个库后,问题就解决了。