[cfe-users] Clang does not output coloured diagnostics

Shriramana Sharma samjnaa at gmail.com
Thu Jul 30 10:14:23 PDT 2015

Hello. I'm using Kubuntu Trusty 64 bit.

Because I wanted to build https://github.com/Syniurge/Calypso/, I
built Clang 3.6 from SVN as per instructions at
http://clang.llvm.org/get_started.html except that i.o. trunk I gave
branches/release_36 in the SVN commands.

Now I successfully installed via checkinstall (since I want to be able
to remove everything even if I erase my build tree). But now clang
does not output coloured diagnostics at all by default even though on
the same terminal the output of cmake (while building Calypso) is
coming out in colour and my terminal PS1 prompt is in colour. Please
help. Should I have given some compile-time setting? Or can I set some
environmental variables?

I don't have this problem when using Clang from Ubuntu repo or LLVM
Apt repo. Only when I use this self-compiled version.

Setting CFLAGS or CXXFLAGS to -fcolor-diagnostics (even with 'export')
doesn't seem to work for some reason. Even passing it via -D to cmake
said it was ignored.

Please help. Thanks.

Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा

More information about the cfe-users mailing list