indygreg / python-zstandard

Python bindings to the Zstandard (zstd) compression library
BSD 3-Clause "New" or "Revised" License
481 stars 83 forks source link

Compile fails on 3.14 no-GIL #231

Open clin1234 opened 2 weeks ago

clin1234 commented 2 weeks ago

  × Building wheel for zstandard (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      <string>:41: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      <string>:42: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      <frozen importlib._bootstrap>:488: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module '_cffi_backend', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.
      not modified: 'build/zstandard/_cffi.c'
      generating build/zstandard/_cffi.c
      (already up-to-date)
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-314
      creating build/lib.linux-x86_64-cpython-314/zstandard
      copying zstandard/backend_cffi.py -> build/lib.linux-x86_64-cpython-314/zstandard
      copying zstandard/__init__.py -> build/lib.linux-x86_64-cpython-314/zstandard
      copying zstandard/__init__.pyi -> build/lib.linux-x86_64-cpython-314/zstandard
      copying zstandard/py.typed -> build/lib.linux-x86_64-cpython-314/zstandard
      running build_ext
      building 'zstandard.backend_c' extension
      creating build/temp.linux-x86_64-cpython-314
      creating build/temp.linux-x86_64-cpython-314/c-ext
      x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fPIC -Ic-ext -Izstd -I/tmp/venv/include -I/usr/include/python3.14t -c c-ext/backend_c.c -o build/temp.linux-x86_64-cpython-314/c-ext/backend_c.o -DZSTD_SINGLE_FILE -DZSTDLIB_VISIBLE= -DZDICTLIB_VISIBLE= -DZSTDERRORLIB_VISIBLE= -fvisibility=hidden
      c-ext/backend_c.c: In function ‘safe_pybytes_resize’:
      c-ext/backend_c.c:316:15: error: ‘PyObject’ {aka ‘struct _object’} has no member named ‘ob_refcnt’
        316 |     if ((*obj)->ob_refcnt == 1) {
            |               ^~
      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: Failed building wheel for zstandard
  Building wheel for cryptography (pyproject.toml) ... error
  error: subprocess-exited-with-error