[libvoikko] Libreoffice-voikko with HFST support for Windows available for testing

Børre Gaup borre.gaup at uit.no
Sun Dec 22 23:22:45 EET 2013


On sotn, 2013-12-22 at 08:59 +0200, Flammie Pirinen wrote:
> 2013-12-21, Harri Pitkänen sanoi:
> 
> > I have attached the changes that were needed to hfst-ospell. The
> > changes have been tested only on 32 bit Windows.
> 
> Seems good, I applied them to hfst-ospell source.

I tried compiling it on my Kubuntu 14.04 system, that has tinyxml2 1.0.1
installed. The compile failed with this error:

---------------------------------------
  CXX      libhfstospell_la-ZHfstOspellerXmlMetadata.lo
ZHfstOspellerXmlMetadata.cc: In member function ‘void
hfst_ol::ZHfstOspellerXmlMetadata::read_xml(const char*, size_t)’:
ZHfstOspellerXmlMetadata.cc:903:36: error: no matching function for call
to ‘tinyxml2::XMLDocument::Parse(const char*&, size_t&)’
     if (doc.Parse(xml_data, xml_len) != tinyxml2::XML_NO_ERROR)
                                    ^
ZHfstOspellerXmlMetadata.cc:903:36: note: candidate is:
In file included from ZHfstOspellerXmlMetadata.cc:27:0:
/usr/include/tinyxml2.h:1001:6: note: int
tinyxml2::XMLDocument::Parse(const char*)
  int Parse( const char* xml );
      ^
/usr/include/tinyxml2.h:1001:6: note:   candidate expects 1 argument, 2
provided
make[1]: *** [libhfstospell_la-ZHfstOspellerXmlMetadata.lo] Error 1
make[1]: Leaving directory `/home/boerre/Dokumenter/src/hfst-ospell'
make: *** [all] Error 2
---------------------------------------

int Parse( const char* xml, size_t nBytes=(size_t)(-1) ); was introduced
in tinyxml2 1.0.8, so a check for this is needed in configure.ac:

--- configure.ac        (revision 3659)
+++ configure.ac        (working copy)
@@ -98,7 +98,7 @@
                           enable_xml=no])])
 AM_CONDITIONAL([WANT_LIBXMLPP], [test x$enable_xml = xlibxmlpp])
 AS_IF([test x$enable_xml = xtinyxml2],
-      [PKG_CHECK_MODULES([TINYXML2], [tinyxml2],
+      [PKG_CHECK_MODULES([TINYXML2], [tinyxml2 >= 1.0.8],
                          [AC_DEFINE([HAVE_TINYXML2], [1], [Use
tinyxml])],
                          [AC_MSG_WARN([tinyxml missing, xml disabled])
                           enable_xml=no])])

Børre



More information about the Libvoikko mailing list