[libvoikko] Namespace collisions in HFST and Lttoolbox

Harri Pitkänen hatapitk at iki.fi
Wed Mar 17 16:31:22 EET 2010


On Wednesday 17 March 2010, Flammie Pirinen wrote:
> > Another problem is that both HFST and Lttoolbox introduce some
> > classes in the default namespace. Since the libraries serve similar
> > purposes it is not a surprise that some of the classes have exactly
> > same names. Here are some examples, there might be others too:
> 
> Hfst 3 was designed to avoid pollution of default namespace, so moving
> to it will at least solve problem.

How are you going to do this on runtime? I assumed that you were going to 
change the headers which would indeed fix this compilation error. But as long 
as SFST library is linked against the rest of HFST namespace collisions can 
still occur when the compiled program is run (wrong methods get called).

The only ways to fix this problem without fixing SFST would (as far as I can 
figure right now) are either to move the use of SFST to a separate process or 
use some runtime linker tricks (which usually are not portable).

Harri



More information about the Libvoikko mailing list