2

在 Jenkins 下出现以下错误。使用 Xcode 和/或其他命令行构建在同一台机器上手动构建工作正常。我认为这与 IOS 6.0 / Xcode 升级有关,因为在此之前它运行良好。顶级项目未使用 armv7 和有效架构 armv7 的架构集进行编译。当使用 Xcode 在同一台机器上手动完成时,这对于 V6.0 模拟器和设备来说构建和运行良好。

 CompileC build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/Objects-  normal/armv7/MyAppAgent_vers.o build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/DerivedSources/MyAppAgent_vers.c normal armv7 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent
setenv LANG en_US.US-ASCII
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch armv7 -fmessage-length=0 -std=gnu99 -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DNDEBUG=1, -DCORDOVA_FRAMEWORK=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -fexceptions -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -mios-simulator-version-min=5.0 -iquote /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/MyAppAgent-generated-files.hmap -I/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/MyAppAgent-own-target-headers.hmap -I/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/MyAppAgent-all-target-headers.hmap -iquote /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/MyAppAgent-project-headers.hmap -iquote../../../Include -iquote../../../Include/logging -iquote../../../Include/messaging -iquote../../../Include/networking -iquote../../../Include/platform -I/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Builds/MyAppAgent/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/DerivedSources/armv7 -I/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/DerivedSources -F/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Builds/MyAppAgent -F/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/../../../../SDK -F/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/../../../../SDK -MMD -MT dependencies -MF /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/Objects-normal/armv7/MyAppAgent_vers.d --serialize-diagnostics /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/Objects-normal/armv7/MyAppAgent_vers.dia -c /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/DerivedSources/MyAppAgent_vers.c -o /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/Objects-normal/armv7/MyAppAgent_vers.o

clang: error: invalid architecture 'arm' for deployment target '-mios-simulator-version-min=5.0'

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
4

2 回答 2

1

如果您使用模拟器 SDK 构建,请确保 CPU 架构设置为 i386。

于 2012-10-02T17:59:00.570 回答
0

使用新版本的 Xcode,i386 Architectures 的默认设置包括新的 iphone 5 armv7s。我们链接的一些项目不包括 armv7s,我们正在窃听。需要将工作区(在我们的例子中)更改为不是默认的拱门,而是仅指定 armv7。

于 2012-11-02T18:12:48.700 回答