Skip to content

1.5.6.2 broke ZSTD_EXTERNAL: error: ‘ZSTD_MULTITHREAD’ undeclared #125

@mgorny

Description

@mgorny

ZSTD_MULTITHREAD define is internal to zstd and it's not exported in its headers. Therefore, when using ZSTD_EXTERNAL it is not defined and the build fails:

2025-01-21 04:26:28,791 gpep517 INFO Building wheel via backend setuptools.build_meta:__legacy__
/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py:270: UserWarning: Unknown distribution option: 'test_suite'
  warnings.warn(msg)
2025-01-21 04:26:29,432 root INFO running bdist_wheel
2025-01-21 04:26:29,635 root INFO running build
2025-01-21 04:26:29,701 root INFO running build_ext
2025-01-21 04:26:29,819 root INFO building 'zstd' extension
2025-01-21 04:26:29,819 root INFO creating /tmp/portage/dev-python/zstd-1.5.6.2/work/zstd-1.5.6.2-python3_10/build/temp.linux-x86_64-cp
ython-310/src
2025-01-21 04:26:29,820 root INFO x86_64-pc-linux-gnu-gcc -march=znver2 --param=l1-cache-size=32 --param=l1-cache-line-size=64 -O2 -pip
e -frecord-gcc-switches -UNDEBUG -fPIC -I/usr/include/python3.10 -c src/python-zstd.c -o /tmp/portage/dev-python/zstd-1.5.6.2/work/zstd
-1.5.6.2-python3_10/build/temp.linux-x86_64-cpython-310/src/python-zstd.o -O2 -DVERSION=1.5.6.2 -DDYNAMIC_BMI2=0 -DZSTD_DISABLE_ASM=0 -
DLIBZSTD_EXTERNAL=1 -DZSTD_TRACE=0
src/python-zstd.c: In function ‘py_zstd_with_threads’:
src/python-zstd.c:308:31: error: ‘ZSTD_MULTITHREAD’ undeclared (first use in this function)
  308 |     return Py_BuildValue("i", ZSTD_MULTITHREAD);
      |                               ^~~~~~~~~~~~~~~~
src/python-zstd.c:308:31: note: each undeclared identifier is reported only once for each function it appears in
error: command '/usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc' failed with exit code 1

Metadata

Metadata

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions