On Thu, December 15, 2016 10:43, Kirill Bychkov wrote: > On Mon, December 12, 2016 15:13, Jeremie Courreges-Anglas wrote: >> Sol?ne Rapenne <sol...@perso.pw> writes: >> >>> Hello, > > Hi > >>> It seems that the game games/openxcom doesn't want to start if >>> the environment variable LC_ALL is not equal to "C". >>> >>> solene@ll:% openxcom >>> terminate called after throwing an instance of 'std::runtime_error' >>> what(): locale::facet::_S_create_c_locale name not valid >>> abort (core dumped) openxcom >>> >>> Using LC_ALL=C openxcom allow the game to start > > Instead of adding this info into README, creating a wrapper script makes > more sense for me. > >> This raises interesting questions. The root of the problem lies in >> >> src/gnu/gcc/libstdc++-v3/config/locale/generic/c_locale.cc >> >> We're using generic code, as described in >> >> https://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html >> >> I can understand that it may be better to throw an exception, rather >> than showing inconsistent behaviour. On the other hand, we don't have >> newlocale/LC_NUMERIC/whatever support in libc, and I don't see that >> change in the near future. So I wonder what good this exception is >> doing. Given the amount of std::locale uses in code out there, I find >> it surprising that so far only boost and openxcom seem to trigger it... > > Probably this should be fixed upstream.
openxcom snapshots doesn't trigger an exception. I'll try to find what was changed and backport it. > > >> >> Index: c_locale.cc >> =================================================================== >> RCS file: >> /d/cvs/src/gnu/gcc/libstdc++-v3/config/locale/generic/c_locale.cc,v >> retrieving revision 1.1.1.1 >> diff -u -p -p -u -r1.1.1.1 c_locale.cc >> --- c_locale.cc 15 Oct 2009 17:11:33 -0000 1.1.1.1 >> +++ c_locale.cc 12 Dec 2016 12:05:48 -0000 >> @@ -137,9 +137,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) >> // Currently, the generic model only supports the "C" locale. >> // See http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html >> __cloc = NULL; >> - if (strcmp(__s, "C")) >> - __throw_runtime_error(__N("locale::facet::_S_create_c_locale " >> - "name not valid")); >> } >> >> void >> >> > > >