首页 > 解决方案 > XCode 13 构建失败 - XCode 12 工作正常 - 无法构建模块“Darwin”

问题描述

我在使用 XCode 13 构建项目时遇到问题(与 XCode 13.1 和 13.2(测试版)相同的错误消息)。XCode 12.5.1仍然可以正常工作

删除“derivedData”文件夹不会改变错误。我的项目正在与 CMake 生成的另一个 XCode 工作区进行交叉编译。我怀疑这与问题的根本原因有关,因为错误发生在交叉编译之后。该项目使用 Swift 和一些遗留的 Objective-C 代码。失败发生在Compile Swift source files (arm64)->Precompile bridging header (arm64)

以下是错误消息的摘录:

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

你有什么想法我做错了什么或者我应该尝试什么来构建 XCode 13? 感谢您的每一条评论。我急于解决这个问题。

有关错误消息的详细信息:

关于我的环境的详细信息:

标签: iosswiftobjective-cxcodexcode13

解决方案


推荐阅读