ibireme / YYKit

A collection of iOS components.
MIT License
13.99k stars 3.69k forks source link

Clang error when archiving with Xcode. #233

Open tonyh2021 opened 8 years ago

tonyh2021 commented 8 years ago

Xcode7.2,使用YYKit 1.0.7版本。archiving时会有以下错误。但是降回到1.0.3版本就可以archiving成功。

Ld /Users/username/Library/Developer/Xcode/DerivedData/projectname-bqlyiqeeeroormbbxrpoxhltgxmn/Build/Intermediates/ArchiveIntermediates/projectname/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/YYKit.build/Objects-normal/armv7/YYKit normal armv7
    cd /Users/username/Documents/iworkspace/projectname_2.0.0/projectname/Pods
    export IPHONEOS_DEPLOYMENT_TARGET=8.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -L/Users/username/Library/Developer/Xcode/DerivedData/projectname-bqlyiqeeeroormbbxrpoxhltgxmn/Build/Intermediates/ArchiveIntermediates/projectname/BuildProductsPath/Release-iphoneos -F/Users/username/Library/Developer/Xcode/DerivedData/projectname-bqlyiqeeeroormbbxrpoxhltgxmn/Build/Intermediates/ArchiveIntermediates/projectname/BuildProductsPath/Release-iphoneos -F/Users/username/Documents/iworkspace/projectname_2.0.0/projectname/Pods/YYKit/Vendor -filelist /Users/username/Library/Developer/Xcode/DerivedData/projectname-bqlyiqeeeroormbbxrpoxhltgxmn/Build/Intermediates/ArchiveIntermediates/projectname/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/YYKit.build/Objects-normal/armv7/YYKit.LinkFileList -install_name @rpath/YYKit.framework/YYKit -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/username/Library/Developer/Xcode/DerivedData/projectname-bqlyiqeeeroormbbxrpoxhltgxmn/Build/Intermediates/ArchiveIntermediates/projectname/BuildProductsPath/Release-iphoneos -lsqlite3 -lz -framework Accelerate -framework AssetsLibrary -framework CoreFoundation -framework CoreGraphics -framework CoreImage -framework CoreText -framework ImageIO -framework MobileCoreServices -framework QuartzCore -framework SystemConfiguration -framework UIKit -framework WebP -fobjc-arc -fobjc-link-runtime -framework Accelerate -framework AssetsLibrary -framework CoreFoundation -framework CoreGraphics -framework CoreImage -framework CoreText -framework Foundation -framework ImageIO -framework MobileCoreServices -framework QuartzCore -framework SystemConfiguration -framework UIKit -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/username/Library/Developer/Xcode/DerivedData/projectname-bqlyiqeeeroormbbxrpoxhltgxmn/Build/Intermediates/ArchiveIntermediates/projectname/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/YYKit.build/Objects-normal/armv7/YYKit_dependency_info.dat -o /Users/username/Library/Developer/Xcode/DerivedData/projectname-bqlyiqeeeroormbbxrpoxhltgxmn/Build/Intermediates/ArchiveIntermediates/projectname/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/YYKit.build/Objects-normal/armv7/YYKit

clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
ibireme commented 8 years ago

清除缓存、DerivedData。

tonyh2021 commented 8 years ago

清除缓存并没有解决问题。最后我把YYKit的Enable Bitcode设置成NO就可以archive成功。但是其他的Pods(包括以前的1.0.3版本)都没做过这个改动。

ibireme commented 8 years ago

yykit 默认是支持 bitcode 的,这块儿可能与 archive 过程有关吧。。比较奇怪。。

momo25 commented 8 years ago

我刚也是这样,然后看到你的改成1.0.3就好了

tonyh2021 commented 8 years ago

@momo25 你试下用1.0.7的时候,将YYKit的bitcode设置为NO呢?我想看下我前面的解决方法是不是通用的。

Uploading QQ20160623.png…

PS:刚才关闭错了。

lalabye commented 8 years ago

@lettleprince 我试了一下 这样做不行

tonyh2021 commented 8 years ago

@lalabye 降回到1.0.3版本呢?