Closed Achronferry closed 2 years ago
I changed the KENLM_ROOT to /DB/rhome/chenyuyang/tools/kenlm/build/ and it could find KenLM, while another error comes:
/GPFS/data/chenyuyang/projects/flashlight/flashlight/lib/text/decoder/lm/KenLM.cpp:12:10: fatal error: kenlm/lm/model.hh: No such file or directory
@Achronferry — the easiest way to resolve this is to make install
KenLM — you should build it with a custom CMAKE_INSTALL_PREFIX
then install, and use that base directory as your KENLM_ROOT
.
If you can't install for whatever reason, can you try using export KENLM_ROOT= /DB/rhome/chenyuyang/tools/kenlm
? It should find the built libs in the build directory.
@Achronferry — the easiest way to resolve this is to
make install
KenLM — you should build it with a customCMAKE_INSTALL_PREFIX
then install, and use that base directory as yourKENLM_ROOT
.If you can't install for whatever reason, can you try using
export KENLM_ROOT= /DB/rhome/chenyuyang/tools/kenlm
? It should find the built libs in the build directory.
Thanks for your reply!
I guess it fail to find model.hh
just because I didn't set the CMAKE_INSTALL_PREFIX
. I changes the #include <kenlm/lm/model.hh>
in flashlight/flashlight/lib/text/decoder/lm/KenLM.cpp
to the absolute path and it also works.
@Achronferry — glad it's working. This is an artifact of how the source are laid out in KenLM (that they aren't contained in a kenlm
directory) so the header paths aren't always internally consistent post-install depending on the prefix. Let me know if you continue having issues; I'm hoping to make some improvements to KenLM to fix this issue.
Question
I try to install the Python bindings by
python setup.py install
. However, it fails to find the KenLM even if it has already been installed.Additional Context
The error log is as following, How should I set the environment variable like CMAKE_LIBRARY_PATH, KENLM_LIB or KENLM_ROOT……
I've added
export KENLM_ROOT=/DB/rhome/chenyuyang/tools/kenlm/build/bin
but it seems not work..