pysrilm icon indicating copy to clipboard operation
pysrilm copied to clipboard

ImportError undefined symbol lbfgs

Open mtajay opened this issue 6 years ago • 3 comments

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

mtajay avatar Jan 18 '18 08:01 mtajay

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

ashimajain2595 avatar Feb 07 '18 05:02 ashimajain2595

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

tshastry avatar Feb 19 '18 19:02 tshastry

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

ashimajain2595 avatar Feb 20 '18 03:02 ashimajain2595