edl icon indicating copy to clipboard operation
edl copied to clipboard

Fails to build on Python 3.13

Open samcday opened this issue 11 months ago • 8 comments

src/pylzma/pylzma.c: In function ‘PyInit_pylzma’:
src/pylzma/pylzma.c:296:5: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
  296 |     PyEval_InitThreads();
      |     ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.13/Python.h:124,
                 from src/pylzma/pylzma.c:26:
/usr/include/python3.13/ceval.h:114:37: note: declared here
  114 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
      |                                     ^~~~~~~~~~~~~~~~~~
src/pylzma/pylzma_aes.c:158:5: error: initialization of ‘long int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
  158 |     NULL,                                /* printfunc  tp_print;   */
      |     ^~~~
src/pylzma/pylzma_aes.c:158:5: note: (near initialization for ‘CAESDecrypt_Type.tp_vectorcall_offset’)
error: Setup script exited with error: command '/usr/bin/gcc' failed with exit code 1

I encountered this on Fedora 41 which ships Python 3.13. It seems @abdedarghal111 also ran into this on Arch

samcday avatar Jan 06 '25 13:01 samcday

Seems like pylzma is quite inactive. A kind soul on that project's issue tracker suggested a fix which worked for me:

sudo CFLAGS=-Wno-int-conversion python3 setup.py install

samcday avatar Jan 06 '25 13:01 samcday

I just tried it on Python 3.13, and it seems broken with that.

rcky844 avatar Jan 13 '25 13:01 rcky844

Did you try the workaround I posted in the previous comment? I successfully built and used edl from source last week with Python 3.13.1 (Fedora 41 distro package) with that One Weird Trick :shrug:

samcday avatar Jan 13 '25 18:01 samcday

Did you try the workaround I posted in the previous comment? I successfully built and used edl from source last week with Python 3.13.1 (Fedora 41 distro package) with that One Weird Trick 🤷

I found out that my board's EMMC died, and it seems unrelated to edl. And no, I did not need your workaround to build at all on Arch Linux.

rcky844 avatar Jan 14 '25 03:01 rcky844

If the eMMC actually failed you should be able to ascertain that by using EDL. Just run it verbose and get the 532 extended CSD bytes.

RenateUSB avatar Jan 16 '25 11:01 RenateUSB

If the eMMC actually failed you should be able to ascertain that by using EDL. Just run it verbose and get the 532 extended CSD bytes.

Can't really confirm any of that now, I probably shorted out the whole board or something right after the comment.

rcky844 avatar Jan 29 '25 15:01 rcky844

Seems like pylzma is quite inactive. A kind soul on that project's issue tracker suggested a fix which worked for me:

sudo CFLAGS=-Wno-int-conversion python3 setup.py install

I can confirm that this flag solves the issue. I'm on Fedora 42 and latest master branch. This issue may be closed.

HasanEsa avatar May 02 '25 13:05 HasanEsa

This issue may be closed.

I'd prefer this issue remain open until this project has either switched to a new dependency or patched its build with the workaround.

samcday avatar May 02 '25 21:05 samcday