linker command failed with exit code 1-- Newrelic Issue

Viewed 465

Trying to build the Reactinative applications using below command

 xcodebuild -project ios/XxxxXxx.xcodeproj -scheme 
 PXXXXiOSTest -configuration Release -sdk iphonesimulator - 
 derivedDataPath ios/app -UseModernBuildSystem=NO


  error:NewRelicAgent(json_st.cc.o), could not parse object file 

/Users/mkaly001/Devops/7Now/ios/Pods/NewRelicAgent/NewRelicAgent/NewRelicAgent.framework/NewRelicAgent(json_st.cc.o): 'Invalid bitcode version (Producer: '1001.0.46.4.0_0' Reader: '1000.11.45.5_0')', using libLTO version 'LLVM version 10.0.0, (clang-1000.11.45.5)' for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Did following below options:

removed build/ios folder reinstalled pod file did pod update

using Xcode is Version 10.1 (10B61)

1 Answers

although this answer is outdated by a few months it might be worth answering still.

This type of error is caused by the divergence in the compiler version used to archive the NewRelic framework and the one you're building with.

In the error message you have (Producer: '1001.0.46.4.0_0' Reader: '1000.11.45.5_0'), where you can see that the versions don't match.

You can check your current compiler version running by $ llvm-gcc -v in the Terminal.

It's unfortunate that NewRelic doesn't include the Xcode version used in its Release Notes

I would advise to:

  • either go back to a previous version of the Framework

or

  • update your Xcode to the latest version.
Related