njsmith / pysrilm

An extremely simple Python wrapper for the SRI Language Modeling toolkit
BSD 2-Clause "Simplified" License
70 stars 20 forks source link

ImportError undefined symbol lbfgs #11

Open mtajay opened 6 years ago

mtajay commented 6 years ago

Machine: Linux i686-m64

After following the instructions of setup.

import srilm throws exception ImportError: /usr/local/lib64/python3.6/site-packages/srilm.cpython-36m-x86_64-linux-gnu.so: undefined symbol: lbfgs

ashimajain2595 commented 6 years ago

I am facing the same issue. Did anyone find a way to resolve it?

tshastry commented 6 years ago

Make sure you're following the advice here: https://github.com/njsmith/pysrilm/issues/4#issuecomment-63452522

In addition to that, make sure you've done the following: 1) Compile SRILM with MAKE_PIC=yes make 2) Add "lbfgs" to the "libraries" listed in setup.py 3) For my installation, liblbfgs was in my LD_LIBRARY_PATH, but I had to add it to LIBRARY_PATH as well before running python setup.py build_ext --inplace

ashimajain2595 commented 6 years ago

The problem was resolved when I did NO_TCL=X in the makefile