swiftc compilation error: unknown type name 'task_id_token_t'

Hi,

I have an Apple M1 based MacBook Pro with
Big Suf 11.3.1 (20E241)
and Xcode Version 12.5 (12E262)

When I tried to compile some simple swift program and import Foundation, I got several unknown type name error. Looking at these symbols, they are all introduced in 11.3+ kernel. I wonder if I have a mismatched toolchain to compile trivial program?






It looks like MacOSX11.3.sdk shipped with some missing headers by Xcode 12.5.
I downloaded MacOSX11.1.sdk.tar.xz from https://github.com/phracker/MacOSX-SDKs/releases and set my SDKROOT environment variable, and was able to compile the simple program.

Please update a new SDK :)
swiftc compilation error: unknown type name 'task_id_token_t'
 
 
Q