I'm using the binary frameworks from Carthage. And when I attempt to archive my project, I get the following error:
could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '1100.0.20.17.0_0' Reader: '1001.0.46.4_0')', using libLTO version 'LLVM version 10.0.1, (clang-1001.0.46.4)' for architecture armv7
A temporary fix is to revert to version 5.x, or disabling bitcode.
@ntorring Thanks for the report. Please confirm that you're actually building with Xcode 10.2.1. This is an error we'd expect to see building with something before Xcode 10.1.
I only have Xcode 10.2.1 and 11 installed on my system (xcode-select is configured to use Xcode 10.2.1). Archives builds are also failing on Bitrise using an "Xcode 10.2.x, macOS 10.14" stack
I haven't yet been able to reproduce. Is there any additional information in the log about which object file is causing the problem? Did you build your app with Xcode 11 and switch back to Xcode 10 without cleaning DerivedData?
I'm not really using Xcode 11 for anything yet, so i doubt that's what's causing the issue. But I'll try to replicate the problem with a clean project, and see how that goes.
I am also having this issue, with 6.x versions, it seems i'm having it when I try 5.18 or 5.19 as well. were all binaries rebuilt recently?
"App Store Connect Operation Error
ERROR ITMS-90171: “Invalid Bundle Structure - The binary file ‘*.app/Frameworks/Firebase.framework/Firebase’ is not permitted. Your app can’t contain standalone executables"
@pives The Firebase.framework is a placeholder only and should not be linked into the app. See the instructions at https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md#carthage-usage
@paulb777 ugh, i forgot about that after the initial setup, I must've copied it back in .. I put a note in my cartfile to prevent stupid future self from struggling that long with it. Good lookin' out!
We have the exact same problem:
[00:45:29]: ▸ ❌ ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '1100.0.20.17.0_0' Reader: '1001.0.46.4_0')', using libLTO version 'LLVM version 10.0.1, (clang-1001.0.46.4)' for architecture armv7
[00:45:29]: ▸ ❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
We also use binary frameworks from Carthage.
We thought it was due to fact we used Xcode 10.2.0, but we still have the issue with 10.2.1
Producer: '1100.0.20.17.0_0'
@paulb777 According to this list, it matches Xcode 11.0 beta, is it possible you built binaries with Xcode 11?
It's possible, but not intentional. Our build machine should be using 10.1. Also I wasn't able to reproduce.
Which framework does the error come from?
Hard to say as there is not specific error regarding one framework.
But we are using the following frameworks:
I've tried to create a new project with the same Carthage dependencies, but it archives just fine. Maybe Xcode only links frameworks that are being used, otherwise there must be some weird project setting I'm missing 😕
Maybe something left in DerivedData? rm -rf ~/Library/Developer/Xcode/DerivedData/
I've already tried to delete DerivedData without any luck
I am having same report from Xcode.
My app downgrade 6.3.0 to 6.2.0, it can be archived.
FYI:
My Cartfile:
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 6.2.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json" == 6.2.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseFirestoreBinary.json" == 6.2.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseGoogleSignInBinary.json" == 6.2.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" == 6.2.0
6.2.0 is also working fine for me!
I tried mixing the versions, and have isolated my issue to FirebaseAnalyticsBinary.
This configuration archives without issues:
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 6.2.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json" == 6.3.0
Setting Other Linker flags to -ObjC seems to be causing the issue!
@ntorring Thanks for narrowing it down. I now have a strong suspicion of what went wrong in the 6.3.0 packaging. I suspect we did the Carthage packaging without changing the xcode-select from 10.2 to 10.1 and the FirebaseAnalytics binary was built incorrectly.
Same issue here.
I'm using latest version available of each packaging and the following dependencies:
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
binary "https://building42.github.io/Specs/Carthage/iOS/Fabric.json"
binary "https://building42.github.io/Specs/Carthage/iOS/Crashlytics.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseInAppMessagingDisplayBinary.json"
And the error is:
could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '1100.0.20.17.0_0' Reader: '1001.0.46.4_0')', using libLTO version 'LLVM version 10.0.1, (clang-1001.0.46.4)' for architecture arm64
6.4.0 is now published with the fix.
For anyone still running into an error -- Carthage is likely cached and still using 6.3.0. Run this command:
rm -rf ~/Library/Caches/carthage
Then re-run carthage update --platform iOS to pull down 6.4.0. You can verify in your Cartfile.resolved that you have the right version. Happy archiving!
Can confirm that this works for us 👍
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 6.2.0
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"
Thanks @Blackjacx - but the workaround should no longer be necessary now that 6.4.0 is available.
Most helpful comment
I only have Xcode 10.2.1 and 11 installed on my system (xcode-select is configured to use Xcode 10.2.1). Archives builds are also failing on Bitrise using an "Xcode 10.2.x, macOS 10.14" stack