[arch-general] How to get colorized output during prog compilation? ( Colorgcc doesn't color gcc output )
Hi all. Like posted in this topic( https://bbs.archlinux.org/viewtopic.php?id=110301 ), my problem doesn't seem to be solved. Color gcc is not called by gcc and thus not colorizing the output of gcc. The funny thing is that if i call "colorgcc" directly when compiling some code, I get colorized output. It may sound stupid but this script helped quite a lot to point out warnings and to see immediatly where I went wrong. It's really a big help. Hasn't anyone else had this problem? Anyone have any ideas on how to solve this problem? gcc: gcc (GCC) 4.5.2 colorgcc: colorgcc 1.3.2-6 Thanks in advance, Francesco
Le 2 janv. 2011 17:25, "Francesco Nwokeka" <francesco.nwokeka@gmail.com> a écrit :
Hi all. Like posted in this topic(
https://bbs.archlinux.org/viewtopic.php?id=110301 ), my problem
doesn't seem to be solved. Color gcc is not called by gcc and thus not colorizing the output of gcc. The funny thing is that if i call "colorgcc" directly when compiling some code, I get colorized output. It may sound stupid but this script helped quite a lot to point out warnings and to see immediatly where I went wrong. It's really a big help.
Hasn't anyone else had this problem? Anyone have any ideas on how to solve this problem?
gcc: gcc (GCC) 4.5.2 colorgcc: colorgcc 1.3.2-6
Thanks in advance, Francesco
Colorgcc is a wrapper for gcc. It will never be called by the gcc binary. You may use an alias if you want the gcc command to call colorgcc. -- Cédric Girard
On Sunday 02 January 2011 17:30:52 Cédric Girard wrote:
Colorgcc is a wrapper for gcc. It will never be called by the gcc binary. You may use an alias if you want the gcc command to call colorgcc.
The alias trick doesn't work when using a makefile.
2011/1/2 Francesco Nwokeka <francesco.nwokeka@gmail.com>:
The alias trick doesn't work when using a makefile.
Obviously. You have to modify the Makefile. Colorgcc is just a perl script that parses the output of gcc. gcc has no idea about it. If you are struggling with gcc's error messages maybe you should try clang, which provides much more user-friendly error messages and warnings. -- János
On Sun, Jan 02, 2011 at 06:36:40PM +0100, János Illés wrote:
Obviously. You have to modify the Makefile.
You can also use symlinks. By default, colorgcc creates symlinks in "/bin" without informing the user (created a bug ticket [1] concerning this issue btw as I don't like that way of automatically creating wrapper symlinks somewhere). You can either change that or try to fix your "$PATH". [1] https://bugs.archlinux.org/task/22279
On Sunday 02 January 2011 18:57:02 Lukas Fleischer wrote:
On Sun, Jan 02, 2011 at 06:36:40PM +0100, János Illés wrote:
Obviously. You have to modify the Makefile.
You can also use symlinks. By default, colorgcc creates symlinks in "/bin" without informing the user (created a bug ticket [1] concerning this issue btw as I don't like that way of automatically creating wrapper symlinks somewhere). You can either change that or try to fix your "$PATH".
Just solved my issue. I created symlinks in my "/usr/local/bin" folder. Forum post is here in case anyone needs it: https://bbs.archlinux.org/viewtopic.php?pid=867368 Thanks guys
On Sunday, January 02, 2011 19:15:32 Francesco Nwokeka wrote:
On Sunday 02 January 2011 18:57:02 Lukas Fleischer wrote:
On Sun, Jan 02, 2011 at 06:36:40PM +0100, János Illés wrote:
Obviously. You have to modify the Makefile.
You can also use symlinks. By default, colorgcc creates symlinks in "/bin" without informing the user (created a bug ticket [1] concerning this issue btw as I don't like that way of automatically creating wrapper symlinks somewhere). You can either change that or try to fix your "$PATH".
Just solved my issue. I created symlinks in my "/usr/local/bin" folder. Forum post is here in case anyone needs it: https://bbs.archlinux.org/viewtopic.php?pid=867368
Thanks guys
Maybe it's just nonsense, but have you tried setting CC variable before runing the compilation? Something like export CC=/usr/bin/colorgcc Make should than use the colorgcc instead of gcc. Dan -- --- Dan Vrátil vratil@progdansoft.com Tel.: +420732326870 Jabber: progdan@jabber.cz Tento email neobsahuje žádné viry, protože odesílatel nepoužívá Windows. / This email does not contain any viruses because the sender does not use Windows.
On Sun, 2 Jan 2011 19:15:32 +0100 Francesco Nwokeka <francesco.nwokeka@gmail.com> wrote:
On Sunday 02 January 2011 18:57:02 Lukas Fleischer wrote:
On Sun, Jan 02, 2011 at 06:36:40PM +0100, János Illés wrote:
Obviously. You have to modify the Makefile.
You can also use symlinks. By default, colorgcc creates symlinks in "/bin" without informing the user (created a bug ticket [1] concerning this issue btw as I don't like that way of automatically creating wrapper symlinks somewhere). You can either change that or try to fix your "$PATH".
Just solved my issue. I created symlinks in my "/usr/local/bin" folder. Forum post is here in case anyone needs it: https://bbs.archlinux.org/viewtopic.php?pid=867368
Thanks guys
Assuming you are using makepkg, you can change the CC variable in /etc/makepkg.conf
participants (6)
-
Cédric Girard
-
Dan Vratil
-
Francesco Nwokeka
-
János Illés
-
Lukas Fleischer
-
Ty John