Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't pip install kenlm on ubuntu 24.04 #455

Open
mahdiahmadi87 opened this issue Aug 7, 2024 · 0 comments
Open

can't pip install kenlm on ubuntu 24.04 #455

mahdiahmadi87 opened this issue Aug 7, 2024 · 0 comments

Comments

@mahdiahmadi87
Copy link

mahdiahmadi87 commented Aug 7, 2024

i use ubuntu 24.04 and pyhton 3.11.9 and pip 24.0

i run pip install kenlm:

`(env) mahdi@mahdi-ubuntu:~/Documents/hodhod/hodhod$ pip install kenlm
Collecting kenlm
Using cached kenlm-0.2.0.tar.gz (427 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: kenlm
Building wheel for kenlm (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for kenlm (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [300 lines of output]
Will build with KenLM max_order set to 6
running bdist_wheel
running build
running build_ext
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.
  
  
  -- The C compiler identification is GNU 13.2.0
  -- The CXX compiler identification is GNU 13.2.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  CMake Deprecation Warning at python/BuildStandalone.cmake:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.
  
    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.
  Call Stack (most recent call first):
    CMakeLists.txt:31 (include)
  
  
  -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.3")
  -- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.8")
  -- Looking for BZ2_bzCompressInit
  -- Looking for BZ2_bzCompressInit - found
  -- Looking for lzma_auto_decoder in /usr/lib/x86_64-linux-gnu/liblzma.so
  -- Looking for lzma_auto_decoder in /usr/lib/x86_64-linux-gnu/liblzma.so - found
  -- Looking for lzma_easy_encoder in /usr/lib/x86_64-linux-gnu/liblzma.so
  -- Looking for lzma_easy_encoder in /usr/lib/x86_64-linux-gnu/liblzma.so - found
  -- Looking for lzma_lzma_preset in /usr/lib/x86_64-linux-gnu/liblzma.so
  -- Looking for lzma_lzma_preset in /usr/lib/x86_64-linux-gnu/liblzma.so - found
  -- Found LibLZMA: /usr/lib/x86_64-linux-gnu/liblzma.so (found version "5.4.5")
  -- Configuring done (0.8s)
  -- Generating done (0.0s)
  -- Build files have been written to: /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/build/temp.linux-x86_64-cpython-311
  [  2%] Building CXX object CMakeFiles/kenlm.dir/lm/bhiksha.cc.o
  [  4%] Building CXX object CMakeFiles/kenlm.dir/lm/binary_format.cc.o
  [  7%] Building CXX object CMakeFiles/kenlm.dir/lm/config.cc.o
  [  9%] Building CXX object CMakeFiles/kenlm.dir/lm/lm_exception.cc.o
  [ 12%] Building CXX object CMakeFiles/kenlm.dir/lm/model.cc.o
  [ 14%] Building CXX object CMakeFiles/kenlm.dir/lm/quantize.cc.o
  [ 17%] Building CXX object CMakeFiles/kenlm.dir/lm/read_arpa.cc.o
  [ 19%] Building CXX object CMakeFiles/kenlm.dir/lm/search_hashed.cc.o
  [ 21%] Building CXX object CMakeFiles/kenlm.dir/lm/search_trie.cc.o
  [ 24%] Building CXX object CMakeFiles/kenlm.dir/lm/sizes.cc.o
  In file included from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/search_trie.cc:11:
  /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/trie_sort.hh:31:34: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
     31 | class EntryCompare : public std::binary_function<const void*, const void*, bool> {
        |                                  ^~~~~~~~~~~~~~~
  In file included from /usr/include/c++/13/string:49,
                   from /usr/include/c++/13/bits/locale_classes.h:40,
                   from /usr/include/c++/13/bits/ios_base.h:41,
                   from /usr/include/c++/13/ios:44,
                   from /usr/include/c++/13/ostream:40,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/string_piece.hh:55,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/fake_ostream.hh:6,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/string_stream.hh:4,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/exception.hh:4,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/lm_exception.hh:6,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/config.hh:4,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/search_trie.hh:4,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/search_trie.cc:2:
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  In file included from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/search_trie.cc:19:
  /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/sized_iterator.hh:130:86: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
    130 | template <class Delegate, class Proxy = SizedProxy> class SizedCompare : public std::binary_function<const Proxy &, const Proxy &, bool> {
        |                                                                                      ^~~~~~~~~~~~~~~
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/sized_iterator.hh:157:71: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
    157 | template <class Delegate, unsigned Size> class JustPODDelegate : std::binary_function<const JustPOD<Size> &, const JustPOD<Size> &, bool> {
        |                                                                       ^~~~~~~~~~~~~~~
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  [ 26%] Building CXX object CMakeFiles/kenlm.dir/lm/trie.cc.o
  [ 29%] Building CXX object CMakeFiles/kenlm.dir/lm/trie_sort.cc.o
  [ 31%] Building CXX object CMakeFiles/kenlm.dir/lm/value_build.cc.o
  In file included from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/trie_sort.cc:1:
  /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/trie_sort.hh:31:34: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
     31 | class EntryCompare : public std::binary_function<const void*, const void*, bool> {
        |                                  ^~~~~~~~~~~~~~~
  In file included from /usr/include/c++/13/string:49,
                   from /usr/include/c++/13/bits/locale_classes.h:40,
                   from /usr/include/c++/13/bits/ios_base.h:41,
                   from /usr/include/c++/13/ios:44,
                   from /usr/include/c++/13/ostream:40,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/string_piece.hh:55,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/fake_ostream.hh:6,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/string_stream.hh:4,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/exception.hh:4,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/file.hh:4,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/trie_sort.hh:9:
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  In file included from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/trie_sort.cc:13:
  /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/sized_iterator.hh:130:86: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
    130 | template <class Delegate, class Proxy = SizedProxy> class SizedCompare : public std::binary_function<const Proxy &, const Proxy &, bool> {
        |                                                                                      ^~~~~~~~~~~~~~~
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/sized_iterator.hh:157:71: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
    157 | template <class Delegate, unsigned Size> class JustPODDelegate : std::binary_function<const JustPOD<Size> &, const JustPOD<Size> &, bool> {
        |                                                                       ^~~~~~~~~~~~~~~
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  [ 34%] Building CXX object CMakeFiles/kenlm.dir/lm/virtual_interface.cc.o
  [ 36%] Building CXX object CMakeFiles/kenlm.dir/lm/vocab.cc.o
  [ 39%] Building CXX object CMakeFiles/kenlm.dir/python/score_sentence.cc.o
  In file included from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/vocab.cc:11:
  /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/joint_sort.hh:104:68: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
    104 | template <class Proxy, class Less> class LessWrapper : public std::binary_function<const typename Proxy::value_type &, const typename Proxy::value_type &, bool> {
        |                                                                    ^~~~~~~~~~~~~~~
  In file included from /usr/include/c++/13/string:49,
                   from /usr/include/c++/13/bits/locale_classes.h:40,
                   from /usr/include/c++/13/bits/ios_base.h:41,
                   from /usr/include/c++/13/ios:44,
                   from /usr/include/c++/13/ostream:40,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/string_piece.hh:55,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/enumerate_vocab.hh:5,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/vocab.hh:4,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/vocab.cc:1:
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  In file included from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/python/score_sentence.cc:3:
  /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/util/tokenize_piece.hh:99:77: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
     99 | template <class Find, bool SkipEmpty = false> class TokenIter : public std::iterator<std::forward_iterator_tag, const StringPiece, std::ptrdiff_t, const StringPiece *, const StringPiece &> {
        |                                                                             ^~~~~~~~
  In file included from /usr/include/c++/13/bits/stl_iterator_base_funcs.h:66,
                   from /usr/include/c++/13/string:47,
                   from /usr/include/c++/13/bits/locale_classes.h:40,
                   from /usr/include/c++/13/bits/ios_base.h:41,
                   from /usr/include/c++/13/ios:44,
                   from /usr/include/c++/13/ostream:40,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/../util/string_piece.hh:55,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/lm/virtual_interface.hh:6,
                   from /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/python/score_sentence.cc:2:
  /usr/include/c++/13/bits/stl_iterator_base_types.h:127:34: note: declared here
    127 |     struct _GLIBCXX17_DEPRECATED iterator
        |                                  ^~~~~~~~
  [ 41%] Building CXX object CMakeFiles/kenlm.dir/util/bit_packing.cc.o
  [ 43%] Building CXX object CMakeFiles/kenlm.dir/util/double-conversion/bignum-dtoa.cc.o
  [ 46%] Building CXX object CMakeFiles/kenlm.dir/util/double-conversion/bignum.cc.o
  [ 48%] Building CXX object CMakeFiles/kenlm.dir/util/double-conversion/cached-powers.cc.o
  [ 51%] Building CXX object CMakeFiles/kenlm.dir/util/double-conversion/double-to-string.cc.o
  [ 53%] Building CXX object CMakeFiles/kenlm.dir/util/double-conversion/fast-dtoa.cc.o
  [ 56%] Building CXX object CMakeFiles/kenlm.dir/util/double-conversion/fixed-dtoa.cc.o
  [ 58%] Building CXX object CMakeFiles/kenlm.dir/util/double-conversion/string-to-double.cc.o
  [ 60%] Building CXX object CMakeFiles/kenlm.dir/util/double-conversion/strtod.cc.o
  [ 63%] Building CXX object CMakeFiles/kenlm.dir/util/ersatz_progress.cc.o
  [ 65%] Building CXX object CMakeFiles/kenlm.dir/util/exception.cc.o
  [ 68%] Building CXX object CMakeFiles/kenlm.dir/util/file.cc.o
  [ 70%] Building CXX object CMakeFiles/kenlm.dir/util/file_piece.cc.o
  [ 73%] Building CXX object CMakeFiles/kenlm.dir/util/float_to_string.cc.o
  [ 75%] Building CXX object CMakeFiles/kenlm.dir/util/integer_to_string.cc.o
  [ 78%] Building CXX object CMakeFiles/kenlm.dir/util/mmap.cc.o
  [ 80%] Building CXX object CMakeFiles/kenlm.dir/util/murmur_hash.cc.o
  [ 82%] Building CXX object CMakeFiles/kenlm.dir/util/parallel_read.cc.o
  [ 85%] Building CXX object CMakeFiles/kenlm.dir/util/pool.cc.o
  [ 87%] Building CXX object CMakeFiles/kenlm.dir/util/read_compressed.cc.o
  [ 90%] Building CXX object CMakeFiles/kenlm.dir/util/scoped.cc.o
  [ 92%] Building CXX object CMakeFiles/kenlm.dir/util/spaces.cc.o
  [ 95%] Building CXX object CMakeFiles/kenlm.dir/util/string_piece.cc.o
  [ 97%] Building CXX object CMakeFiles/kenlm.dir/util/usage.cc.o
  [100%] Linking CXX shared library /tmp/pip-install-1foo6bck/kenlm_d5bef68c8f1847f99c330cb21d276076/build/lib.linux-x86_64-cpython-311/libkenlm.so
  [100%] Built target kenlm
  building 'kenlm' extension
  creating build/temp.linux-x86_64-cpython-311/lm
  creating build/temp.linux-x86_64-cpython-311/python
  creating build/temp.linux-x86_64-cpython-311/util
  creating build/temp.linux-x86_64-cpython-311/util/double-conversion
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/bhiksha.cc -o build/temp.linux-x86_64-cpython-311/lm/bhiksha.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/binary_format.cc -o build/temp.linux-x86_64-cpython-311/lm/binary_format.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  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:9: 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 -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/config.cc -o build/temp.linux-x86_64-cpython-311/lm/config.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/lm_exception.cc -o build/temp.linux-x86_64-cpython-311/lm/lm_exception.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/model.cc -o build/temp.linux-x86_64-cpython-311/lm/model.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/quantize.cc -o build/temp.linux-x86_64-cpython-311/lm/quantize.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/read_arpa.cc -o build/temp.linux-x86_64-cpython-311/lm/read_arpa.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/search_hashed.cc -o build/temp.linux-x86_64-cpython-311/lm/search_hashed.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/search_trie.cc -o build/temp.linux-x86_64-cpython-311/lm/search_trie.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  In file included from lm/search_trie.cc:11:
  lm/trie_sort.hh:31:34: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
     31 | class EntryCompare : public std::binary_function<const void*, const void*, bool> {
        |                                  ^~~~~~~~~~~~~~~
  In file included from /usr/include/c++/13/string:49,
                   from /usr/include/c++/13/bits/locale_classes.h:40,
                   from /usr/include/c++/13/bits/ios_base.h:41,
                   from /usr/include/c++/13/ios:44,
                   from /usr/include/c++/13/ostream:40,
                   from lm/../util/string_piece.hh:55,
                   from lm/../util/fake_ostream.hh:6,
                   from lm/../util/string_stream.hh:4,
                   from lm/../util/exception.hh:4,
                   from lm/lm_exception.hh:6,
                   from lm/config.hh:4,
                   from lm/search_trie.hh:4,
                   from lm/search_trie.cc:2:
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  In file included from lm/search_trie.cc:19:
  lm/../util/sized_iterator.hh:130:86: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
    130 | template <class Delegate, class Proxy = SizedProxy> class SizedCompare : public std::binary_function<const Proxy &, const Proxy &, bool> {
        |                                                                                      ^~~~~~~~~~~~~~~
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  lm/../util/sized_iterator.hh:157:71: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
    157 | template <class Delegate, unsigned Size> class JustPODDelegate : std::binary_function<const JustPOD<Size> &, const JustPOD<Size> &, bool> {
        |                                                                       ^~~~~~~~~~~~~~~
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/sizes.cc -o build/temp.linux-x86_64-cpython-311/lm/sizes.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/trie.cc -o build/temp.linux-x86_64-cpython-311/lm/trie.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/trie_sort.cc -o build/temp.linux-x86_64-cpython-311/lm/trie_sort.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  In file included from lm/trie_sort.cc:1:
  lm/trie_sort.hh:31:34: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
     31 | class EntryCompare : public std::binary_function<const void*, const void*, bool> {
        |                                  ^~~~~~~~~~~~~~~
  In file included from /usr/include/c++/13/string:49,
                   from /usr/include/c++/13/bits/locale_classes.h:40,
                   from /usr/include/c++/13/bits/ios_base.h:41,
                   from /usr/include/c++/13/ios:44,
                   from /usr/include/c++/13/ostream:40,
                   from lm/../util/string_piece.hh:55,
                   from lm/../util/fake_ostream.hh:6,
                   from lm/../util/string_stream.hh:4,
                   from lm/../util/exception.hh:4,
                   from lm/../util/file.hh:4,
                   from lm/trie_sort.hh:9:
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  In file included from lm/trie_sort.cc:13:
  lm/../util/sized_iterator.hh:130:86: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
    130 | template <class Delegate, class Proxy = SizedProxy> class SizedCompare : public std::binary_function<const Proxy &, const Proxy &, bool> {
        |                                                                                      ^~~~~~~~~~~~~~~
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  lm/../util/sized_iterator.hh:157:71: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
    157 | template <class Delegate, unsigned Size> class JustPODDelegate : std::binary_function<const JustPOD<Size> &, const JustPOD<Size> &, bool> {
        |                                                                       ^~~~~~~~~~~~~~~
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/value_build.cc -o build/temp.linux-x86_64-cpython-311/lm/value_build.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/virtual_interface.cc -o build/temp.linux-x86_64-cpython-311/lm/virtual_interface.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c lm/vocab.cc -o build/temp.linux-x86_64-cpython-311/lm/vocab.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  In file included from lm/vocab.cc:11:
  lm/../util/joint_sort.hh:104:68: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
    104 | template <class Proxy, class Less> class LessWrapper : public std::binary_function<const typename Proxy::value_type &, const typename Proxy::value_type &, bool> {
        |                                                                    ^~~~~~~~~~~~~~~
  In file included from /usr/include/c++/13/string:49,
                   from /usr/include/c++/13/bits/locale_classes.h:40,
                   from /usr/include/c++/13/bits/ios_base.h:41,
                   from /usr/include/c++/13/ios:44,
                   from /usr/include/c++/13/ostream:40,
                   from lm/../util/string_piece.hh:55,
                   from lm/enumerate_vocab.hh:5,
                   from lm/vocab.hh:4,
                   from lm/vocab.cc:1:
  /usr/include/c++/13/bits/stl_function.h:131:12: note: declared here
    131 |     struct binary_function
        |            ^~~~~~~~~~~~~~~
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I. -I/home/mahdi/Documents/hodhod/env/include -I/usr/include/python3.11 -c python/kenlm.cpp -o build/temp.linux-x86_64-cpython-311/python/kenlm.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_CLOCKGETTIME -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
  python/kenlm.cpp:6:10: fatal error: Python.h: No such file or directory
      6 | #include "Python.h"
        |          ^~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for kenlm
Failed to build kenlm
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (kenlm)
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant