Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 85213 - Internationalized gcc output confuses parser
Summary: Internationalized gcc output confuses parser
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 105136 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-14 20:15 EST by Javier Kohen CLA
Modified: 2010-02-04 22:57 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Kohen CLA 2005-02-14 20:15:32 EST
I'm using the es_AR.UTF-8 locale and all GCC warnings show up as errors. Running
Eclipse with an empty LANG environment variable, which causes GCC's output to be
in English, makes the warnings show as expected.

I guess this is applicable to any non-English locale, but I can't say I've checked.
Comment 1 John Camelon CLA 2005-02-15 09:42:28 EST
I'm assuming you mean error parser ... 
Comment 2 Serge Iovleff CLA 2005-09-29 06:41:13 EDT
(In reply to comment #0)
> I'm using the es_AR.UTF-8 locale and all GCC warnings show up as errors. Running
> Eclipse with an empty LANG environment variable, which causes GCC's output to be
> in English, makes the warnings show as expected.
> 
> I guess this is applicable to any non-English locale, but I can't say I've
checked.

(In reply to comment #1)
> I'm assuming you mean error parser ... 

I have the same problem.
I'm using the french locale (linux Debian, eclipse GTK).
All warnings appear like errors.
If i want to run the application the launcher say i have error on
my project and so on...
Comment 3 Doug Schaefer CLA 2005-09-29 09:47:23 EDT
Yes, I've just been in the error parser and found that the strings for "warning"
have been hard coded. We need to externalize these strings so that you can
change them for the appropriate locale.
Comment 4 Serge Iovleff CLA 2005-10-14 06:38:48 EDT
(In reply to comment #3)
> Yes, I've just been in the error parser and found that the strings for "warning"
> have been hard coded. We need to externalize these strings so that you can
> change them for the appropriate locale.

I don't no if it's of any help but the following instruction in python
allow to get the specification of gcc in english and in my local...

>>> import sys, os, os.path
>>> command = 'LANG=C gcc -E -v -dD '
>>> cin, out,err = os.popen3(command)
>>> lines = err.readlines()
>>> lines
['Using built-in specs.\n', 'Target: i486-linux-gnu\n', 'Configured with:
../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang
--prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --enable-checking=release i486-linux-gnu\n', 'Thread model:
posix\n', 'gcc version 4.0.2 (Debian 4.0.2-2)\n']

>>> command = 'LANG=fr_FR@euro gcc -E -v -dD '
>>> cin, out,err = os.popen3(command)
>>> lines = err.readlines()
>>> lines
['Utilisation des specs internes.\n', 'Target: i486-linux-gnu\n', 'Configur\xe9
avec: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang
--prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --enable-checking=release i486-linux-gnu\n', 'Mod\xe8le de
thread: posix\n', 'version gcc 4.0.2 (Debian 4.0.2-2)\n']

The LANG=C or LANG=fr_FR@euro variable change the behavior of the output.
Comment 5 Axel Mueller CLA 2006-06-19 08:05:25 EDT
This bug is still valid for CDT 3.1 RC3.
You have to set
export LC_ALL=
export LANG=
before starting eclipse (use a shell script).
Comment 6 Anton Leherbauer CLA 2009-01-20 08:34:02 EST
*** Bug 105136 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Gvozdev CLA 2010-02-04 22:57:19 EST
The strings have been externalized for GCC and GLD ErrorParsers as part of changes done in bug 263987 and bug 248669 for CDT 7.0
Besides, the patterns are configurable now in Preferences so you can localize for yourself.