2012-10-08 57 views
7

更新後的Xcode 4.5版本,我有Xcode4.5彙編編譯失敗是Xcode4.4處理完美

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

我讀到更新後的錯誤是這樣,但在目標的改變架構構建一個錯誤文件設置沒有幫助。它在模擬器上工作,但不在設備上。

整個錯誤

CompileC /Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Intermediates/Jasiu2.build/Debug-iphoneos/Jasiu2.build/Objects-normal/armv7/maxvid_decode_arm.o Classes/AVAnimator/maxvid_decode_arm.s normal armv7 assembler-with-cpp com.apple.compilers.llvm.clang.1_0.compiler cd /Users/psitkowski/Xcode/ksiazki/kopie/Jasiu2 setenv LANG en_US.US-ASCII setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 assembler-with-cpp -arch armv7 -fmessage-length=0 -Wno-trigraphs -fpascal-strings -O0 -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 -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -Wdeprecated-declarations -g -Wno-sign-conversion -miphoneos-version-min=5.1 -iquote /Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Intermediates/Jasiu2.build/Debug-iphoneos/Jasiu2.build/Jasiu2-generated-files.hmap -I/Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Intermediates/Jasiu2.build/Debug-iphoneos/Jasiu2.build/Jasiu2-own-target-headers.hmap -I/Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Intermediates/Jasiu2.build/Debug-iphoneos/Jasiu2.build/Jasiu2-all-target-headers.hmap -iquote /Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Intermediates/Jasiu2.build/Debug-iphoneos/Jasiu2.build/Jasiu2-project-headers.hmap -I/Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Products/Debug-iphoneos/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/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Intermediates/Jasiu2.build/Debug-iphoneos/Jasiu2.build/DerivedSources/armv7 -I/Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Intermediates/Jasiu2.build/Debug-iphoneos/Jasiu2.build/DerivedSources -F/Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Products/Debug-iphoneos -MMD -MT dependencies -MF /Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Intermediates/Jasiu2.build/Debug-iphoneos/Jasiu2.build/Objects-normal/armv7/maxvid_decode_arm.d --serialize-diagnostics /Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Intermediates/Jasiu2.build/Debug-iphoneos/Jasiu2.build/Objects-normal/armv7/maxvid_decode_arm.dia -c /Users/psitkowski/Xcode/ksiazki/kopie/Jasiu2/Classes/AVAnimator/maxvid_decode_arm.s -o /Users/psitkowski/Library/Developer/Xcode/DerivedData/Jasiu2-gskaidiujznurtdqnebvtogjtdnd/Build/Intermediates/Jasiu2.build/Debug-iphoneos/Jasiu2.build/Objects-normal/armv7/maxvid_decode_arm.o

/Users/psitkowski/Xcode/ksiazki/kopie/Jasiu2/Classes/AVAnimator/maxvid_decode_arm.s:65:2: error: invalid instruction strneh r8, [r10], #2 ^

... About 100 lines like above ... /Users/psitkowski/Xcode/ksiazki/kopie/Jasiu2/Classes/AVAnimator/maxvid_decode_arm.s:474:2: error: invalid instruction stmeqia r10!, {r0, r1}^Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

我有一個錯誤,如在此之前,當我忘了在構建階段添加libz.dylib。 你有什麼想法如何解決它?

非常感謝,

+0

你是否得到這個修正,我有同樣的確切問題 – yeahdixon

回答

9

是的,Xcode 4.5做了一些改變,打破了ASM代碼的編譯。修復很簡單,只需將-no-integrated-as標誌添加到AVAnimator中maxvid_decode_arm.s文件的編譯選項即可。

像這樣:

選擇在列出的文件左側窗口中的工程文件(這是一個在與藍色圖標的頂部)。

在「TARGETS」列表中選擇您的目標。

選擇「Build Phases」選項卡。

雙擊maxvid_decode_arm.s,然後添加-no-integrated-通過粘貼到出現的列表中。

+0

你是一個救生員 – yano

+1

感謝 - 這真的有幫助:對於谷歌,我們需要將此添加到JScocoa以及 – LordT

+0

maxvid_decode_arm.si不能在xcode 4.5中構建這個關鍵字階段標籤 – Raju

1

的錯誤就很明顯了 - 在max_vid_decode.s了兩個彙編指令的格式不正確:

strneh r8, [r10], #2 
stmeqia r10!, {r0, r1} 

大概彙編程序規範收緊,和代碼是略無以前工作。查找armv7彙編程序文檔並閱讀這兩個命令,並使其符合要求。

+0

我在寫作中犯了一個錯誤,因爲我沒有複製整個錯誤,而是幾乎完整。我想念這樣的行> /Users/psitkowski/Xcode/ksiazki/kopie/Jasiu2/Classes/AVAnimator/maxvid_decode_arm.s:65:2:error:invalid instruction strneh r8,[r10],#2^ beacuse compiler see每個指令中的錯誤 – user1595102

+1

你真的需要徹底重組這個問題。我相信你所說的會有一個標題,如「Xcode4.5彙編器無法編譯Xcode4.4完美處理的文件」。我建議你也將其發佈在Apple Xcode listserv上。 –