thraxcompiler error while loading shared libraries: libthrax.so.0

1.1k views Asked by At

I have installed openfst and thraxcompiler successfully. thraxmakedep creates the make file successfully

thraxOpenGrm/thrax-1.1.0/src/grammars$ thraxmakedep example.grm

after the make file is created, when i run make i get the following error

thraxOpenGrm/thrax-1.1.0/src/grammars$ make
thraxcompiler --input_grammar=byte.grm --output_far=byte.far
thraxcompiler: error while loading shared libraries: libthrax.so.0: cannot open shared object file: No such file or directory
make: *** [byte.far] Error 127

But the library is present in the path:

/usr/local/lib/libthrax.so.0

I tried a few steps which works for gcc compiler like export LD_LIBRARY_PATH=/usr/local/lib , use flags like -Wl,-rpath , -Llib .

2

There are 2 answers

0
Tejus Prasad On BEST ANSWER

This issue occurs due to the Thrax Compiler not able to find the required libraries. Executing the command sudo ldconfig fixes it.

Alternately it can be fixed by copying that library(libthrax.so.0) in /usr/lib/

1
user1673010 On

Another option is to set this so it can find the shared library:

export LD_LIBRARY_PATH=/usr/local/lib