flyfei / phonetisaurus

Automatically exported from code.google.com/p/phonetisaurus
2 stars 0 forks source link

Can't find shared library - Fedora 20 #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.install phonetisaurus on Fedora 20
1.run 'phonetisaurus-g2p' in the terminal

What is the expected output? What do you see instead?
I'm not sure what is the expected output but I see this : 
phonetisaurus-g2p: error while loading shared libraries: libfst.so.1: cannot 
open shared object file: No such file or directory
which is not what should appear.

What version of the product are you using? On what operating system?
I'm on fedora 20, with the latest phonetisaurus

Please provide any additional information below.
I know it says that it cannot find libfst.so.1. I have openfst installed from 
source. When I search for `ls -l /usr/local/lib/libfst*` I have the following 
output : 

-rwxr-xr-x. 1 root root       924 29 nov.  16:23 /usr/local/lib/libfst.la
-rwxr-xr-x. 1 root root       960 29 nov.  16:23 /usr/local/lib/libfstscript.la
lrwxrwxrwx. 1 root root        21 29 nov.  16:23 /usr/local/lib/libfstscript.so 
-> libfstscript.so.1.0.0
lrwxrwxrwx. 1 root root        21 29 nov.  16:23 
/usr/local/lib/libfstscript.so.1 -> libfstscript.so.1.0.0
-rwxr-xr-x. 1 root root 109918335 29 nov.  16:23 
/usr/local/lib/libfstscript.so.1.0.0
lrwxrwxrwx. 1 root root        15 29 nov.  16:23 /usr/local/lib/libfst.so -> 
libfst.so.1.0.0
lrwxrwxrwx. 1 root root        15 29 nov.  16:23 /usr/local/lib/libfst.so.1 -> 
libfst.so.1.0.0
-rwxr-xr-x. 1 root root   6614868 29 nov.  16:23 /usr/local/lib/libfst.so.1.0.0

Which indicated that indeed have libfst.so.1 installed on my system. I have no 
idea why phonetisaurus cannot find it.

Original issue reported on code.google.com by malcolm....@gmail.com on 29 Nov 2014 at 6:12

GoogleCodeExporter commented 9 years ago
Hi, Thank you very much for giving it a try, and for reporting this 
installation error.

With regard to your particular error, it looks like you already have the 
correct softlink, so it might be that you need to add '/usr/local/lib' to your 
LD_LIBRARY_PATH environment variable, e.g.:

'export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib'

Also, could you confirm that you have tried this with the stable download:

https://www.dropbox.com/s/154q9yt3xenj2gr/phonetisaurus-0.8a.tgz

and the latest version of the tool:

 > phonetisaurus-g2p-omega

The download above also contains a series of complete end-to-end tests 
utilizing a [slightly dated] standardized version of the CMUdict, and some 
well-known n-gram language modeling tools [the README explains how to replicate 
the tests].  

This distribution has most recently been successfully replicated independently 
in "Encoding linear models as weighted finite-state transducers", Wu et. al, 
Interspeech 2014; so it should *hopefully* still work!

Please update if you have further troubles; and I will add this as an issue for 
a future configure script.

Thank you again for your feedback.

Original comment by Josef.Ro...@gmail.com on 29 Nov 2014 at 6:31

GoogleCodeExporter commented 9 years ago
Thanks for the super quick answer ! 

I was using phonetisaurus 0.7.8 (as I'm using it for the Jasper project, you 
may have heard about it).

When I try to run the latest stable download, I have this error showing up 
during compile (while the 0.7.8 version works fine) : 

In file included from /usr/local/include/fst/label-reachable.h:34:0,
                 from /usr/local/include/fst/lookahead-matcher.h:28,
                 from /usr/local/include/fst/lookahead-filter.h:29,
                 from /usr/local/include/fst/compose.h:31,
                 from /usr/local/include/fst/fstlib.h:63,
                 from Phonetisaurus.cpp:34:
/usr/local/include/fst/interval-set.h: In member function ‘void 
fst::IntervalSet<T>::Intersect(const fst::IntervalSet<T>&, 
fst::IntervalSet<T>*) const’:
/usr/local/include/fst/interval-set.h:221:16: erreur: parse error in template 
argument list
       if (it1->end < it2->end)
                ^
/usr/local/include/fst/interval-set.h: In member function ‘void 
fst::IntervalSet<T>::Complement(T, fst::IntervalSet<T>*) const’:
/usr/local/include/fst/interval-set.h:243:18: erreur: parse error in template 
argument list
     if (interval.begin < interval.end) {
                  ^
/usr/local/include/fst/interval-set.h:250:16: erreur: parse error in template 
argument list
   if (interval.begin < interval.end) {
                ^
/usr/local/include/fst/interval-set.h: In member function ‘bool 
fst::IntervalSet<T>::Contains(const fst::IntervalSet<T>&) const’:
/usr/local/include/fst/interval-set.h:351:54: erreur: expected ‘)’ before 
‘it1’
     } else if (it2->begin < it1->begin || it2->end > it1->end) {  // no C
                                                      ^
make: *** [Phonetisaurus.o] Erreur 1

I did had the bin the $PATH and I have openFST 1.3.3 installed.

But using that old version of phonetisaurus and having add '/usr/local/lib' to 
my LD_LIBRARY_PATH environment variable seemed to have solved my problem ! Now 
Jasper can hear words (even though he's pretty bad for now :P). Thanks a lot ! 
Can't believe it was so simple and I didn't think about it...

I can't try to find out why the latest version doesn't compile on my fedora if 
you'd like to.

Original comment by malcolm....@gmail.com on 29 Nov 2014 at 6:52

GoogleCodeExporter commented 9 years ago
Hi, glad we are getting a bit closer!

The other problem you mention is most likely tied to the version of OpenFst.
I *think* if you move to OpenFst 1.3.4 or above, and a compiler that supports 
c++11 features, it should resolve.

I believe the IntervalSet issue is due to use of/support for c++11 features. 
However it is a defect of my project that the configuration does not deal with 
this more gracefully.

Original comment by Josef.Ro...@gmail.com on 29 Nov 2014 at 6:57

GoogleCodeExporter commented 9 years ago
Hahaha fair enough ! Thanks a lot for your help, that was extremely quick !

Original comment by malcolm....@gmail.com on 29 Nov 2014 at 7:01