Reputation: 1995
I have a simple iOS swift 3 project, running in XCode 8.1 (8B62), that compile fine, and execute as well. Push it on my SVN repo, and my colleague get it, working too. All is OK.
We have to add a pod, so done it. (the pod is a little log tool based on Cocoa Lumber jack, and is used from long time over all of our projects) My 2 colleagues make it work in few minutes. But, I get the linker fails error. The linker error is about -lCocoaLumberjack, but if I add any other pod instead, the first pod encountered by the linker make it crash.
I have tried every trick proposed on other similar questions, clean project, clear derived data, restart xcode, change architecture parameters, clean pods, deintegrate pod, clean the tests host, removed tests target ... a thousand times
I have deleted the project, and download it back from repo, and get the same problem.
I have also updated cocoapods to v1.1.1. (same as my colleagues). use_frameworks! or not never seems to do something different.
Since my colleagues has the exact same projets, sources, and pods, i think i can exclude project, workspace, build configuration/settings errors. So where can i check additional configurations about linker, xcode, or environnement variables that could cause the problem ?
Thank you for any help
log from the linker if it could help :
Ld /Users/romain/Library/Developer/Xcode/DerivedData/Inwebo-cjsvoynkmpchgtfqkxxactulxfci/Build/Products/Debug-iphoneos/Inwebo.framework/Inwebo normal arm64
cd /Users/romain/Documents/Projects/MMXComponents/Inwebo/trunk
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 arm64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk -L/Users/romain/Library/Developer/Xcode/DerivedData/Inwebo-cjsvoynkmpchgtfqkxxactulxfci/Build/Products/Debug-iphoneos -L/Users/romain/Library/Developer/Xcode/DerivedData/Inwebo-cjsvoynkmpchgtfqkxxactulxfci/Build/Products/Debug-iphoneos/CocoaLumberjack -L/Users/romain/Library/Developer/Xcode/DerivedData/Inwebo-cjsvoynkmpchgtfqkxxactulxfci/Build/Products/Debug-iphoneos/Logger -L/Users/romain/Documents/Projects/MMXComponents/Inwebo/trunk/Inwebo/iwlib -F/Users/romain/Library/Developer/Xcode/DerivedData/Inwebo-cjsvoynkmpchgtfqkxxactulxfci/Build/Products/Debug-iphoneos -filelist /Users/romain/Library/Developer/Xcode/DerivedData/Inwebo-cjsvoynkmpchgtfqkxxactulxfci/Build/Intermediates/Inwebo.build/Debug-iphoneos/Inwebo.build/Objects-normal/arm64/Inwebo.LinkFileList -install_name @rpath/Inwebo.framework/Inwebo -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/romain/Library/Developer/Xcode/DerivedData/Inwebo-cjsvoynkmpchgtfqkxxactulxfci/Build/Intermediates/Inwebo.build/Debug-iphoneos/Inwebo.build/Objects-normal/arm64/Inwebo_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/romain/Library/Developer/Xcode/DerivedData/Inwebo-cjsvoynkmpchgtfqkxxactulxfci/Build/Intermediates/Inwebo.build/Debug-iphoneos/Inwebo.build/Objects-normal/arm64/Inwebo.swiftmodule -ObjC -lCocoaLumberjack -lLogger -lmaccess -lPods-Inwebo -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/romain/Library/Developer/Xcode/DerivedData/Inwebo-cjsvoynkmpchgtfqkxxactulxfci/Build/Intermediates/Inwebo.build/Debug-iphoneos/Inwebo.build/Objects-normal/arm64/Inwebo_dependency_info.dat -o /Users/romain/Library/Developer/Xcode/DerivedData/Inwebo-cjsvoynkmpchgtfqkxxactulxfci/Build/Products/Debug-iphoneos/Inwebo.framework/Inwebo
ld: library not found for -lCocoaLumberjack
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Podfile :
platform :ios, '8.0'
inhibit_all_warnings!
#use_frameworks!
# ――― Pre-Install ――――――――――――――――――― #
plugin 'cocoapods-art', :sources => [
'master',
'cocoapods-psa'
]
# ――― Install ―――――――――――――――――――――― #
def shared_pods
pod 'Logger', '~> 1.0'
end
target 'Inwebo' do
shared_pods
end
Upvotes: 1
Views: 197
Reputation: 1995
Last chance today, I have uninstalled and reinstalled Xcode. That's solve the problem. I only can suppose that it was somehow corrupted.
Upvotes: 1
Reputation: 161
Try to reverse the option and try again (If it is on , off it else vice-versa)
This problem sometimes occurs due to mismatch of "Enable Bitcode" option between your project and libraries.
Upvotes: 1