dyld: Symbol not found: ___chkstk_darwin

Viewed 12160

After upgrading Xcode to Version 11.1 (11A1027), my iOS app(MyApp) crashes in Xcode at the start of its running with the following runtime error:

dyld: Symbol not found: ___chkstk_darwin Referenced from: /var/containers/Bundle/Application/xxxxxxxxxx/MyApp.app/MyApp Expected in: /usr/lib/libSystem.B.dylib

MacOS: Mojave 10.14.6 (18G103) Xcode: 11.1 (11A1027) Target Device: iPhone 6 Plus Target Device iOS: 12.4.2

It does not have any issues in Xcode 10.3. Any helps, comments will be appreciated. Thanks in advance.

4 Answers

I think I found the problem. I generate my Xcode projects with CMake and for some reason CMake is having a very hard time setting the Base SDK option on the project.

Bad Base SDK

If I manually set the Base SDK to iOS it seems to build and run just fine

Good Base SDK

In my case this issue born bug of XCODE version 13.2.1 .Then I down grade version xcode to 13.1 is can fix this issue I can run app os 12.x.x .

This happened to me when I compiled a C program with a VLA on MacOS 10.15 and then ran it on 10.13. If this is why for you then use malloc() instead.

For me it was because one of the libraries used by the app was built for newer iOS version. Changing the iOS deployment target to 12.2 fixed the crash.

enter image description here

Related