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

Unable to BUILD amitools on debian12 and ubuntu 24.04 #201

Open
Ozzyboshi opened this issue Mar 4, 2024 · 3 comments
Open

Unable to BUILD amitools on debian12 and ubuntu 24.04 #201

Ozzyboshi opened this issue Mar 4, 2024 · 3 comments

Comments

@Ozzyboshi
Copy link

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
Copy link

I get the same on Mint 21.3 (22.04 based)

@cnvogelg
Copy link
Owner

cnvogelg commented Aug 7, 2024

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

@bitplane
Copy link

Works for me, thank you 🙂

(.venv) gaz@blade:~$ uname -a
Linux blade 6.8.0-49-generic #49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov  4 02:06:24 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
(.venv) gaz@blade:~$ pip install amitools
Collecting amitools
  Downloading amitools-0.8.0.tar.gz (3.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 20.7 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: amitools
  Building wheel for amitools (pyproject.toml) ... done
  Created wheel for amitools: filename=amitools-0.8.0-py3-none-any.whl size=693298 sha256=2123ad499cbd6653f8a091650ff49af32baf6de0847f74776ffc7ea65531ec06
  Stored in directory: /home/gaz/.cache/pip/wheels/00/6b/52/0507b9d117c2039520d836170cb642b83c5eea69d39a394b4e
Successfully built amitools
Installing collected packages: amitools
Successfully installed amitools-0.8.0

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

4 participants