kpu / kenlm

KenLM: Faster and Smaller Language Model Queries
http://kheafield.com/code/kenlm/
Other
2.51k stars 511 forks source link

Segmentation fault by estimating #187

Open gospodima opened 6 years ago

gospodima commented 6 years ago

I am trying to estimate language model on Raspbian. I got a segmentation fault when running kenlm/build/bin/lmplz -o 4 --prune 0 1 2 3 --limit_vocab_file vocab.txt --interpolate_unigrams 0 <lm.txt >lm.arpa. Information from gdb:

Program received signal SIGSEGV, Segmentation fault.
0x00093190 in boost::detail::function::void_function_obj_invoker1<lm::(anonymous namespace)::SizeNotify, void, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>::invoke(boost::detail::function::function_buffer&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
(gdb) where
#0  0x00093190 in boost::detail::function::void_function_obj_invoker1<lm::(anonymous namespace)::SizeNotify, void, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>::invoke(boost::detail::function::function_buffer&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#1  0x0005bdf4 in boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>::notify(boost::any const&) const ()
#2  0x76f6fc6c in boost::program_options::variables_map::notify() ()
   from /usr/lib/arm-linux-gnueabihf/libboost_program_options.so.1.62.0
#3  0x00051acc in main ()
(gdb) list
1   ../sysdeps/unix/sysv/linux/arm/dl-procinfo.c: No such file or directory.

Is there a way to run the program on raspberry pi?

kpu commented 6 years ago

I smell compilation with a different version of Boost than is installed as a shared library on the system.

gospodima commented 6 years ago

@kpu, I have Boost 1.62.0 on my system. And I installed KenLM as described on this page.