how to resolve missing symbol: __chkstd_darwin in libSystem.B.dylib (OSX)

4.1k views Asked by At

I have a desktop application which I developed with the Qt framework. In terms of backward compatibility on OSX I have a problem: The app is compiled on 10.15 and works fine on 10.15 and 10.14. This binary also launches with 10.13 but at some point throws an errors about missing symbols (__chkstk_darwin ) in libSystem.B.dylib:

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

Can anyone explain me how to approach this issue ?

Thanks in advance, best

Alex

1

There are 1 answers

0
Alexander Carôt On BEST ANSWER

QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13 has to be part of the PRO-File. This was already the case which is why I was confused. Eventually we could figure that there was an additional lib involved which was not compiled for 10.13 and resulted in the actual issue. After compilation for 10.13 and using this lib the problem was resolved.