Apache OpenOffice (AOO) Bugzilla – Issue 118574
jvmwk C++ issue: 'mbstate_t' does not name a type
Last modified: 2017-05-20 10:04:05 UTC
Created attachment 76950 [details] Fix. Can it be done nicer? Using the prepacked libxml2 in C++ brings some problems: ... Entering /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/jvmfwk/source Making: all_jvmfwk.dpslo Compiling: jvmfwk/unxfbsdx.pro/misc/jvmfwk_version.c Compiling: jvmfwk/source/framework.cxx In file included from /usr/local/include/libxml2/libxml/encoding.h:28, from /usr/local/include/libxml2/libxml/parser.h:807, from /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/jvmfwk/source/elements.hxx:35, from /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/jvmfwk/source/framework.cxx:43: /usr/local/include/iconv.h:114: error: 'mbstate_t' does not name a type dmake: Error code 1, while making '../unxfbsdx.pro/slo/framework.obj' 1 module(s): jvmfwk need(s) to be rebuilt
Created attachment 76951 [details] Updated C++ defines for mstate_t This patch basically adds an include to all the files that use libxml/tree.h : +#include <cwchar> // for std::mbstate_t #include <libxml/tree.h> It seems required by FreeBSD's compiler when using the latest libxml.
I will commit it unless there is a nicer fix.
Created attachment 76972 [details] Same issue on other places. Updated C++ defines for mstate_t
(In reply to comment #2) > I will commit it unless there is a nicer fix. It looks like there is no nice fix for this. We discussed it in -dev and we decided to keep this patch in the FreeBSD port as it doesn't seem to be an issue for other platforms at this time.
The error mysteriously went away when updating gbuild but is now back.
Created attachment 77230 [details] Updated C++ defines for mstate_t Some more includes were required at the end of the build.
In a recent build the issue seems to have vanished (again). I did contact the GNU libiconv maintainers to make sure I am not crazy.
GNU libiconv developer has acknowledged this is an issue and has solved it for libiconv-1.14.
I think this may be related to FreeBSD libstdc++ configuration.