Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Silicon | Xcode 12.3 构建失败 #61

Open
hpyhacking opened this issue Jan 1, 2021 · 6 comments
Open

Apple Silicon | Xcode 12.3 构建失败 #61

hpyhacking opened this issue Jan 1, 2021 · 6 comments

Comments

@hpyhacking
Copy link

我在新电脑上构建 Xcode 12.3 构建时失败,怀疑与我本地的 oepnssl 构建方式有关?

Terminal 在 Open using Rosetta 方式打开,安装 homebrew 后安装的 openssl

In /Users/user/Desktop/bither-ios/Pods/OpenSSL/lib-ios/libcrypto.a(cryptlib.o), 
building for iOS Simulator, but linking in object file built for iOS, 
file '/Users/user/Desktop/bither-ios/Pods/OpenSSL/lib-ios/libcrypto.a' for architecture arm64

下面是错误的全部输出

Showing Recent Messages
Ld /Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/bither-ios.app/bither-ios normal (in target 'bither-ios' from project 'bither-ios')
    cd /Users/user/Desktop/bither-ios
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios9.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk -L/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator -L/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/AFNetworking -L/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/Bitheri -L/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/CocoaLumberjack -L/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/FMDB -L/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/FXBlurView -L/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/KSCrash -L/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/Reachability -L/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/RegexKitLite -L/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/SimpleKeychain -L/Users/user/Desktop/bither-ios/Pods/OpenSSL/lib-ios -F/Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator -F/Users/user/Desktop/bither-ios -filelist /Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Intermediates.noindex/bither-ios.build/Debug-iphonesimulator/bither-ios.build/Objects-normal/arm64/bither-ios.LinkFileList -dead_strip -Xlinker -object_path_lto -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Intermediates.noindex/bither-ios.build/Debug-iphonesimulator/bither-ios.build/Objects-normal/arm64/bither-ios_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lAFNetworking -lBitheri -lCocoaLumberjack -lFMDB -lFXBlurView -lKSCrash -lReachability -lRegexKitLite -lSimpleKeychain -lc++ -lcrypto -licucore -lsqlite3 -lssl -lz -framework Accelerate -framework Foundation -framework MessageUI -framework QuartzCore -framework SystemConfiguration -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Intermediates.noindex/bither-ios.build/Debug-iphonesimulator/bither-ios.build/bither-ios.app-Simulated.xcent -framework LocalAuthentication -framework AudioToolbox -framework QuartzCore -framework CoreGraphics -framework UIKit -framework Foundation -lPods-bither-ios -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Intermediates.noindex/bither-ios.build/Debug-iphonesimulator/bither-ios.build/Objects-normal/arm64/bither-ios_dependency_info.dat -o /Users/user/Library/Developer/Xcode/DerivedData/bither-ios-bfmzoztdyonedsevujanqsbdwheh/Build/Products/Debug-iphonesimulator/bither-ios.app/bither-ios

ld: in /Users/user/Desktop/bither-ios/Pods/OpenSSL/lib-ios/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/user/Desktop/bither-ios/Pods/OpenSSL/lib-ios/libcrypto.a' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@hpyhacking
Copy link
Author

刚看到 OpenSSL 是连接到 bither/OpenSSL 下面了

@nining
Copy link

nining commented Jan 2, 2021

推测是link的时候假定模拟器还是x86架构,但被连接到了arm64架构。其实m1的就应该用arm64架构,那个文件libcrypto.a有4个架构的目标文件(包含x86, arm64等)。
目前没有M1设备,我们后面会用M1设备测试一下。

@nining
Copy link

nining commented Jan 2, 2021

可以尝试重装命令行工具
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
然后使用原生的brew和原生的Cocoapods

@Moreno2124
Copy link

Donde esta depositado

2 similar comments
@Moreno2124
Copy link

Donde esta depositado

@Moreno2124
Copy link

Donde esta depositado

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants