kpu / kenlm

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

Can't pip3 install kenlm on Ubuntu Focal #323

Open slgao1010 opened 3 years ago

slgao1010 commented 3 years ago

Hi I'm trying to pip3 install kenlm on Ubuntu Focal and got the following error. When I do the same pip3 install on Ubuntu Bionic it was okay. Is it because kenlm is not compatible with python 3.8?

$ pip3 install kenlm
Collecting kenlm
  Downloading kenlm-0.tar.gz (1.4 MB)
     |████████████████████████████████| 1.4 MB 2.0 MB/s
Building wheels for collected packages: kenlm
  Building wheel for kenlm (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4q8m39mp/kenlm_bcd13077c86547b594fb7842641e9165/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4q8m39mp/kenlm_bcd13077c86547b594fb7842641e9165/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-co35p7v0
       cwd: /tmp/pip-install-4q8m39mp/kenlm_bcd13077c86547b594fb7842641e9165/
  Complete output (388 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'kenlm' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/util
  creating build/temp.linux-x86_64-3.8/lm
  creating build/temp.linux-x86_64-3.8/util/double-conversion
  creating build/temp.linux-x86_64-3.8/python
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/pool.cc -o build/temp.linux-x86_64-3.8/util/pool.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/exception.cc -o build/temp.linux-x86_64-3.8/util/exception.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/bit_packing.cc -o build/temp.linux-x86_64-3.8/util/bit_packing.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/string_piece.cc -o build/temp.linux-x86_64-3.8/util/string_piece.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/spaces.cc -o build/temp.linux-x86_64-3.8/util/spaces.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/scoped.cc -o build/temp.linux-x86_64-3.8/util/scoped.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/file.cc -o build/temp.linux-x86_64-3.8/util/file.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/mmap.cc -o build/temp.linux-x86_64-3.8/util/mmap.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/murmur_hash.cc -o build/temp.linux-x86_64-3.8/util/murmur_hash.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/float_to_string.cc -o build/temp.linux-x86_64-3.8/util/float_to_string.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/read_compressed.cc -o build/temp.linux-x86_64-3.8/util/read_compressed.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/parallel_read.cc -o build/temp.linux-x86_64-3.8/util/parallel_read.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/integer_to_string.cc -o build/temp.linux-x86_64-3.8/util/integer_to_string.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/ersatz_progress.cc -o build/temp.linux-x86_64-3.8/util/ersatz_progress.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/file_piece.cc -o build/temp.linux-x86_64-3.8/util/file_piece.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/usage.cc -o build/temp.linux-x86_64-3.8/util/usage.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/read_arpa.cc -o build/temp.linux-x86_64-3.8/lm/read_arpa.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/trie_sort.cc -o build/temp.linux-x86_64-3.8/lm/trie_sort.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  In file included from lm/trie_sort.cc:6:
  ./lm/vocab.hh:210:43: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    210 | void MissingUnknown(const Config &config) throw(SpecialWordMissingException);
        |                                           ^~~~~
  ./lm/vocab.hh:211:67: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    211 | void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException);
        |                                                                   ^~~~~
  ./lm/vocab.hh:213:85: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    213 | template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) throw(SpecialWordMissingException) {
        |                                                                                     ^~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/value_build.cc -o build/temp.linux-x86_64-3.8/lm/value_build.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  In file included from ./lm/model.hh:13,
                   from lm/value_build.cc:3:
  ./lm/vocab.hh:210:43: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    210 | void MissingUnknown(const Config &config) throw(SpecialWordMissingException);
        |                                           ^~~~~
  ./lm/vocab.hh:211:67: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    211 | void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException);
        |                                                                   ^~~~~
  ./lm/vocab.hh:213:85: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    213 | template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) throw(SpecialWordMissingException) {
        |                                                                                     ^~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/bhiksha.cc -o build/temp.linux-x86_64-3.8/lm/bhiksha.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/binary_format.cc -o build/temp.linux-x86_64-3.8/lm/binary_format.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  lm/binary_format.cc: In member function ‘void lm::ngram::BinaryFormat::FinishFile(const lm::ngram::Config&, lm::ngram::ModelType, unsigned int, const std::vector<long unsigned int>&)’:
  lm/binary_format.cc:261:40: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct lm::ngram::Parameters’ with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
    261 |   memset(&params, 0, sizeof(Parameters));
        |                                        ^
  In file included from lm/binary_format.cc:1:
  ./lm/binary_format.hh:42:8: note: ‘struct lm::ngram::Parameters’ declared here
     42 | struct Parameters {
        |        ^~~~~~~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/quantize.cc -o build/temp.linux-x86_64-3.8/lm/quantize.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/virtual_interface.cc -o build/temp.linux-x86_64-3.8/lm/virtual_interface.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/trie.cc -o build/temp.linux-x86_64-3.8/lm/trie.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/model.cc -o build/temp.linux-x86_64-3.8/lm/model.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  In file included from ./lm/model.hh:13,
                   from lm/model.cc:1:
  ./lm/vocab.hh:210:43: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    210 | void MissingUnknown(const Config &config) throw(SpecialWordMissingException);
        |                                           ^~~~~
  ./lm/vocab.hh:211:67: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    211 | void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException);
        |                                                                   ^~~~~
  ./lm/vocab.hh:213:85: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    213 | template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) throw(SpecialWordMissingException) {
        |                                                                                     ^~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/lm_exception.cc -o build/temp.linux-x86_64-3.8/lm/lm_exception.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/search_hashed.cc -o build/temp.linux-x86_64-3.8/lm/search_hashed.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  In file included from ./lm/model.hh:13,
                   from lm/search_hashed.cc:6:
  ./lm/vocab.hh:210:43: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    210 | void MissingUnknown(const Config &config) throw(SpecialWordMissingException);
        |                                           ^~~~~
  ./lm/vocab.hh:211:67: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    211 | void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException);
        |                                                                   ^~~~~
  ./lm/vocab.hh:213:85: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    213 | template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) throw(SpecialWordMissingException) {
        |                                                                                     ^~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/config.cc -o build/temp.linux-x86_64-3.8/lm/config.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/search_trie.cc -o build/temp.linux-x86_64-3.8/lm/search_trie.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  In file included from lm/search_trie.cc:12:
  ./lm/vocab.hh:210:43: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    210 | void MissingUnknown(const Config &config) throw(SpecialWordMissingException);
        |                                           ^~~~~
  ./lm/vocab.hh:211:67: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    211 | void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException);
        |                                                                   ^~~~~
  ./lm/vocab.hh:213:85: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    213 | template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) throw(SpecialWordMissingException) {
        |                                                                                     ^~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/sizes.cc -o build/temp.linux-x86_64-3.8/lm/sizes.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  In file included from ./lm/model.hh:13,
                   from lm/sizes.cc:2:
  ./lm/vocab.hh:210:43: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    210 | void MissingUnknown(const Config &config) throw(SpecialWordMissingException);
        |                                           ^~~~~
  ./lm/vocab.hh:211:67: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    211 | void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException);
        |                                                                   ^~~~~
  ./lm/vocab.hh:213:85: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    213 | template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) throw(SpecialWordMissingException) {
        |                                                                                     ^~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c lm/vocab.cc -o build/temp.linux-x86_64-3.8/lm/vocab.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  In file included from lm/vocab.cc:1:
  ./lm/vocab.hh:210:43: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    210 | void MissingUnknown(const Config &config) throw(SpecialWordMissingException);
        |                                           ^~~~~
  ./lm/vocab.hh:211:67: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    211 | void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException);
        |                                                                   ^~~~~
  ./lm/vocab.hh:213:85: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    213 | template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) throw(SpecialWordMissingException) {
        |                                                                                     ^~~~~
  lm/vocab.cc:285:43: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    285 | void MissingUnknown(const Config &config) throw(SpecialWordMissingException) {
        |                                           ^~~~~
  lm/vocab.cc:297:67: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    297 | void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException) {
        |                                                                   ^~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/double-conversion/bignum.cc -o build/temp.linux-x86_64-3.8/util/double-conversion/bignum.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/double-conversion/diy-fp.cc -o build/temp.linux-x86_64-3.8/util/double-conversion/diy-fp.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/double-conversion/double-conversion.cc -o build/temp.linux-x86_64-3.8/util/double-conversion/double-conversion.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/double-conversion/fast-dtoa.cc -o build/temp.linux-x86_64-3.8/util/double-conversion/fast-dtoa.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/double-conversion/bignum-dtoa.cc -o build/temp.linux-x86_64-3.8/util/double-conversion/bignum-dtoa.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/double-conversion/strtod.cc -o build/temp.linux-x86_64-3.8/util/double-conversion/strtod.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/double-conversion/fixed-dtoa.cc -o build/temp.linux-x86_64-3.8/util/double-conversion/fixed-dtoa.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c util/double-conversion/cached-powers.cc -o build/temp.linux-x86_64-3.8/util/double-conversion/cached-powers.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include/python3.8 -c python/kenlm.cpp -o build/temp.linux-x86_64-3.8/python/kenlm.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB
  In file included from ./lm/model.hh:13,
                   from python/kenlm.cpp:253:
  ./lm/vocab.hh:210:43: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    210 | void MissingUnknown(const Config &config) throw(SpecialWordMissingException);
        |                                           ^~~~~
  ./lm/vocab.hh:211:67: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    211 | void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException);
        |                                                                   ^~~~~
  ./lm/vocab.hh:213:85: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    213 | template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) throw(SpecialWordMissingException) {
        |                                                                                     ^~~~~
  python/kenlm.cpp: In function ‘PyObject* PyInit_kenlm()’:
  python/kenlm.cpp:4876:37: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4876 |   __pyx_type_5kenlm_FullScoreReturn.tp_print = 0;
        |                                     ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4876:37: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4876 |   __pyx_type_5kenlm_FullScoreReturn.tp_print = 0;
        |                                     ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4876:37: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4876 |   __pyx_type_5kenlm_FullScoreReturn.tp_print = 0;
        |                                     ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4880:27: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4880 |   __pyx_type_5kenlm_State.tp_print = 0;
        |                           ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4880:27: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4880 |   __pyx_type_5kenlm_State.tp_print = 0;
        |                           ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4880:27: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4880 |   __pyx_type_5kenlm_State.tp_print = 0;
        |                           ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4884:28: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4884 |   __pyx_type_5kenlm_Config.tp_print = 0;
        |                            ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4884:28: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4884 |   __pyx_type_5kenlm_Config.tp_print = 0;
        |                            ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4884:28: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4884 |   __pyx_type_5kenlm_Config.tp_print = 0;
        |                            ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4888:27: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4888 |   __pyx_type_5kenlm_Model.tp_print = 0;
        |                           ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4888:27: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4888 |   __pyx_type_5kenlm_Model.tp_print = 0;
        |                           ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4888:27: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4888 |   __pyx_type_5kenlm_Model.tp_print = 0;
        |                           ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4902:53: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4902 |   __pyx_type_5kenlm___pyx_scope_struct__full_scores.tp_print = 0;
        |                                                     ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4902:53: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4902 |   __pyx_type_5kenlm___pyx_scope_struct__full_scores.tp_print = 0;
        |                                                     ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp:4902:53: warning: ‘_typeobject::tp_print’ is deprecated [-Wdeprecated-declarations]
   4902 |   __pyx_type_5kenlm___pyx_scope_struct__full_scores.tp_print = 0;
        |                                                     ^~~~~~~~
  In file included from /usr/include/python3.8/object.h:746,
                   from /usr/include/python3.8/pytime.h:6,
                   from /usr/include/python3.8/Python.h:85,
                   from python/kenlm.cpp:16:
  /usr/include/python3.8/cpython/object.h:260:30: note: declared here
    260 |     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
        |                              ^~~~~~~~
  python/kenlm.cpp: In function ‘void __Pyx_ExceptionSave(PyObject**, PyObject**, PyObject**)’:
  python/kenlm.cpp:5583:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   5583 |     *type = tstate->exc_type;
        |                     ^~~~~~~~
        |                     curexc_type
  python/kenlm.cpp:5584:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   5584 |     *value = tstate->exc_value;
        |                      ^~~~~~~~~
        |                      curexc_value
  python/kenlm.cpp:5585:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   5585 |     *tb = tstate->exc_traceback;
        |                   ^~~~~~~~~~~~~
        |                   curexc_traceback
  python/kenlm.cpp: In function ‘void __Pyx_ExceptionReset(PyObject*, PyObject*, PyObject*)’:
  python/kenlm.cpp:5597:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   5597 |     tmp_type = tstate->exc_type;
        |                        ^~~~~~~~
        |                        curexc_type
  python/kenlm.cpp:5598:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   5598 |     tmp_value = tstate->exc_value;
        |                         ^~~~~~~~~
        |                         curexc_value
  python/kenlm.cpp:5599:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   5599 |     tmp_tb = tstate->exc_traceback;
        |                      ^~~~~~~~~~~~~
        |                      curexc_traceback
  python/kenlm.cpp:5600:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   5600 |     tstate->exc_type = type;
        |             ^~~~~~~~
        |             curexc_type
  python/kenlm.cpp:5601:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   5601 |     tstate->exc_value = value;
        |             ^~~~~~~~~
        |             curexc_value
  python/kenlm.cpp:5602:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   5602 |     tstate->exc_traceback = tb;
        |             ^~~~~~~~~~~~~
        |             curexc_traceback
  python/kenlm.cpp: In function ‘int __Pyx_GetException(PyObject**, PyObject**, PyObject**)’:
  python/kenlm.cpp:5645:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   5645 |     tmp_type = tstate->exc_type;
        |                        ^~~~~~~~
        |                        curexc_type
  python/kenlm.cpp:5646:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   5646 |     tmp_value = tstate->exc_value;
        |                         ^~~~~~~~~
        |                         curexc_value
  python/kenlm.cpp:5647:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   5647 |     tmp_tb = tstate->exc_traceback;
        |                      ^~~~~~~~~~~~~
        |                      curexc_traceback
  python/kenlm.cpp:5648:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   5648 |     tstate->exc_type = local_type;
        |             ^~~~~~~~
        |             curexc_type
  python/kenlm.cpp:5649:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   5649 |     tstate->exc_value = local_value;
        |             ^~~~~~~~~
        |             curexc_value
  python/kenlm.cpp:5650:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   5650 |     tstate->exc_traceback = local_tb;
        |             ^~~~~~~~~~~~~
        |             curexc_traceback
  python/kenlm.cpp: In function ‘void __Pyx_ExceptionSwap(PyObject**, PyObject**, PyObject**)’:
  python/kenlm.cpp:6376:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   6376 |     tmp_type = tstate->exc_type;
        |                        ^~~~~~~~
        |                        curexc_type
  python/kenlm.cpp:6377:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   6377 |     tmp_value = tstate->exc_value;
        |                         ^~~~~~~~~
        |                         curexc_value
  python/kenlm.cpp:6378:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   6378 |     tmp_tb = tstate->exc_traceback;
        |                      ^~~~~~~~~~~~~
        |                      curexc_traceback
  python/kenlm.cpp:6379:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
   6379 |     tstate->exc_type = *type;
        |             ^~~~~~~~
        |             curexc_type
  python/kenlm.cpp:6380:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
   6380 |     tstate->exc_value = *value;
        |             ^~~~~~~~~
        |             curexc_value
  python/kenlm.cpp:6381:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
   6381 |     tstate->exc_traceback = *tb;
        |             ^~~~~~~~~~~~~
        |             curexc_traceback
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for kenlm
  Running setup.py clean for kenlm
Failed to build kenlm
kpu commented 3 years ago

This smells like the cython is out of date.
Can you try this?

  1. git clone https://github.com/kpu/kenlm/
  2. cd kenlm/python
  3. cython -3 --cplus kenlm.pyx
  4. pip install from the checkout

If it works, then I can push out an updated cython.

slgao1010 commented 3 years ago

Yes this works! Thank you.

slgao1010 commented 3 years ago

FYI I tried both cython and cython3 and they both worked.

alvynabranches commented 3 years ago

This is working.

burgil commented 2 years ago

can someone please help me figure out step 4 pip install from the checkout, what is the checkout?

khu834 commented 2 years ago

can someone please help me figure out step 4 pip install from the checkout, what is the checkout?

just go to the kenlm directory (where setup.py lives) and run pip install -e .