Tuesday, November 12, 2013

"wrong ELF class" while installing Phonetisaurus and OpenFST

I have been trying to install phonetisaurus (https://code.google.com/p/phonetisaurus/), which relies on OpenFST (http://www.openfst.org). Both packages would compile without any red flags, but when I would try to run phonetisaurus, I would the the following error:

error while loading shared libraries: libfst.so.1: wrong ELF class: ELFCLASS32

This error led me on a wild goose chase trying to explicitly specify that both programs should be compiled for a 64-bit architecture. In fact, what I really needed to do was to run sudo ldconfig. I did this after installing OpenFST and before compiling phonetisaurus. Problem solved.