Issue 118574 - jvmwk C++ issue: 'mbstate_t' does not name a type
Summary: jvmwk C++ issue: 'mbstate_t' does not name a type
Status: CLOSED WONT_FIX
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: version58
Hardware: PC FreeBSD
: P5 (lowest) Blocker (vote)
Target Milestone: ---
Assignee: Pedro Giffuni
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 19:53 UTC by Pedro Giffuni
Modified: 2017-05-20 10:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Fix. Can it be done nicer? (1.07 KB, application/octet-stream)
2011-11-03 19:53 UTC, Pedro Giffuni
no flags Details
Updated C++ defines for mstate_t (6.97 KB, patch)
2011-11-04 03:09 UTC, Pedro Giffuni
no flags Details | Diff
Same issue on other places. Updated C++ defines for mstate_t (6.90 KB, patch)
2011-11-08 13:10 UTC, Pedro Giffuni
no flags Details | Diff
Updated C++ defines for mstate_t (10.52 KB, patch)
2012-02-20 03:17 UTC, Pedro Giffuni
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Pedro Giffuni 2011-11-03 19:53:52 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
Comment 1 Pedro Giffuni 2011-11-04 03:09:24 UTC
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.
Comment 2 Pedro Giffuni 2011-11-04 03:11:04 UTC
I will commit it unless there is a nicer fix.
Comment 3 Pedro Giffuni 2011-11-08 13:10:06 UTC
Created attachment 76972 [details]
Same issue on other places. Updated C++ defines for mstate_t
Comment 4 Pedro Giffuni 2011-11-08 22:23:45 UTC
(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.
Comment 5 Pedro Giffuni 2012-01-20 15:17:37 UTC
The error mysteriously went away when updating gbuild but is now back.
Comment 6 Pedro Giffuni 2012-02-20 03:17:20 UTC
Created attachment 77230 [details]
Updated C++ defines for mstate_t

Some more includes were required at the end of the build.
Comment 7 Pedro Giffuni 2012-02-20 03:22:36 UTC
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.
Comment 8 Pedro Giffuni 2012-02-21 04:16:56 UTC
GNU libiconv developer has acknowledged this is an issue and has solved it
for libiconv-1.14.
Comment 9 Pedro Giffuni 2013-02-05 18:03:19 UTC
I think this may be related to FreeBSD libstdc++ configuration.