[libvoikko] Libreoffice Voikko+HFST standalone extension for Mac issue

Sjur Moshagen sjurnm at mac.com
Mon Sep 12 17:56:30 EEST 2011


Den 12. sep. 2011 kl. 16.46 skrev Harri Pitkänen:

>> The intention was to include one default language (malaga-based Finnish),
>> and the libraries needed. I had to put the libraries within the 2/ dir to
>> get them included in the oxt.
>> 
>> Something is obviously wrong, but I am unable to see what the solution is.
> 
> It is most likely because standalone extensions should link statically to
> libvoikko on OS X. However revision 3726 changed libreoffice-voikko to use
> dynamic linking instead. Try reverting the part from r3726 that changed
> 
>  $(LIBVOIKKO_PATH)/lib/libvoikko.a
> 
> to
> 
>  -lvoikko
> 
> and see if that helps.

Not completely at least.

Linking the file $(LIBVOIKKO_PATH)/lib/libvoikko.a caused a linking error:

ld: warning: in build/voikko.map, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
  "hfst_ol::ZHfstOspeller::read_legacy(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      libvoikko::spellchecker::suggestion::HfstSuggestion::HfstSuggestion(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libvoikko::voikko_options_t*)in libvoikko.a(HfstSuggestion.o)

etc.

There should be no architecture problem for that file:

$ file /usr/local/lib/libvoikko.a
/usr/local/lib/libvoikko.a: Mach-O universal binary with 2 architectures
/usr/local/lib/libvoikko.a (for architecture i386):	current ar archive random library
/usr/local/lib/libvoikko.a (for architecture x86_64):	current ar archive random library


Switching to $(LIBVOIKKO_PATH)/lib/libvoikko.1.dylib removed the linking errors, and produced a somewhat larger voikko.dylib file in the voikko.oxt. But the resulting oxt gives the same error as earlier.

> If it does, you could hack the Makefile so that
> static linking is used whenever STANDALONE_EXTENSION_PATH is defined and
> dynamic linking is used otherwise.

I will when I get it to work.

Sjur




More information about the Libvoikko mailing list