incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <ariel.constenla.ha...@gmail.com>
Subject Re: Issuew building with prepackaged stuff (was Re: Problem building main/sal/cppunittester)
Date Tue, 08 Nov 2011 20:37:00 GMT
Hello Pedro,

On Fri, Nov 04, 2011 at 07:56:53PM -0700, Pedro Giffuni wrote:
> > /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/unoxml/source/dom/node.cxx:28:
> > > /usr/local/include/iconv.h:114: error: 'mbstate_t'
> > does not name a type
> > > ...
> > > _____
> > > 
> > > but I already know how to fix those :).
> > 
> > how are you fixing them? Looks like a system header issue,
> > not OOo problem...
> > 
> 
> The problem is only caused when the libxml/tree.h is included,
> so this seems to work:
> 
> +#include <cwchar>      // for std::mbstate_t
>  #include <libxml/tree.h>
> 
> What is really weird is that this is specific to OpenOffice,
> it doesn't happen in other ports, including LibreOffice.

looking at https://issues.apache.org/ooo/show_bug.cgi?id=118574 
IMHO the solution is not acceptable: you cannot include a header that is
not used at all in that file. None of the files you've patched so far
uses wchar.h directly, so the issue is with the BSD port and should be 
fixed there.

Notice that your issue is because your using your system's libxml2:

libxml/encoding.h includes /usr/local/include/iconv.h if
LIBXML_ICONV_ENABLED is defined. So you see that error on every OOo file
that includes a libxml header that in turn includes libxml/encoding.h

On Fedora, building with system libxml works fine, I don't get that
error. In fact, /usr/local/include/iconv.h has no line 114 and it does
not use mbstate_t at all.
I wonder how your system's iconv.h looks like, does it use mbstate_t at
all? Is your system's libxml configured with LIBXML_ICONV_ENABLED?


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Mime
View raw message