Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368622 - auto discovery fails for non-english locales
Summary: auto discovery fails for non-english locales
Status: RESOLVED DUPLICATE of bug 304139
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-15 10:06 EST by ewald CLA
Modified: 2012-01-16 13:25 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ewald CLA 2012-01-15 10:06:30 EST
I have been wondering for a while why the system include paths  in the property pages were missing from time to time on my various platforms. At least one of the reasons is a dependency on the locale. Some of the output from gcc depends on the locale and Eclipse seems to focus on the english version. At least a german locale yields no system include paths for g++ 4.6.

The relevant output with LC_ALL="C" is:

#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.6
 /usr/include/c++/4.6/i686-linux-gnu/.
 /usr/include/c++/4.6/backward
 /usr/lib/gcc/i686-linux-gnu/4.6.1/include
 /usr/local/include
 /usr/lib/gcc/i686-linux-gnu/4.6.1/include-fixed
 /usr/include/i386-linux-gnu
 /usr/include
End of search list.

Whereas with LC_MESSAGES=de_DE.UTF-8 you get

#include "..." - Suche beginnt hier:
#include <...> - Suche beginnt hier:
 /usr/include/c++/4.6
 /usr/include/c++/4.6/i686-linux-gnu/.
 /usr/include/c++/4.6/backward
 /usr/lib/gcc/i686-linux-gnu/4.6.1/include
 /usr/local/include
 /usr/lib/gcc/i686-linux-gnu/4.6.1/include-fixed
 /usr/include/i386-linux-gnu
 /usr/include
Ende der Suchliste.

My current workaround is to modify the builtin discovery command from

   sh -c "g++ -E -P -v -dD  specs.cpp" 

 to
 
   sh -c "export LC_ALL='C'; g++ -E -P -v -dD  specs.cpp" 
   
There might be a connection to the pending Bug 185077
Comment 1 Marc-André Laperle CLA 2012-01-15 13:43:01 EST
This looks like bug 304139. Could you try a nightly build of 

8.0.2: https://hudson.eclipse.org/hudson/job/cdt-maint/

or Juno: https://hudson.eclipse.org/hudson/job/cdt-nightly/

The zips are archived p2 repo so you can add them in Install New Software, Add, Archive.
Comment 2 Andrew Gvozdev CLA 2012-01-15 14:21:08 EST
(In reply to comment #0)
> There might be a connection to the pending Bug 185077
Bug 185077 is about having eclipse and the compiler on different drives (C: and D:).

I am pretty sure this bug issue is the same as bug 304139. If the problem still persists with nightly build, please reopen.

*** This bug has been marked as a duplicate of bug 304139 ***
Comment 3 ewald CLA 2012-01-16 13:25:15 EST
after installing cdt 8.0.2 I can confirm that the output is in plain English and the include paths appear as expected.