Am Dienstag, 12. Juni 2007 19:05 schrieb Koji Yokota:

> There seems to be a problem in libstdc++ for FreeBSD to handle wchar_t, 
> which may still exist(?) as shown here:

This did never occur as an option to me. Good detective work!

>       http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9
> 
> I see that in 
> /usr/local/lib/gcc-4.1.3/include/c++/i386-portbld-freebsd6.2/bits/c++config.h
> 
> #define _GLIBCXX_USE_WCHAR_T 1
> 
> is defined, but _GLIBCPP_USE_WCHAR_T is not found there (same holds for 
> system gcc3.4).

What a shame. This problem is known since 2003, and still not fixed? Does 
nobody care for such a standard violation?

Anyway, since hacking libstdc++ is not an option for LyX, there is only one 
possible solution: Modify the configure check that checks for a usable 
wchar_t to not set HAVE_WCHAR_T on freebsd. Then the same replacement code 
that is used on cygwin will be used on freebsd. That code is not as good 
as the native gcc code, but it is at least better than nothing.

BTW, disabling boost::format would not help. That might fix the bformat 
problem, but the locale stuff that fails in boost::format is needed at 
other places, too (e.g. docstringstream). You can be lucky that 
boost::format crashed, the docstringstream would probably simply corrupt 
some data and proceed happily.


Georg

Reply via email to