Apple LLVM 6.0 Error

28,684

Solution 1

Ther is one way!

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

-> ENABLE FOUNDATION ASSERTIONS set it to NO

Solution 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.build/Debug/Misc.build/Objects-normal/x86_64/template_tests.o Misc/template_tests.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler

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

export LANG=en_US.US-ASCII

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -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/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -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/Misc.build/Debug/Misc.build/Misc-generated-files.hmap -I/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/Misc.build/Debug/Misc.build/Misc-own-target-headers.hmap -I/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/Misc.build/Debug/Misc.build/Misc-all-target-headers.hmap -iquote /Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/Misc.build/Debug/Misc.build/Misc-project-headers.hmap -I/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Products/Debug/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/Misc.build/Debug/Misc.build/DerivedSources/x86_64 -I/Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/Misc.build/Debug/Misc.build/DerivedSources -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/Misc.build/Debug/Misc.build/Objects-normal/x86_64/template_tests.d --serialize-diagnostics /Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/Misc.build/Debug/Misc.build/Objects-normal/x86_64/template_tests.dia -c /Users/Daly/Documents/School/EECS/Labs/Misc/Misc/Misc/template_tests.cpp -o /Users/Daly/Library/Developer/Xcode/DerivedData/Misc-hbomxnscgtjodqafsvgpndlyhkes/Build/Intermediates/Misc.build/Debug/Misc.build/Objects-normal/x86_64/template_tests.o

(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)!

Solution 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.

Solution 4

Final solution:

Try to delete the appTests like here here:

https://www.dropbox.com/s/j9s6nycb58x3nzs/target_tests.png?dl=0

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

Solution 5

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

Share:
28,684
Atif Imran
Author by

Atif Imran

Software Engineer.

Updated on May 11, 2020

Comments

  • Atif Imran
    Atif Imran about 4 years

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

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

    Any thing I may be missing?

    Command /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

    EDIT: 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.

  • marko
    marko almost 10 years
    There are a number of types of linker error that Xcode seems not to correctly handle, so this advice is good. Duplicate symbols at link-time seems to be one of them.