模拟器的iPhone应用程序编译失败:llvm-gcc-4.2失败,退出代码为255

我的队友用Restkit的一个新分支编译了应用程序,并且在他的机器上工作正常。 我拉了新的代码后,我无法再在模拟器模式下运行它。

restkit中的供应商代码存在一些错误。

我尝试了在其他qns中讨论过的e解决scheme:改变架构,有效的架构,编译器(到llvm 2.1),以及其他一些设置。

但似乎没有任何工作。 任何意见将不胜感激。

在我们的configuration唯一的主要区别是,他已经在他的xcode上安装了ios5,而我没有它

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 

退出代码255意味着没有find文件,通常像/Developer/usr/bin缺less像ld这样的可执行文件。 要找出哪个文件找不到,打开一个terminal,手动运行这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 

然后它会告诉你它正在寻找的确切文件是缺less的。


我猜是从/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin ,如果你最近升级到Xcode 4.2,仍然有Xcode 4.1安装,我build议从/Developer-4.1/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ to /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/但不要覆盖/replace任何东西,只要复制4.1 dir中的所有内容,而不是/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin


根据这篇文章,这是如何解决缺lessexecvp

看看你的构buildconfiguration。 架构可能有一个inheritance的$(ARCHS_…)值,可以$(ARCHS_…)一个构build错误:

  1. 在Xcode中导航到“生成设置”,并在“体系结构”组中检出值。

  2. 从Architectures字段删除“VALID ARCH”条目以重置设置。 根据需要使用$(ARCHS_STANDARD_32_BIT)armv6armv7值。 $(ARCHS_STANDARD_32_BIT)应该显示armv6 armv7

  3. 在您的相关项目中重复这些步骤。