10

ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '902.0.39.2_0' Reader: '900.0.39.2_0')', using libLTO version 'LLVM version 9.0.0, (clang-900.0.39.2)' for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Note: - Enable Bitcode to No in Build Settings. Apple Reject on uploading build to itune.

4 Answers 4

3

I've never seen this error before, but it looks to me like you are linking against a library that was pre-build with a newer, and unfortunately incompatible, compiler version.

The only options I can think of are to update your compiler or rebuild the library.

I would imagine this library isn't building by you, or you'd have tried that already. So, your only option seems to be updating your version of Xcode to be at least the same as was used for this library.

Sign up to request clarification or add additional context in comments.

2 Comments

Often that means upgrading your OSX to a version that supports a newer XCode, e.g. OSX 10.14 Mojave can only run XCode 11.3.1. You'd have to upgrade to Catalina to go higher. Exact details here... en.wikipedia.org/wiki/Xcode For anyone doing this, good luck clearing space on yr hard drive, backing up overnight and downloading massive OSX and XCode installation files!
Are there any easy ways to identify which library has the problematic prebuilt bitcode? An acquaintance has run into this problem with a react-native application where they're building in a CI/CD pipeline on a cloud hosted mac build agent and they're unable to update the xcode/compiler version. I was hoping I could give them some suggestions to identify the library, which is likely a 3rd party RN dependency, that doesn't require trying to include/exclude one dependency at a time.
1

Due to this is the first question about such error in the web I have to say that such a problem may occur when you implement Google Firebase without exact version.

E.g. for Carthage: binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"

use

binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 5.20.0

1 Comment

Last I checked the version 'Firebase iOS 6.2.0' is working, latest 6.3.0 isn't.
0

I got this error while I compiled my code with Xcode 11.2.1 and later tried to make the build file (.ipa) for distribution by using Xcode 10.3.

So making the build file by using Xcode 11.2.1 fixed the issue.

Comments

0

I had the same problem and my workaround was:

To set "Enable Bitcode" to "No" in XCode project Build Settings.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.