On Fri, December 16, 2016 14:49, Kirill Bychkov wrote: > 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. >
Switching to ports gcc solves the problem. In this case openxcom links with estdc++ which doesn't throw an exception. Taking in account that new version of openxcom will require c++11 compiler, I suggest to switch it to in-ports gcc4. Index: Makefile =================================================================== RCS file: /cvs/ports/games/openxcom/Makefile,v retrieving revision 1.14 diff -u -r1.14 Makefile --- Makefile 9 Apr 2016 22:28:40 -0000 1.14 +++ Makefile 5 Feb 2017 09:52:21 -0000 @@ -4,7 +4,7 @@ BROKEN-hppa = OOM on Engine/Scalers/hq4x.cpp COMMENT = open source reimplementation of the original X-Com DISTNAME = openxcom-1.0.0 -REVISION = 3 +REVISION = 4 EPOCH = 0 CATEGORIES = games x11 @@ -16,11 +16,13 @@ PERMIT_PACKAGE_CDROM = Yes WANTLIB = GL SDL SDL_gfx SDL_image SDL_mixer c m pthread \ - stdc++ yaml-cpp + yaml-cpp MASTER_SITES = ${HOMEPAGE}/wp-content/uploads/downloads/2014/06/ -MODULES = devel/cmake +MODULES = devel/cmake gcc4 +MODGCC4_LANGS += c++ +MODGCC4_ARCHS = * RUN_DEPENDS = audio/timidity \ devel/desktop-file-utils \