<module-includes>:1:9: note: in file included from <module-includes>:1: #import "LibcOverlayShims.h" ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/shims/LibcOverlayShims.h:66:10: error: use of undeclared identifier 'errno' return errno; ^ <module-includes>:1:9: note: in file included from <module-includes>:1: #import "LibcOverlayShims.h" ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/shims/LibcOverlayShims.h:70:3: error: use of undeclared identifier 'errno' errno = value; ^ <unknown>:0: error: could not build Objective-C module 'SwiftOverlayShims'
When attempting to compile my app, I’m getting this error from the SDK itself. It almost seems like errno.h isn’t included, but I can see that it is on line 33 of that file. I’ve tried the usual derived data delete, product clean, reinstall Xcode, reboot. I’ve tried stripping parts out of the app to try to see what’s causing it, but haven’t gotten very far.
An archive of the app appears to trigger it. Running in debug mode is perfectly fine, then I archive and it breaks it. Trying to run from debug again fails. Making random changes to the project file, then running a
git reset --hard sometimes then allows debug to work again until I try to archive. It seems like something is wrong with the release settings that then carries over into subsequent debug builds (even with a clean). With the last few builds, even the git hard reset isn't enough and the compile is totally failing.