[cfe-dev] Compilation issues Ubuntu 14.10
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
FAILED: /usr/bin/cc -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC
-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
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev