Apple LLVM 6.0 Error


Apple LLVM 6.0 Error

I recently downloaded and installed the XCode6-Beta and I am getting this build error. Steps already taken:

Double checked my prefix header file.
Cleaned project. 
Restarted XCode.
Deleted DerivedData like 100 times!

Any thing I may be missing?

  failed with exit code 1

Temporary Solution.
I removed the 6.0 support which was one of the areas causing problem however, if you need support for earlier versions this will still be an issue.


Answer 1:

Ther is one way!

Select Targets/Build Settings/ Scroll to Apple LLVM 6.0 – Preprocessing


Answer 2:

The problem is, Xcode is not telling you the actual error that clang (LLVM) is throwing; it’s just saying that clang process exited with code 1, meaning an error.

To find out exactly what the error is requires a bit of digging…

I don’t have Xcode6, but this how it can be done in Xcode 5, and it’s probably pretty similar:

If you open the “Logs Navigator” (View-->Navigators-->Logs Navigator or cmd-8) and click on “Build”, you should be able to see the build that you just ran. Clicking on the three lines on the side will bring up the full command that was run and the output it gave.

You might be able to see your error here, but if not, you can do one better:

Copy and paste the command (it will be HUGE) from the window into a terminal and run it! You should look something like this:

CompileC /Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/ Misc/template_tests.cpp normal x86_64 c++

cd /Users/Daly/Documents/School/EECS/Labs/Misc/Misc

export LANG=en_US.US-ASCII

/Applications/ -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11 -stdlib=libc++ -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wmissing-prototypes -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -isysroot /Applications/ -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.8 -g -fvisibility-inlines-hidden -Wno-sign-conversion -iquote /Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/ -I/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/ -I/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/ -iquote /Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/ -I/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Products/Debug/include -I/Applications/ -I/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/ -I/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/ -F/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Products/Debug -MMD -MT dependencies -MF /Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/ –serialize-diagnostics /Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/ -c /Users/Daly/Documents/School/EECS/Labs/Misc/Misc/Misc/template_tests.cpp -o /Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/

(This is from one of my projects.) You can skip the first line (CompileC .... 1_0.compiler), but copy the rest and paste it into a terminal!

Hopefully this lets you see the error and we can work from there (probably in a new question)!

Answer 3:

This happened to me when I renamed my project.
To solve this, Select Targets/Build Settings and search for the old project name and replace with the new name.

Answer 4:

I got the same error, but what causing it was some missing classes library.
then i added them again to the project but still causing the error.

after i searched it in the build phase, those class that had been missing is still linked to the project, so all i did is to remove those class that been highlighted red.

clean the project, and then build it.
for me, it worked

Answer 5:

Final solution:

Try to delete the appTests like here here:

Credits for this answer:
Apple LLVM 6.0 Error: clang failed with exit code -1

Answer 6:

This example worked for me. Follow this link if you want to do it with the screen shots. Otherwise here are the steps:

STEP 1: From the menu bar of xcode select > window > organizer

STEP 2: The new window will open, copy the derived data address till /derivedData e.g. ~/Library/Developer/Xcode/DerivedData/

STEP 3: Quit xCode

STEP 4: Double click/tap on finder and select “Go to Folder”

STEP 5: Paste the copied address in the text field

STEP 6: The folder that will open delete every single file and folder you see in it.

STEP 7: Empty your trash and open xCode again and run the project.

It worked for me.

Answer 7:

Temporary Solution.

I removed the 6.0 support which was one of the areas causing problem and that seemed to have fixed it. However, if you need support for earlier versions this will still be an issue.

There might be trouble at the prefix.pch file, make sure you also double check your prefix.pch for any code that might be from the previous os version. If you dont’t need the pre-compilation set it to NO by going to TARGETS > PreCompile Prefix Headers and selecting NO. You may then need to manually import the frameworks/file to every class file you make.


If you do a hard cleaning cmd + product > clean. You will see an option ‘Clean Build Folder..’. Using that sometimes removes the issue. If that still doesn’t work reinstall the xcode6 and it will work(since you already have the downloaded dmg setup, it will take 2min only)

Answer 8:

I was able to resolve this error by changing the ‘Build Settings -> iOS Deployment Target’ value to a more recent iOS version.

Answer 9:

I was trying to use openMP on XCode-9 on Mac-OS Sierra 10.13.4 and I followed these steps : [][1]

I have the error like this :

clang-6.0: error: cannot specify -o when generating multiple output

I fix that problem by changing some settings in XCode:

In build settings > build options > Enable Index-While-Building Functionality to No

Answer 10:

This problem might occur when the project library looses its reference due to some condition.Go to –> Library –>Developer –> Xcode –>DerivedData .Now delete the “DerivedData” folder.Clean and run your project. This solves the issue. Hope this helps

Answer 11:

Such a problem may occur if you change some Cocoa header by an accident. The compiler will ask you to rebuild precompiled headers (in my case it did so), but the actual error will be different. To make the compiler show you a real error set ENABLE FOUNDATION ASSERTIONS to NO (it’s described above), so, you’ll find out which header caused failure.

Answer 12:

You need to change the Development target …. it works for me

enter image description here