flexdll icon indicating copy to clipboard operation
flexdll copied to clipboard

mingw64 (and presumably mingw) fails on French-language Windows 10

Open damiendoligez opened this issue 8 years ago • 5 comments

This is the output of x86_64-w64-mingw32-gcc -print-search-dirs on a French-configured windows 10:

installés: /usr/lib/gcc/x86_64-w64-mingw32/5.4.0/
programmes : =/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/bin/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/bin/
libraries : =/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/../lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/x86_64-w64-mingw32/5.4.0/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/

flexlink fails to parse it because of the space between libraries and :

I don't know who had the bright idea of localizing this part of gcc but it looks like you'll need to adapt.

damiendoligez avatar Sep 21 '17 12:09 damiendoligez

When did that change?! While adapting to the space will fix French, we're only succeeding because the French and English word happen to be the same...

dra27 avatar Sep 24 '17 11:09 dra27

libraries is not a French word, so they managed to screw up the translation. German translator did a better job:

$ LANG=fr_FR  x86_64-w64-mingw32-gcc -print-search-dirs | grep sys-root
libraries : =/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/../lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/x86_64-w64-mingw32/5.4.0/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/

~
$ LANG=de_DE  x86_64-w64-mingw32-gcc -print-search-dirs | grep sys-root
Bibliotheken: =/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/../lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/x86_64-w64-mingw32/5.4.0/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/

@damiendoligez @dra27 Do you believe that setting LANG before calling gcc -print-search-dirs would be a good approach? Or to hard-code parsing the third line of result (after '=')?

alainfrisch avatar Sep 25 '17 09:09 alainfrisch

I think setting LC_ALL would be best. Hard-coding the line seems really brittle.

damiendoligez avatar Sep 25 '17 09:09 damiendoligez

BTW I just tested again on an updated Windows and now I get this:

bibliothèques: =/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/...

With LC_ALL=C I get the expected message (in English).

damiendoligez avatar Sep 25 '17 11:09 damiendoligez

Definitely the LC_ALL solution - unless gcc has a more reliable way of getting the exact answer we're after?

dra27 avatar Sep 25 '17 12:09 dra27