2012-10-02 23 views
2

在Jenkins下獲取以下錯誤。手在Xcode和/或其他命令行構建工作正常的同一臺機器上構建。我認爲這與IOS 6.0/Xcode升級有關,因爲在此之前它工作正常。頂級項目沒有針對armv7和Valid Architecture armv7的架構進行編譯。對於V6.0仿真器和設備,這種構建和運行可以在Xcode手動完成的同一臺機器上完成。xcode 4.5,IOS 6.0,Jenkins 1.476,OSX 10.7.5,Cordova/Phone Gap,不會在Jenkins下生成

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 

回答

0

隨着新版本的Xcode,i386架構的默認設置包括新的iphone 5 armv7s。我們鏈接的一些項目不包括armv7s,我們正在竊聽。需要改變Workspace(在我們的例子中)不是默認的arch,而是僅指定armv7。

1

如果您正在使用模擬器SDK構建,請確保CPU架構設置爲i386。

+0

實際上,對我而言,我已將有效架構完全設置爲i386。我已經完成了單獨的目標,創建完全用於構建xcodebuild。這適用於舊版本的Xcode和上面指定的版本。儘管兩者都給出了不同的錯誤。我注意到,將有效架構設置爲「armv7 i386」導致每個架構的每個文件都構建了2次。 – Mateusz