colorgcc / colorgcc Goto Github PK
View Code? Open in Web Editor NEWcolorgcc is a perl script to colorize gcc output. I'm collecting random patches and changes
Home Page: http://schlueters.de/colorgcc.html
colorgcc is a perl script to colorize gcc output. I'm collecting random patches and changes
Home Page: http://schlueters.de/colorgcc.html
colorgcc Version: 1.4.5 A wrapper to colorize the output from compilers whose messages match the "gcc" format. Requires the ANSIColor module from CPAN. Requires also the modules Open3, Basename, Spec and Cwd. Usage: Option 1) In a directory that occurs in your PATH _before_ the directory where the compiler lives, create a softlink to colorgcc for each compiler you want to colorize: gcc -> colorgcc g++ -> colorgcc cc -> colorgcc c++ -> colorgcc etc. That's it. When "g++" is invoked, colorgcc is run instead. colorgcc looks at the program name to figure out which compiler to run. Option 2) In a directory in your PATH, create the following links to colorgcc: color-g++ -> colorgcc color-c++ -> colorgcc color-gcc -> colorgcc color-cc -> colorgcc Then override the compiler macros for make, for example: make CXX=color-g++ CC=color-gcc The default settings can be overridden with ~/.colorgccrc. See the comments in the sample .colorgccrc for more information. Note: colorgcc will only emit color codes if: (1) Its STDOUT is a tty and (2) the value of $TERM is not listed in the "nocolor" option. If colorgcc colorizes the output, the compiler's STDERR will be combined with STDOUT. Otherwise, colorgcc just passes the output from the compiler through without modification. Author: Jamie Moyers <[email protected]> Started: April 20, 1999 Licence: GNU Public License
Colorgcc could have a filter mode, reading gcc output from stdin and colorizing it. This allows the use of colorgcc only in particular occasions and also allows its use in constrained environments where the main gcc is not editable and gcc is called directly with its full path.
Even for an experienced Linux user and computer programmer myself (though perhaps not an expert Linux user yet) your installation instructions are insufficient. I couldn't even figure them out until I came across this article online: https://imranfanaswala.wordpress.com/2009/02/02/setting-up-colorgcc/
Please improve your installation instructions or point to this article in your readme.
Hey guys!
Great project here. The only thing keeping me from using it at work, where it would be great, is that we use a very involved compiling infrastructure and I'm not sure if replacing anything in my path will break things. For me, it would be easier to pass the output to colorgcc after the fact and have it color it then. Is it possible to do this?
I have installed colorgcc at me (Debian 10) but it does not color the output of gcc. What mechanism does it use to colorize the output?
Hello
Does it work ?
Can I do a local symlink because mipsel-linux-gcc and the colorgcc ?
Frédéric
Use of uninitialized value $dir in string eq at /usr/lib/colorgcc/bin/g++ line 275.
Use of uninitialized value $dir in concatenation (.) or string at /usr/lib/colorgcc/bin/g++ line 278.
I needed to further process the output of colorgcc with another perl script through piping, and ran across the problem that colorgcc doesn't color the output if the terminal is not STDOUT. Many standard Linux programs allow you to use the --color or --color=always flag which forces the output of colors anyway. Can this functionality be added?
in GCC 4.7.2
produces:
poker.c: In function ‘pk_CheckWait’:
poker.c:191:11: note: #3 pragma message: fixme: audit table->visitors
On my system, it shows up in the same colour as error messages rather than either the same as warning or preferably it's own colour.
Subject: Fwd: [Fwd: colorgcc upgrade for localization of "warning"]
Date: 04/23/09 12:00:56 AM (Wed, 22 Apr 2009 18:00:56 -0400)
Johannes,
Based on someone else's suggestion
(http://bugs.gentoo.org/show_bug.cgi?id=168709), I've updated colorgcc
to be language aware. However, I don't know perl. Do you know perl well
enough to clean up what I've done? Even if you don't, are you willing to
host the upgraded colorgcc on your site (once it is cleaned up)?
The modifications to the perl script are as follows:
Replace the regex that looks for "warning" with a variable. That
variable's value is retrieved from a file based on the current language
setting. If the language key is not found, a quick compile is done to
determine the value and it is appended to the lookup file.
Example:
LANG=en_us
in warnings_db.txt:
en_us=warning
It still needs some work to be more portable and to facilitate
installers. I've included the new function below.
Thanks
Subject: [Fwd: Undeliverable: colorgcc]
Date: 11/18/09 5:01:18 PM
Hi,
gcc4.5 is using a slightly different error formating (like adding column numbers), the script does not match this very well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.