【发布时间】:2020-12-08 10:05:12
【问题描述】:
在带有新 xcode 项目的新 mac 中,我们可以在 xcode 中构建它,但它会因xcodebuild 而失败。
命令是:xcodebuild build -project hello.xcodeproj -sdk iphonesimulator。
这是构建日志:
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild build -project hello.xcodeproj -sdk iphonesimulator
Build settings from command line:
SDKROOT = iphonesimulator14.2
note: Using new build system
note: Planning build
note: Constructing build description
WriteAuxiliaryFile /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ (iOS).build/DerivedSources/Entitlements.plist (in target 'hello (iOS)' from project 'hello')
cd /Users/xxx/develop/hello
write-file /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources/Entitlements.plist
WriteAuxiliaryFile /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ (iOS).build/DerivedSources/Entitlements-Simulated.plist (in target 'hello (iOS)' from project 'hello')
cd /Users/xxx/develop/hello
write-file /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources/Entitlements-Simulated.plist
ProcessProductPackaging "" /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ (iOS).build/hello.app-Simulated.xcent (in target 'hello (iOS)' from project 'hello')
cd /Users/xxx/develop/hello
...
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'hello (iOS)' from project 'hello')
cd /Users/xxx/develop/hello
export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name hello -O -whole-module-optimization -enforce-exclusivity\=checked @/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/hello.SwiftFileList -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk -target arm64-apple-ios14.0-simulator -g -Xfrontend -serialize-debugging-options -swift-version 5 -I /Users/xxx/develop/hello/build/Release-iphonesimulator -F /Users/xxx/develop/hello/build/Release-iphonesimulator -c -num-threads 4 -output-file-map /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/hello\ \(iOS\)-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/hello.swiftmodule -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-generated-files.hmap -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-own-target-headers.hmap -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-all-target-headers.hmap -Xcc -iquote -Xcc /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-project-headers.hmap -Xcc -I/Users/xxx/develop/hello/build/Release-iphonesimulator/include -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources-normal/arm64 -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources/arm64 -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources -emit-objc-header -emit-objc-header-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/hello-Swift.h -working-directory /Users/xxx/develop/hello
CompileSwift normal arm64 (in target 'hello (iOS)' from project 'hello')
cd /Users/xxx/develop/hello
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/xxx/develop/hello/Shared/ContentView.swift /Users/xxx/develop/hello/Shared/helloApp.swift -emit-module-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/hello.swiftmodule -emit-module-doc-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/hello.swiftdoc -emit-module-source-info-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/hello.swiftsourceinfo -serialize-diagnostics-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/hello\ \(iOS\)-master.dia -emit-objc-header-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/hello-Swift.h -emit-dependencies-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/hello\ \(iOS\)-master.d -target arm64-apple-ios14.0-simulator -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk -I /Users/xxx/develop/hello/build/Release-iphonesimulator -F /Users/xxx/develop/hello/build/Release-iphonesimulator -g -swift-version 5 -enforce-exclusivity\=checked -O -serialize-debugging-options -Xcc -working-directory -Xcc /Users/xxx/develop/hello -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-generated-files.hmap -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-own-target-headers.hmap -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-all-target-headers.hmap -Xcc -iquote -Xcc /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-project-headers.hmap -Xcc -I/Users/xxx/develop/hello/build/Release-iphonesimulator/include -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources-normal/arm64 -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources/arm64 -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources -target-sdk-version 14.2 -module-name hello -num-threads 4 -o /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/ContentView.o -o /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/arm64/helloApp.o
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "sys/cdefs.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33:
#include <machine/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_blksize_t; /* preferred block size */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_dev_t; /* dev_t */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean 'uint64_t'?
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here
typedef unsigned long long uint64_t;
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'
typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:52:
#include <sys/_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53:
#include <sys/_types/_intptr_t.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:30:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:30:
#include <machine/types.h> /* __darwin_intptr_t */
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
^
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/copyfile.h:36:
#include <stdint.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdint.h:53:
#include <sys/_types/_intptr_t.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_intptr_t.h:32:9: error: unknown type name '__darwin_intptr_t'
typedef __darwin_intptr_t intptr_t;
^
<module-includes>:6:9: note: in file included from <module-includes>:6:
#import "ctype.h"
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/ctype.h:69:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/ctype.h:69:
#include <_ctype.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_ctype.h:70:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_ctype.h:70:
#include <runetype.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/runetype.h:42:10: note: in file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/runetype.h:42:
#include <_types.h>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_wctype_t;
^
<unknown>:0: error: too many errors emitted, stopping now
<unknown>:0: error: could not build Objective-C module 'Darwin'
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'hello (iOS)' from project 'hello')
cd /Users/xxx/develop/hello
export DEVELOPER_DIR\=/Applications/Xcode.app/Contents/Developer
export SDKROOT\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name hello -O -whole-module-optimization -enforce-exclusivity\=checked @/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/hello.SwiftFileList -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk -target x86_64-apple-ios14.0-simulator -g -Xfrontend -serialize-debugging-options -swift-version 5 -I /Users/xxx/develop/hello/build/Release-iphonesimulator -F /Users/xxx/develop/hello/build/Release-iphonesimulator -c -num-threads 4 -output-file-map /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/hello\ \(iOS\)-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/hello.swiftmodule -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-generated-files.hmap -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-own-target-headers.hmap -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-all-target-headers.hmap -Xcc -iquote -Xcc /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-project-headers.hmap -Xcc -I/Users/xxx/develop/hello/build/Release-iphonesimulator/include -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources-normal/x86_64 -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources/x86_64 -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources -emit-objc-header -emit-objc-header-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/hello-Swift.h -working-directory /Users/xxx/develop/hello
CompileSwift normal x86_64 (in target 'hello (iOS)' from project 'hello')
cd /Users/xxx/develop/hello
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/xxx/develop/hello/Shared/ContentView.swift /Users/xxx/develop/hello/Shared/helloApp.swift -emit-module-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/hello.swiftmodule -emit-module-doc-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/hello.swiftdoc -emit-module-source-info-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/hello.swiftsourceinfo -serialize-diagnostics-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/hello\ \(iOS\)-master.dia -emit-objc-header-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/hello-Swift.h -emit-dependencies-path /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/hello\ \(iOS\)-master.d -target x86_64-apple-ios14.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk -I /Users/xxx/develop/hello/build/Release-iphonesimulator -F /Users/xxx/develop/hello/build/Release-iphonesimulator -g -swift-version 5 -enforce-exclusivity\=checked -O -serialize-debugging-options -Xcc -working-directory -Xcc /Users/xxx/develop/hello -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-generated-files.hmap -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-own-target-headers.hmap -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-all-target-headers.hmap -Xcc -iquote -Xcc /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/hello-project-headers.hmap -Xcc -I/Users/xxx/develop/hello/build/Release-iphonesimulator/include -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources-normal/x86_64 -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources/x86_64 -Xcc -I/Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/DerivedSources -target-sdk-version 14.2 -module-name hello -num-threads 4 -o /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/ContentView.o -o /Users/xxx/develop/hello/build/hello.build/Release-iphonesimulator/hello\ \(iOS\).build/Objects-normal/x86_64/helloApp.o
Command CompileSwift failed with a nonzero exit code
我们曾尝试删除CommandLineTool 文件夹,并使用xcode-select --install 重新安装它。但什么都没有改变。
我们如何修理机器?谢谢。
【问题讨论】:
标签: xcode macos compilation xcodebuild