My project use P2PCamera SDK,but not use Cocoapod,then need depend more lib
error: Invalid bitcode signature
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I can build and run success in Xcode8.2,but is error when i use Xcode8.3
I have this issue when I tried to test with iOS device.The debug configuration with Build Active Architecture Only is set to NO. After I set to YES, I can test with my iPhone.
This will resolve the issue surely.
Maybe the issue because of a third party SDK integrated into your project using Cocoapods.
do the following:
Clear derived data & restart Xcode.
Clean & Build.
Or if you don't mind disabling bitcode: Go to build settings search bitcode and change "Enable Bitcode" to "No".
The problem might be with lAVCtrl_armv7 third party library, you can confirm this by editing valid Architecture to arm64 and re-compile.
For me it helped to "update project to recommended settings" & clean:
https://stackoverflow.com/a/47336130/1884907
Related
I'm encountering a build error when I set 'Enable Bitcode' to 'YES' in the build settings of a project I'm currently working on. The error is:
ld: bitcode bundle could not be generated because '/Users/nick/Library/Developer/Xcode/DerivedData/PROJECTNAME-esksqmlmtpqewpbktcqeqloackeu/Build/Intermediates.noindex/PROJECT.build/Debug-iphoneos/PROJECTNAME.build/Objects-normal/arm64/main.o' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build file '/Users/nick/Library/Developer/Xcode/DerivedData/PROJECTNAME-esksqmlmtpqewpbktcqeqloackeu/Build/Intermediates.noindex/PROJECT.build/Debug-iphoneos/PROJECTNAME.build/Objects-normal/arm64/main.o' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
(I've redacted the project name to PROJECTNAME and a variant to PROJECT to post here.)
At first I though it could be due to one of the dependencies this project is using via Cocoapods but they all have 'Enable Bitcode' set to 'YES' and I'd expect to see the name of the offending library in the error message if that was the case. The project uses no frameworks other than those included via Cocoapods (and Apple frameworks).
I've tried deleting the derived data, restarting Xcode as well as clearing the build folder but the error persists.
I've also tried the '-fembed-bitcode-marker' solution as suggested for a similar problem here:
iOS library to BitCode
But I'm not building a static library but an app so perhaps unsurprising it made no difference.
The project is fairly large and has been developed since 2012 so includes Objective-C and Swift. It currently has iOS 8 as deployment target and 11.2 as base SDK. It's never had Bitcode enabled in any dev or production version in the past. We've got Bitcode enabled on similar but more recent projects. We're currently using Xcode 9.2 (9C40b).
I know I could set 'Enable Bitcode' to 'NO' for the project's build settings to 'fix' the error but I'd rather have bitcode enabled for the re-optimisations Apple can do once the binary is uploaded as mentioned here:
Apple Docs - App Thinning
Am I missing a flag in the build settings that fixes this error or perhaps something else? Any advice is much appreciated!
Many thanks,
Nick
After updating to Xcode 10 we tried to generate a Bitcode bundle again for this project and (after trying different build configs) have been able to do so. The config that eventually worked for this project was:
For the Project's and Pod's Build Settings:
'Enable Bitcode' set to 'YES'
Adding '-fembed-bitcode' to 'Other C Flags'
Adding 'BITCODE_GENERATION_MODE' with the value 'bitcode'
These settings were needed for Debug as well as Release. This is because Debug would throw the 'bitcode could not be generated' error (see original question) if we tried to use the '-fembed-bitcode-marker' or 'marker' flags.
We'd have preferred to use the 'marker' variants for Debug as it's quicker to compile but at least we now have something that works!
One of the frameworks I use fails to get built with Bitrise with Xcode9beta stack. I must point out that this is Bitrise-specific issue. Or either, Bitrise/Eureka issue. Eureka is a particular instance of third-party framework.
Project is built well on the local machine, no bitcode-related issues whatsoever. But whenever I run CI, I get that typical log:
❌ ld: bitcode bundle could not be generated because '.../Frameworks/Eureka.framework/Eureka' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '.../Frameworks/Eureka.framework/Eureka' for architecture armv7
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
I followed these guidelines:
iOS library to BitCode
Flag is set.
I have also tried similar settings for head project/target, to no avail.
Any suggestions?
Seems to be a dependency (version) issue:
... was built without full bitcode. All frameworks and dylibs for bitcode must be generated ...
Might be enough to just upgrade the eureka dependency.
Another thing is that Xcode 9 (GM) is also available now, that alone might help.
Edit: a third option; you might have to disable Bitcode in the Xcode / xcodebuild command, as the default changed in Xcode 9 for some configs. See e.g. https://discuss.bitrise.io/t/xcode-archive-significantly-slower-on-xcode-9-0-x-stack-compared-to-xcode-8-3-x-stack/2708/2?u=viktorbenei
Without more log / info unfortunately it's quite hard to say with certainty.
If neither would help, you can also create an issue report at https://discuss.bitrise.io/c/issues/build-issues and the bitrise team will look into it ;)
I am trying to build the project using this as basis :
GitHub code
but it is giving me error when i am trying to archive the project, while running it directly on device is okay. If i turn bitcode to off it makes the build but exit with some error on the iphone because dlib library is not being added needed for detection.
ld: bitcode bundle could not be generated because 'path/lib/libdlib.a(threads_kernel_shared.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I can see there is some problem in generation of dlib library but have no idea how to solve it up.
If anyone can guide me through it, i will be really thankful for the guidance. Thank you.
Try this - Worked for me
Goto Build Settings -> Enable Bitcode -> Select 'No'
And Archive with Generic Device selected.
Select Generic iOS Device while archiving
I'm using a third-party framework which helps me to connect a device(Frameworks device). I'm getting
MySignalsConnectKit' was built without full bitcode. All frameworks
and dylibs for bitcode must be generated from Xcode Archive or Install
build for architecture armv7 clang: error: linker command failed with
exit code 1 (use -v to see invocation)
error while trying to achieving. I can successfully build. I searched it but still can't solve the problem. Thank you!
Problem is probably because your third-party framework wasn't built with bitcode. If your application is archived with "Enable bitcode: YES" than all your frameworks must be built with bitcode also. Try to change it to NO, it may help. But then your archive will not contain bitcode. Better would be to get MySignalsConnectKit built with bitcode and use that build instead of one without bitcode.
Once I seem to have got rid of all the syntax errors, while converting my project to Swift 3.0.
I now hit this one:
ld: '/Users/......./ParseUI.framework/ParseUI(PFLogInViewController.o)' does not contain bitcode.
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE),
obtain an updated library from the vendor, or disable bitcode for this
target. for architecture arm64
clang: error: linker command failed with exit code 1
(use -v to see invocation)
After trying a few option change in Xcode which did not have any effect, I don't see any clear solution to solve this issue.
Anyone has a simple and clear answer to that?
In XCode, Select your project in Explorer > Select your Target> Make "Enable Bitcode" to No. And recompile your code.
If you enable bitcode in your target, then all the pods need to have enabled bitcode. But in your case Alamofire looks to be not bitcode enabled. So as long as it is so, you can't go ahead with "Enable Bitcode" option as Yes for your code.