cnvogelg / amitools

Various tools for using AmigaOS programs on other platforms
258 stars 72 forks source link

Unable to BUILD amitools on debian12 and ubuntu 24.04 #201

Open Ozzyboshi opened 7 months ago

Ozzyboshi commented 7 months ago

Seems amitools cannot be built anymore on latest debian and ubuntu... why?

root@d74d271c9254:/opt/amiga/bin# pip3 install amitools --break-system-packages 
Collecting amitools
  Downloading amitools-0.7.0.tar.gz (3.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 4.2 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [141 lines of output]
      <string>:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      /tmp/pip-build-env-v720g1r_/overlay/local/lib/python3.11/dist-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-om6r7lk1/amitools_a707e6b9787a442e89a663d5114fbadf/machine/emu.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          global pc_changed_func
          pc_changed_func = py_func
          if py_func is None:
            m68k_set_pc_changed_callback(NULL)
          else:
            m68k_set_pc_changed_callback(pc_changed_func_wrapper)
                                         ^
      ------------------------------------------------------------

      machine/pycpu.pyx:169:35: Cannot assign type 'void (unsigned int) except *' to 'void (*)(unsigned int) noexcept'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (unsigned int) except *'.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          global reset_instr_func
          reset_instr_func = py_func
          if py_func is None:
            m68k_set_reset_instr_callback(NULL)
          else:
            m68k_set_reset_instr_callback(reset_instr_func_wrapper)
                                          ^
      ------------------------------------------------------------

      machine/pycpu.pyx:177:36: Cannot assign type 'void (void) except *' to 'void (*)(void) noexcept'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (void) except *'.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          global instr_hook_func
          instr_hook_func = py_func
          if py_func is None:
            m68k_set_instr_hook_callback(NULL)
          else:
            m68k_set_instr_hook_callback(instr_hook_func_wrapper)
                                         ^
      ------------------------------------------------------------

      machine/pycpu.pyx:185:35: Cannot assign type 'void (unsigned int) except *' to 'void (*)(unsigned int) noexcept'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (unsigned int) except *'.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...

        def reserve_special_range(self,num_pages=1):
          return mem_reserve_special_range(num_pages)

        cpdef set_special_range_read_func(self, uint page_addr, uint width, func):
          mem_set_special_range_read_func(page_addr, width, special_read_func_wrapper, <void *>func)
                                                            ^
      ------------------------------------------------------------

      machine/pymem.pyx:136:54: Cannot assign type 'uint (uint, void *) except? -1' to 'read_func_t'. Exception values are incompatible. Suggest adding 'noexcept' to type 'uint (uint, void *) except? -1'.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          mem_set_special_range_read_func(page_addr, width, special_read_func_wrapper, <void *>func)
          # keep func ref
          self.special_read_funcs.add(func)

        cpdef set_special_range_write_func(self,uint page_addr, uint width, func):
          mem_set_special_range_write_func(page_addr, width, special_write_func_wrapper, <void *>func)
                                                             ^
      ------------------------------------------------------------

      machine/pymem.pyx:141:55: Cannot assign type 'void (uint, uint, void *) except *' to 'write_func_t'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (uint, uint, void *) except *'.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...

        def set_trace_func(self,func):
          if func is None:
            mem_set_trace_func(NULL, NULL)
          else:
            mem_set_trace_func(trace_func_wrapper, <void *>func)
                               ^
      ------------------------------------------------------------

      machine/pymem.pyx:172:25: Cannot assign type 'void (int, int, uint, uint, void *) except *' to 'trace_func_t'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (int, int, uint, uint, void *) except *'.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...

        def set_invalid_func(self,func):
          if func is None:
            mem_set_invalid_func(NULL, NULL)
          else:
            mem_set_invalid_func(invalid_func_wrapper, <void *>func)
                                 ^
      ------------------------------------------------------------

      machine/pymem.pyx:180:27: Cannot assign type 'void (int, int, uint, void *) except *' to 'invalid_func_t'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (int, int, uint, void *) except *'.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          flags = TRAP_DEFAULT
          if auto_rts:
            flags |= TRAP_AUTO_RTS
          if one_shot:
            flags |= TRAP_ONE_SHOT
          tid = trap_setup(trap_wrapper, flags, <void *>py_func)
                           ^
      ------------------------------------------------------------

      machine/pytraps.pyx:47:21: Cannot assign type 'void (uint, uint, void *) except *' to 'trap_func_t'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (uint, uint, void *) except *'.
      use_cython: True
      cython version: 3.0.8
      Compiling machine/emu.pyx because it changed.
      [1/1] Cythonizing machine/emu.pyx
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-v720g1r_/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-v720g1r_/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-v720g1r_/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 212, in <module>
        File "/tmp/pip-build-env-v720g1r_/overlay/local/lib/python3.11/dist-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
          cythonize_one(*args)
        File "/tmp/pip-build-env-v720g1r_/overlay/local/lib/python3.11/dist-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: machine/emu.pyx
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
neildavis commented 2 months ago

I get the same on Mint 21.3 (22.04 based)

cnvogelg commented 2 months ago

The errors mentioned above were fixed with the latest 0.8.0 release. Did you try that one?