Post

Replies

Boosts

Views

Activity

Xcode 13 compiling error - corrupted ModuleCache.noIndex - Xcode 12 working fine
Description: Precompile bridging header fails (see attached "build_error.png") The failure is happening on Compile Swift source files (arm64) -> Precompile bridging header (arm64) Please list the steps you took to reproduce the issue: build / run project workaround: Delete "ModuleCache.noindex" in the "DerivedData" folder Remove the Header Search Paths in Build settings which refer the custom CMake C/C++ libraries run build build will fail because of missing headers revert the changes to the Header Search Paths in Build settings run build -> successful -- This seems to be required each time the content of ModuleCache.noindex gets in a bad state things we tried: clean build (on project itself and on the third party project) removing the third party CMake Xcode project seems to not have problem building the bridging header delete the "derived_data" folder reinstall Xcode What version of Xcode are you using? Xcode Version 13.1 (13A1030d) Environment: project is working fine with Xcode 12.5.1 running Mac OS 11 project fails with same error with Xcode 13.0 and 13.1 running Mac OS 11 or Mac OS 12 fails on M1 and x86 Mac minis project includes a third party C/C++ Xcode project which is generated by CMake project consists of objective-c and swift code Initially I reported the problem on Stackoverflow (without success): https://stackoverflow.com/questions/69811551/xcode-13-build-failure-xcode-12-working-fine-could-not-build-module-darwin What did you expect to happen? project builds successful without workaround What actually happened? Precompile bridging header fails (see attached "build_error.png") excerpt of the error log: <module-includes>:392:9: note: in file included from <module-includes>:392: #import "netinet6/ipsec.h" ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/include/netinet6/ipsec.h:132:2: error: unknown type name 'uuid_string_t'; did you mean 'io_string_t'? uuid_string_t wake_uuid; ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/include/device/device_types.h:89:33: note: 'io_string_t' declared here typedef char io_string_t[512]; buildlog.txt
2
0
4.9k
Nov ’21