cnvogelg / amitools

Various tools for using AmigaOS programs on other platforms
250 stars 69 forks source link

pip3 install amitools fails on Python 3.11 #179

Closed MBeijer closed 1 year ago

MBeijer commented 1 year ago
      running build_ext
      running gen
      creating 'gen' dir
      building 'build/m68kmake' tool
      tool source: musashi/m68kmake.c
      tool object: build/musashi/m68kmake.o
      cc -c musashi/m68kmake.c -o build/musashi/m68kmake.o
      cc build/musashi/m68kmake.o -o build/m68kmake
      generating source files

          Musashi v4.60 68000, 68008, 68010, 68EC020, 68020, 68EC030, 68030, 68EC040, 68040 emulator
                  Copyright Karl Stenerud (kstenerud@gmail.com)

      Generated 1967 opcode handlers from 518 primitives
      building 'musashi.emu' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/gen
      creating build/temp.linux-x86_64-cpython-311/musashi
      creating build/temp.linux-x86_64-cpython-311/musashi/softfloat
      x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Imusashi -Igen -I/usr/include/python3.11 -c gen/m68kops.c -o build/temp.linux-x86_64-cpython-311/gen/m68kops.o
      x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Imusashi -Igen -I/usr/include/python3.11 -c musashi/emu.c -o build/temp.linux-x86_64-cpython-311/musashi/emu.o
      musashi/emu.c:233:12: fatal error: longintrepr.h: No such file or directory
        233 |   #include "longintrepr.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: legacy-install-failure

× Encountered error while trying to install package.
╰─> amitools
cnvogelg commented 1 year ago

This is a known bug in cython where old versions generated code that is not compatible with Python 3.11. (see cython/#4461

I'll push a new release with updated cython code to fix this. A workaround is to install the project from source and regenerate the code with a recent cython version (>=0.29)

MBeijer commented 1 year ago

@cnvogelg Thanks! :)

cnvogelg commented 1 year ago

v0.7.0 (b0330e5) is out now and should fix the issue