[cfe-dev] Compilation issues Ubuntu 14.10

Giulio Stramondo giuliostramondo at gmail.com
Thu Nov 13 06:12:48 PST 2014

Hi, I hope that i'm sending this to the right place, if not please forgive

I'm following the documentation page "Tutorial for building tools using
LibTooling and LibASTMatchers" (
http://clang.llvm.org/docs/LibASTMatchersTutorial.html) and working on a
virtual machine with ubuntu 14.10 on it.

I've one question and one observation:

After I first build ( following exactly the instructions in the
documentation ) the source running 'ninja clang-test' i get:
 Expected Passes : 1232
 Expected Failure : 14
Unsupported Tests: 10
Unexpected Failures: 6573
Should I conclude that the built compiler is not going to work properly? If
yes, is there an alternative way of building it that can fix this?
Before building it on Ubuntu 14.10 I also tried to build it on osx 10.10
and i was getting the same output.

When I set clang as its own compiler, following the same documentation
page, and i change the CMAKE_CXX_COMPILER flag putting the path to the
newly builded compiler, I get the following error :

[6/2243] Building C object
-Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers
-pedantic -Wno-long-long -Wno-comment -fcolor-diagnostics -Ilib/Support
-I/opt/llvm/llvm/lib/Support -Iinclude -I/opt/llvm/llvm/include -MMD -MT
lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o -MF
lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o.d -o
lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o   -c
cc: error: unrecognized command line option ‘-fcolor-diagnostics’
[6/2243] Building CXX object
ninja: build stopped: subcommand failed.

I thought it was because the old compiler was still used instead of clang
to compile the c files and wasn't recognizing the flag -fcolor-diagnostics.
So I changed also CMAKE_C_COMPILER with the path to the builded clang and
now it seems to compile. If this is right, maybe this should be added to
the documentation?

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141113/189c046f/attachment.html>

More information about the cfe-dev mailing list