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

Sjur Moshagen sjurnm at mac.com
Tue Sep 13 22:36:58 EEST 2011


Den 13. sep. 2011 kl. 17.49 skrev Harri Pitkänen:

> Since .a is basically just a package of individual object files this command 
> will list all symbols that are undefined within a single compilation unit. It 
> does not mean that the symbols are undefined within the archive. You can see 
> that a symbol may be marked as undefined multiple times and then defined 
> elsewhere within the archive (the following is from Linux but should be 
> similar to OS X):

Ok.

>> Any help as to how to get the static build to work is really appreciated.
> 
> For us to know what really is undefined it is best to look at the linker error 
> message. If linker can't find something, it is really missing.

This is the full list of linking errors when trying to compile a static build of the ooovoikko extension:

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)
      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)
      libvoikko::spellchecker::HfstSpeller::HfstSpeller(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libvoikko::voikko_options_t*)in libvoikko.a(HfstSpeller.o)
      libvoikko::spellchecker::HfstSpeller::HfstSpeller(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libvoikko::voikko_options_t*)in libvoikko.a(HfstSpeller.o)
  "hfst_ol::ZHfstOspeller::suggest(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      libvoikko::spellchecker::suggestion::HfstSuggestion::generate(libvoikko::spellchecker::suggestion::SuggestionStatus*) constin libvoikko.a(HfstSuggestion.o)
  "hfst_ol::ZHfstOspeller::ZHfstOspeller()", 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)
      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)
      libvoikko::spellchecker::HfstSpeller::HfstSpeller(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libvoikko::voikko_options_t*)in libvoikko.a(HfstSpeller.o)
      libvoikko::spellchecker::HfstSpeller::HfstSpeller(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libvoikko::voikko_options_t*)in libvoikko.a(HfstSpeller.o)
  "hfst_ol::ZHfstOspeller::~ZHfstOspeller()", referenced from:
      libvoikko::spellchecker::suggestion::HfstSuggestion::terminate()     in libvoikko.a(HfstSuggestion.o)
      libvoikko::spellchecker::HfstSpeller::terminate()     in libvoikko.a(HfstSpeller.o)
  "hfst_ol::ZHfstOspeller::spell(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      libvoikko::spellchecker::HfstSpeller::doSpell(wchar_t const*, unsigned long)in libvoikko.a(HfstSpeller.o)
  "hfst_ol::ZHfstOspeller::read_zhfst(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)
      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)
      libvoikko::spellchecker::HfstSpeller::HfstSpeller(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libvoikko::voikko_options_t*)in libvoikko.a(HfstSpeller.o)
      libvoikko::spellchecker::HfstSpeller::HfstSpeller(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libvoikko::voikko_options_t*)in libvoikko.a(HfstSpeller.o)

> Also check that you list the static archives in correct order. Something was 
> said about that on the Apple page you linked to earlier.

Ok, I will. Does order mean the order the archives are listed on the command line when running configure and make? Does the order specified when I build hfstospell.a influence the archive/library order when compiling the next piece of code in the library chain (e.g. libvoikko)? How can I influence the order when I only specify dirs using -L?

Sjur




More information about the Libvoikko mailing list