py-lapsolver icon indicating copy to clipboard operation
py-lapsolver copied to clipboard

Fail to install 1.1.0 for python 3.11 on ubuntu 22.04

Open vivi2053 opened this issue 1 month ago • 0 comments

...
In file included from /root/.pyenv/versions/3.11.14/include/python3.11/Python.h:38,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/detail/common.h:111,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/pytypes.h:12,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/cast.h:13,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/pybind11.h:43,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/src/lapsolverc.cpp:1:
      /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/pybind11.h:1895:52: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
       1895 |             frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
            |                                                    ^~
      /root/.pyenv/versions/3.11.14/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
         24 | #define _Py_CAST(type, expr) ((type)(expr))
            |                                      ^~~~
      /root/.pyenv/versions/3.11.14/include/python3.11/cpython/tupleobject.h:30:38: note: in expansion of macro ‘_PyTuple_CAST’
         30 | #define PyTuple_GET_ITEM(op, index) (_PyTuple_CAST(op)->ob_item[index])
            |                                      ^~~~~~~~~~~~~
      /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/pybind11.h:1895:30: note: in expansion of macro ‘PyTuple_GET_ITEM’
       1895 |             frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
            |                              ^~~~~~~~~~~~~~~~
      In file included from /root/.pyenv/versions/3.11.14/include/python3.11/Python.h:42,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/detail/common.h:111,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/pytypes.h:12,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/cast.h:13,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/attr.h:13,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/pybind11/include/pybind11/pybind11.h:43,
                       from /tmp/pip-install-ioxn90mm/lapsolver_12e01a83e8c649c7bfdd5f25cfafe71f/src/lapsolverc.cpp:1:
      /root/.pyenv/versions/3.11.14/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
  gmake[2]: *** [CMakeFiles/lapsolverc.dir/build.make:76: CMakeFiles/lapsolverc.dir/src/lapsolverc.cpp.o] Error 1
      gmake[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/lapsolverc.dir/all] Error 2
      gmake: *** [Makefile:91: all] Error 2
      Traceback (most recent call last):
        File "/root/.pyenv/versions/3.11.14/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
        File "/root/.pyenv/versions/3.11.14/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/root/.pyenv/versions/3.11.14/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
          return _build_backend().build_wheel(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 435, in build_wheel
          return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 423, in _build
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 404, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 512, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 72, in <module>
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 115, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 186, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/command/bdist_wheel.py", line 370, in run
          self.run_command("build")
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-ke7uza69/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "<string>", line 33, in run
        File "<string>", line 58, in build_extension
        File "/root/.pyenv/versions/3.11.14/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lapsolver
Failed to build lapsolver
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> lapsolver

Cmake version: 3.16 Build is success with more recent commits 7bbb1ed and 347b73f This could be tied to pybind11 version update

vivi2053 avatar Dec 02 '25 05:12 vivi2053