Re: [Boost-bugs] [Boost C++ Libraries] #4688: std::runtime_error: locale::facet::_S_create_c_locale name not valid

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4688: std::runtime_error: locale::facet::_S_create_c_locale name not valid
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-10-05 22:39:13


#4688: std::runtime_error: locale::facet::_S_create_c_locale name not valid
----------------------------------------------+-----------------------------
  Reporter: Gennady Proskurin <gpr@…> | Owner: bemandawes
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: filesystem
   Version: Boost 1.44.0 | Severity: Problem
Resolution: fixed | Keywords:
----------------------------------------------+-----------------------------

Comment (by mihai.dontu@…):

 Replying to [comment:16 anonymous]:
> Replying to [comment:15 anonymous]:
> > Replying to [comment:13 gonzalo.raposo@…]:
> > > I tried it with boost 1_47 but is still happen the same on FreeBSD
 8.1, doesn't work with locale en_US.UTF-8 nor with C (which was working
 with boost 1_46_1).
> >
> > What is the "it" you are trying? Could you post code that fails?
> >
> > And exactly what happens? Are you saying that the app still throws an
 exception before main starts?
> >
> > Thanks,
> >
> > --Beman
>
> Yes, it means that the app is still trowing the exception before main
 starts when locale != C.
> What you need to reproduce this issue is just create a simple main that
 uses boost.filesystem and the locale is another than C (en_US.UTF-8 for
 example)
>
> Gonzalo

 I have came across the same problem, only I am using a cross compiler. The
 true issue lies in how GCC (libstdc++) is configured. On some Linux
 distributions and apparently FreeBSD, the C++ runtime is configured to use
 generic locale support. This is the one that handles nothing but "C".
 However, if one configures GCC with "--enable-clocale=gnu", a more
 advanced implementation becomes available. I don't know if it's tied in
 any way to the GNU C library (it doesn't appear to) and I also don't know
 the proper way to check if you have "generic" or "gnu" enabled. I used

 {{{
 #!sh
 $ objdump -D -C -j .text -M intel libstdc++.so.6 >libstdc++.so.6.S
 }}}

 to look in the assembler dump for _S_create_c_locale(). A call to
 "newlocale_at_plt" tells me I have "gnu" enabled.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4688#comment:17>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC