1

I have problems building my project with XCode 13 (same error message with XCode 13.1 and 13.2 (beta)). XCode 12.5.1 is still working fine.

Deleting the "derivedData" folder does not change the error. My project is doing some cross compilation with another XCode workspace generated by CMake. I doubt this is related to the root cause of the problem because the error occurs after the cross compilation. The project uses Swift and some legacy Objective-C code. The failure is happening on Compile Swift source files (arm64) -> Precompile bridging header (arm64)

Here is an extract of the error message:

<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];

Do you have any ideas what I am doing wrong or what I should try to get XCode 13 building? Thanks for every comment. I am desperate to fix this problem.

Details on the error message:

Details on my environment:

  • I am using Mac Mini M1
    • the error is the same with Mac Mini with intel
  • Mac OS 11.6
    • upgrading to Mac OS 12 did not help
  • output of brew doctor:
    Your system is ready to brew.
    
  • Selected Command Line Tools:
Coureard
  • 41
  • 5
  • did you update your build system? i also was stuck after update the xcode but after update the legacy build system to new build system and clearing drive data and one more thing removing info.plist from compile source and add again – Muhammad Nawaz Nov 02 '21 at 13:53
  • I checked my project settings: the "Shared Project settings" is set to new build system. The project with the build failure is using the shared build system configuration. I do not think that I have any info.plist in the compilation step. I removed the reference and readded the file. But anyway I cannot see any plist file in the error output I linked (see patebin.com) – Coureard Nov 02 '21 at 16:12
  • Can you build any other projects using these two machines? Even just a simple HelloWorld project with mixed Swift and ObjC to test the build environments. Any differences when building on the command line using xcodebuild vs through XCode? – BenW Nov 04 '21 at 19:26
  • 2
    Yes, this does not seem to be the problem. But I found a workaround: 1. Delete "ModuleCache.noindex" in the "DerivedData" folder 2. Remove the Header Search Paths in Build settings which refer the custom CMake C/C++ libraries 3. run build 4. build will fail 5. revert the changes to the Header Search Paths in Build settings 6. run build -> successful -- This seems to be required each time the content of ModuleCache.noindex gets in a bad state – Coureard Nov 05 '21 at 08:08

0 Answers0