Xcode Exit with Error 254 in iOS sdk - iphone

First of all, I know that there are many questions on this topic but couldn't find solution for me.
Suddenly,I am getting the clang error like as follow:
1. /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:154:2: current parser token 'if'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: i386-apple-darwin11.4.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: error: unable to execute command: Segmentation fault: 11
clang: note: diagnostic msg: Error generating preprocessed source(s).
Command /Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254
I am not able to solve this.
*Please help me to solve this error..*

Use debugger to check where crash is occurring. As you have not sHown any code,perhaps nobody would be able to help you on this clearly. in order to get full support you must have to post code where app is crashing and you are getting this error.
Here is same error discussed in Apple Official Support Communities, also refer to this
hope this helps

Related

Error in backend: invalid llvm.linker.options building SourceKit-LSP on Ubuntu 18.10

I am following this tutorial in order to get Visual Studio Code and SourceKit-LSP integrated on Ubuntu 18.10, however, I got stuck at building sourcekit-lsp project.
The error I'm getting:
fatal error
:
error in backend: invalid llvm.linker.options
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 7.0.0-3 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
I'm not sure if its relevant, but after typing Swift in the console I get the following errors:
error: ld-2.28.so 0xffffffff0005f117: adding range [0x14167-0x141ca) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
error: ld-2.28.so 0xffffffff0005f117: adding range [0x141e0-0x141e6) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
error: ld-2.28.so 0xffffffff0005f184: adding range [0x14167-0x141ca) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
error: ld-2.28.so 0xffffffff0005f184: adding range [0x141e0-0x141e6) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
Welcome to Swift version 5.0-dev (LLVM b10ce3d642, Clang c1979d7668, Swift 94b167db75).
Type :help for assistance.
I would appreciate if anyone could give me a hint how to solve the problem. The only thing that came up to my mind was reinstalling clang, but it hasn't solved the issue.
This is an llvm bug (https://bugs.llvm.org/show_bug.cgi?id=39743). See workaround here: https://forums.swift.org/t/error-while-trying-to-build-sourcekit-lsp-on-linux/18138/2

getting error clang: error: linker command failed with exit code 1 (use -v to see invocation) swift

Hi all I am getting this error while using an ocr cocoa pod. In Xcode
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
It works fine in simulator but as soon as I set it to external device i get this error.
I have tried disabling bitcode, cleaning the project, uninstalling and reinstalling the pods, and various other things listed on stack overflow.
has anybody else have any other ideas.
All the best
Tony
I was able to fix it.
Even though i had set the bitcode to NO it didn't work.
what i did was go to the pods and select the pod that doesn't work with bitcode and changed only that pod to NO on bitcode.
See picture below...

Mac O Linker errors with Tesseract

I have a simple Swift iOS project created in Xcode 8.1 and added Tesseract Framework. I am getting
clang: error: -E or -x required when input is from standard input
There is no help on Google about this error. Can someone explain what this error means. I have -lstdc++ and -$(inherited) in my other linker flags. If I try to add -E flag it gives me a
Found an unexpected MAch-O header code: 0x20312023
Problem was wrong version of TesseractOCR.frmaework generated earlier (probably for simulator). Fixed it by regenerating the framework and replacing it in the project.

clang: error: linker command failed with exit code 1 (use -v to see invocation) Parse.com and Swift

so today I updated my code to Swift 2 and now my app won't run because apparently the Parse Frameworks I was using have expired or something. This is the message I get: ld:
'/Users/tripphillips1/Desktop/Spotter/Parse.framework/Parse(PFAnalytics.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
Does anyone know what this means and how i can fix it?
Thanks
Ok so I found a solution to my problem. You have to go into the Build Settings and disable the Bitcode. Simple as that. Now it runs fine.

clang: error: -Z-reserved-lib-stdc++

I am migrating from 4.3 to xCode preview45
While linking my coreplot lib, i am getting this, which i am trying to resolve since last 5 days.
Please suggest me what should i do to overcome this issue. clang:
clang: error: -Z-reserved-lib-stdc++: 'linker' input unused when '-c' is present
Command /Volumes/Xcode 1/Xcode45-DP3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I tried changing C/C++ compiler,linker flag, etc, nothing worked so far.
Thanks
The easiest way to fix this is to pull the latest code with Mercurial. If you don't want to do that, you need to remove several compiler flags and make some other changes. See the necessary changes here and here.