2011-10-20 22 views
1

我的隊友用Restkit的一個新分支編譯應用程序,並且在他的機器上工作正常。在我拉出新代碼後,我無法再以模擬器模式運行它。模擬器的iPhone應用程序編譯失敗:llvm-gcc-4.2失敗,退出代碼爲255

restkit中的供應商代碼存在一些錯誤。

我嘗試了其他qns中討論的e解決方案:更改體系結構,有效體系結構,編譯器(轉換爲llvm 2.1)以及其他一些設置。

但似乎沒有工作。任何意見將不勝感激。

在我們的配置中唯一的主要區別是,他安裝了iOS5中對他的Xcode的,雖然我不擁有它

CompileC /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/Objects-normal/armv6/NXJsonParser.o Vendor/NXJSON/NXJsonParser.m normal armv6 objective-c com.apple.compilers.llvmgcc42 
    cd /Users/mingyeow/tmp/DailyMus.es/RestKit 
    setenv LANG en_US.US-ASCII 
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -x objective-c -arch armv6 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -fexceptions -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -iquote /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-generated-files.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-own-target-headers.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-all-target-headers.hmap -iquote /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-project-headers.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Products/Debug-iphonesimulator/include -IVendor/NSJSON -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/DerivedSources/armv6 -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/DerivedSources -F/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Products/Debug-iphonesimulator -c /Users/mingyeow/tmp/DailyMus.es/RestKit/Vendor/NXJSON/NXJsonParser.m -o /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/Objects-normal/armv6/NXJsonParser.o 

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/ 
bin/llvm-gcc-4.2 failed with exit code 255 

回答

4

退出代碼255意味着文件沒有被發現,平時喜歡ld的可執行文件是從/Developer/usr/bin丟失。要找出哪個文件無法找到打開終端,並手動運行這些4個命令(從錯誤日誌):

cd /Users/mingyeow/tmp/DailyMus.es/RestKit 
export LANG=en_US.US-ASCII 
export PATH="/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -x objective-c -arch armv6 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -fexceptions -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -iquote /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-generated-files.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-own-target-headers.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-all-target-headers.hmap -iquote /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-project-headers.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Products/Debug-iphonesimulator/include -IVendor/NSJSON -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/DerivedSources/armv6 -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/DerivedSources -F/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Products/Debug-iphonesimulator -c /Users/mingyeow/tmp/DailyMus.es/RestKit/Vendor/NXJSON/NXJsonParser.m -o /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/Objects-normal/armv6/NXJsonParser.o 

然後,它會告訴你它正在尋找一個缺少確切的文件。


即時猜測的東西是從/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin丟失,如果您最近升級到了XCode 4.2,仍然有xcode的4.1安裝,我建議複製一切從/Developer-4.1/Platforms/iPhoneSimulator.platform/Developer/usr/bin//Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/,但沒有覆蓋/更換任何東西,只是複製一切,是在4.1 dir但不在/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin


根據this article這是如何解決缺少execvp

退房生成配置。該架構可能有一個繼承$(ARCHS_…)值能發射生成錯誤:

  1. 導航打造的Xcode設置和架構組中檢查出的值。

  2. 從「體系結構」字段中刪除「VALID ARCH」條目以重置設置。根據需要使用$(ARCHS_STANDARD_32_BIT)armv6,armv7值。 $(ARCHS_STANDARD_32_BIT)應顯示armv6 armv7

  3. 在您的相關項目中重複這些步驟。

+0

感謝您的回答!我試着運行它,這就是我所得到的。本質上execvp丟失 llvm-gcc-4.2:嘗試執行錯誤'/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin11-llvm -gcc-4.2':execvp:沒有這樣的文件或目錄 –

+0

@mingyeow - 要修復缺少的execvp,檢查我的答案編輯,或者在這裏看到這篇文章:http://www.weston-fl.com/blog/?p = 3062 – chown

+0

我之前曾嘗試過,只是再次嘗試過。它似乎沒有工作。仍然出於同樣的原因失敗。我附上了我的配置文件的屏幕截圖 –

相關問題