在构建Archive时,clang在退出代码1时失败,在构建Debug时工作

时间:2011-12-04 19:52:37

标签: ios xcode xcode4.2 clang

我的构建设置显示了我的Developer配置配置文件以及Release和Distribution方案的Distribution配置文件。我已经验证我的分发配置文件是最新的,并且在2012年8月之前不会过期,所以这不是问题。

Ld /Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/IntermediateBuildFilesPath/MyAppName.build/Release-iphoneos/MyAppName.build/Objects-normal/armv6/MyAppName normal armv6
    cd /Users/kenny/MyLib2/svn-MyAppName-iOS/trunk/MyAppName
    setenv IPHONEOS_DEPLOYMENT_TARGET 3.2
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -L/Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/BuildProductsPath/Release-iphoneos -L/Users/kenny/MyLib2/svn-MyAppName-iOS/trunk/MyAppName -L/Users/kenny/MyLib2/svn-MyAppName-iOS/trunk/MyAppName/../../../svn-Flurry/trunk/FlurryLib -F/Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/BuildProductsPath/Release-iphoneos -filelist /Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/IntermediateBuildFilesPath/MyAppName.build/Release-iphoneos/MyAppName.build/Objects-normal/armv6/MyAppName.LinkFileList -dead_strip -ObjC -all_load -miphoneos-version-min=3.2 -weak_framework Twitter /Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/BuildProductsPath/Release-iphoneos/libfacebook_ios_sdk.a -lMyLib_Networking -lMyLib_AdWhirl -lMyLib_ApplicationCore -lMyLib_Audio -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -framework AudioToolbox -framework SystemConfiguration -weak_framework iAd -framework QuartzCore -framework CoreLocation -framework AVFoundation -framework MapKit -lsqlite3 -lz -framework MediaPlayer -framework MessageUI -lFlurry -o /Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/IntermediateBuildFilesPath/MyAppName.build/Release-iphoneos/MyAppName.build/Objects-normal/armv6/MyAppName

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1

它不提供错误消息,只是提供退出代码消息。

我搜索了Apple论坛和Stack Overflow,但是其他帖子都有一些真正的链接器错误,比如重复符号,或者它们没有像我这样的错误,但是他们没有答案。< / p>

我正在使用Xcode 4.2。

帮助?

3 个答案:

答案 0 :(得分:3)

看起来这个问题与子项目的架构设置有关。 Xcode 4.2将默认架构更改为armv7而不是armv6和armv7。我已将我的主项目更新为armv6和armv7,但子项目仍然只使用armv7。一旦我更新了所有子项目,它就开始正确连接。

答案 1 :(得分:1)

该错误说明并没有真正说明任何内容,它太通用了。 尝试查找更多内容,例如在Mac OS X控制台输出中。

以下是我对“退出代码1”的一些体验:create new configuration并检查cerfitifate trust details are system default

答案 2 :(得分:0)

如果您使用xcodebuild编译项目以开始调试,您可以运行命令:

/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -L/Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/BuildProductsPath/Release-iphoneos -L/Users/kenny/MyLib2/svn-MyAppName-iOS/trunk/MyAppName -L/Users/kenny/MyLib2/svn-MyAppName-iOS/trunk/MyAppName/../../../svn-Flurry/trunk/FlurryLib -F/Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/BuildProductsPath/Release-iphoneos -filelist /Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/IntermediateBuildFilesPath/MyAppName.build/Release-iphoneos/MyAppName.build/Objects-normal/armv6/MyAppName.LinkFileList -dead_strip -ObjC -all_load -miphoneos-version-min=3.2 -weak_framework Twitter /Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/BuildProductsPath/Release-iphoneos/libfacebook_ios_sdk.a -lMyLib_Networking -lMyLib_AdWhirl -lMyLib_ApplicationCore -lMyLib_Audio -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -framework AudioToolbox -framework SystemConfiguration -weak_framework iAd -framework QuartzCore -framework CoreLocation -framework AVFoundation -framework MapKit -lsqlite3 -lz -framework MediaPlayer -framework MessageUI -lFlurry -o /Users/kenny/Library/Developer/Xcode/DerivedData/MyAppName-fxknidnbrepotqdvhgjnepxdhonz/ArchiveIntermediates/BalanceSheet/IntermediateBuildFilesPath/MyAppName.build/Release-iphoneos/MyAppName.build/Objects-normal/armv6/MyAppName
单独

并添加-v标志,以便clang将打印出它在内部执行的命令。在这种情况下,它可能运行/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld

您还可以使用xcodebuild再次运行Debug序列,并查看与Archive相比它的功能。

希望这给出了一些如何调试构建过程的指示。