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? 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.
Ther is one way!
Select Targets/Build Settings/ Scroll to Apple LLVM 6.0 – Preprocessing
-> ENABLE FOUNDATION ASSERTIONS set it to NO
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
/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)!
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.
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
Try to delete the appTests like here here:
Credits for this answer:
Apple LLVM 6.0 Error: clang failed with exit code -1
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
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.
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)
I was able to resolve this error by changing the ‘Build Settings -> iOS Deployment Target’ value to a more recent iOS version.
I was trying to use openMP on XCode-9 on Mac-OS Sierra 10.13.4 and I followed these steps : [http://antonmenshov.com/2017/09/09/clang-openmp-setup-in-xcode/]
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
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
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.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Ebook Reviews
- PES Matches, Skills & News