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)
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
After upgrading macOS BigSur to 11.1 and Xcode to 12.3 this morning my MacPorts 2.6.4 distribution started to have problems. I can no longer compile a simple C++ program with the GNU C++ v10.2.0_4:
g++ -O3 -std=c++11 -c libvec.cpp
In file included from /opt/local/include/gcc10/c++/cmath:45,
from libvec.cpp:1:
/opt/local/lib/gcc10/gcc/x86_64-apple-darwin20/10.2.0/include-fixed/math.h:45:10: fatal error: sys/cdefs.h: No such file or directory
45 | #include <sys/cdefs.h>
| ^~~~~~~~~~~~~
compilation terminated.
Preliminary internet search suggests that this problem may be caused by the inconsistency with the Xcode command line tools. Would you please direct me, on how to debug and fix it? Maybe I need to reinstall the MacPorts distribution after such an upgrade? Thank you!
This issue is indeed caused by the macOS update from 11.0 to 11.1 and Xcode update from 12.2 to 12.3. Apple's new policy is to increment the SDK version with each system update. The MacPorts GNU C++ compiler installed with a previous SDK version fails now due to this increment. A quick workaround is to set the SDKROOT environment variable to match the new version number:
export SDKROOT=`xcrun --show-sdk-path`
Place this command into your ~/.profile file for convenience. Detailed issue explanation and this solution may be found in the following thread on MacPorts mailing list.
I am trying to compile with make using c++ on a 10.15 system under Xcode and Command Line Tools 12.2. It keeps wanting to use the 10.15 SDK which does not support arm64. I am thus getting architecture not supported errors.
My make file contains:
SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
and the build command contains:
-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
Curiously:
xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
xcrun --show-sdk-version
xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk" cannot be located.
xcrun: error: unable to lookup item 'SDKVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'
Any ideas? There was a clean install on Xcode 11.7 previously and then I copied 12.2 (replacing 11.7). I have verified that the SDK (v15) exists at /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk and the OSX11 SDK is also in the SDK folder.
A build for x86_64 works fine.
I just update to xCode10 – xCode 9 wasn't returning this error.
Whenever I try to build using openframeworks ios 10.0.0 I receive this error
/clang:-1: linker command failed with exit code 1 (use -v to see invocation)
but calling clang on my terminal I receive this
❯ clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.2) .
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Any idea on how to fix this?
I just encountered a similar issue with building in xCode 10 as well. Following the steps (both removing the flags for quicktime and in my case removing references to the i386 architecture build settings) here fixed it for me: https://forum.openframeworks.cc/t/xcode-10-0-build-errors/30447
Hope this helps!
I'm trying to update an OpenFrameworks project using the Project Generator.
After updating the project, I'm now getting the following error in Xcode 8.2.1:
clang: error: unknown argument: '-mmacosx-version-min'
That flag is found in the Apple LLVM 8.0 - Custom Compiler Flags section of Build Settings in both my Project and Target:
Anyone have an idea on what the issue may be? I'm on macOS 10.12.1 Sierra.
You can remove the -mmacosx-version-min flag; Xcode uses MACOSX_DEPLOYMENT_TARGET.
MACOSX_DEPLOYMENT_TARGET specifies the minimum version of OS X for the build target.
↳ Configuring a Project for SDK-Based Development
I have a strange issue when trying to compile a static library using xcodebuild.
Project's configuration is:
ARCHS = $(ARCHS_STANDARD)
VALID_ARCHS = $ARCHS
It's executed using Xcode 5.1.1.
Now comes the weird part - the project built on machines connected to Jenkins produces fat libary with all 5 architectures (armv7 armv7s arm64, i386, x86_64), but when a build is launched on my (64bit) Mac I'm getting only four - x86_64 is missing. No code change, clean repo, exactly the same build routine.
I wonder what may be causing that difference. I guess it might be some kind of an environment setup on my side, but have no idea what it might be. Project configuration is not under suspicion - it creates proper fat library on a different machine.
I'd be thankful for your advices.
EDIT: No error is thrown either. xcodebuild behaves just like that architecture is not specified - compiles iphonesimulator build just for i386.
Also worth noticing - Xcode creates all architectures, only xcodebuild executed from command line has issues.
Try adding the -destination flag to your xcodebuild command.
xcodebuild -workspace MyWorkspace.xcworkspace -scheme MyScheme -destination 'platform=OS X,arch=x86_64' test
The above is an example from the xcodebuild manual page.
I had a similar issue where I wanted xcodebuild to make an i386 build for simulator and continued to create Armv7 until I added that flag to my command.