jd-boyd / python-lzo

Python bindings for the LZO data compression library
GNU General Public License v2.0
74 stars 41 forks source link

1.15 version Could not install on kali #76

Closed blocks3ck closed 10 months ago

blocks3ck commented 1 year ago

My machine is Linux kali 5.15.0-kali3-amd64 #1 SMP Debian 5.15.15-2kali1 (2022-01-31) x86_64 GNU/Linux. There is the error log.

┌──(kali㉿kali)-[~/IOT/lzo-2.10/build]
└─$ pip install python-lzo                                                                                                                                      
Defaulting to user installation because normal site-packages is not writeable
Collecting python-lzo
  Using cached python-lzo-1.15.tar.gz (17 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: python-lzo
  Building wheel for python-lzo (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for python-lzo (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [2029 lines of output]
      running bdist_wheel
      running build
      running build_ext
      creating build
      creating build/temp.linux-x86_64-3.10
      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 -fPIC -I/usr/include -I/usr/include/python3.10 -c lzomodule.c -o build/temp.linux-x86_64-3.10/lzomodule.o
      lzomodule.c: In function ‘compress’:
      lzomodule.c:121:13: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
        121 |     if (len > LZO_UINT_MAX) {
            |             ^
      lzomodule.c:126:35: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
        126 |     if ((len + len / 16 + 64 + 3) > LZO_UINT_MAX) {
            |                                   ^
      lzomodule.c: In function ‘optimize’:
      lzomodule.c:453:44: warning: pointer targets in passing argument 1 of ‘PyBytes_FromStringAndSize’ differ in signedness [-Wpointer-sign]
        453 |     result_str = PyBytes_FromStringAndSize(in, len);
            |                                            ^~
            |                                            |
            |                                            unsigned char *
      In file included from /usr/include/python3.10/Python.h:82,
                       from lzomodule.c:36:
      /usr/include/python3.10/bytesobject.h:34:50: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
         34 | PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
            |                                                  ^~~~~~~~~~~~
      At top level:
      lzomodule.c:577:25: warning: ‘module_documentation’ defined but not used [-Wunused-variable]
        577 | static /* const */ char module_documentation[]=
            |                         ^~~~~~~~~~~~~~~~~~~~
      creating build/lib.linux-x86_64-3.10
      x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 build/temp.linux-x86_64-3.10/lzomodule.o -L/usr/lib/x86_64-linux-gnu -llzo2 -o build/lib.linux-x86_64-3.10/lzo.cpython-310-x86_64-linux-gnu.so
      running install
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 230, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
          self.run_setup()
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 158, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 130, in <module>
          setup(**setup_args)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 148, in setup
          return run_commands(dist)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 163, in run_commands
          dist.run_commands()
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 986, in run_command
          cmd_obj.run()
        File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 335, in run
          self.run_command('install')
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 985, in run_command
          cmd_obj.ensure_finalized()
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
          self.finalize_options()
        File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 45, in finalize_options
          orig.install.finalize_options(self)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 320, in finalize_options
          self.finalize_unix()
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 59, in finalize_unix
          super().finalize_unix()
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 488, in finalize_unix
          self.select_scheme("posix_prefix")
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 55, in select_scheme
          super().select_scheme(name)
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 522, in select_scheme
          scheme = _load_schemes()[name]
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes

        ... ... 
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
          _inject_headers(name, scheme)
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
          scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
        File "/usr/lib/python3.10/_distutils_system_mod.py", line 135, in wrapped_load_schemes
          schemes = _load_schemes()
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 103, in _load_schemes
          sysconfig_schemes = _load_sysconfig_schemes() or {}
        File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 91, in _load_sysconfig_schemes
          with contextlib.suppress(AttributeError):
      RecursionError: maximum recursion depth exceeded
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-lzo
Failed to build python-lzo                                                                                                                                                                  
ERROR: Could not build wheels for python-lzo, which is required to install pyproject.toml-based projects
AT0myks commented 1 year ago

Looks like this Debian bug. You might want to upgrade your packages and more specifically libpython3.10-stdlib. Or you can install a wheel with pip install -i https://test.pypi.org/simple/ python-lzo.

jd-boyd commented 10 months ago

Since the original reported never replied to @AT0myks , I'm going to assume that his suggestion was correct and there is no real issue to address.