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

0.23.0: build breakage with zstd 1.5.7 #252

Open
0-wiz-0 opened this issue Feb 20, 2025 · 2 comments
Open

0.23.0: build breakage with zstd 1.5.7 #252

0-wiz-0 opened this issue Feb 20, 2025 · 2 comments

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Feb 20, 2025

When trying to compile release 0.23.0 having zstd 1.5.7 installed, I see

build/zstandard/_cffi.c: In function '_cffi_const_ZSTD_c_useBlockSplitter':
build/zstandard/_cffi.c:12168:12: error: 'ZSTD_c_useBlockSplitter' undeclared (first use in this function); did you mean 'ZSTD_c_maxBlockSize'?
12168 |   int n = (ZSTD_c_useBlockSplitter) <= 0;
      |            ^~~~~~~~~~~~~~~~~~~~~~~
      |            ZSTD_c_maxBlockSize

This parameter was removed in 1.5.7.

@hhoffstaette
Copy link

This was changed in facebook/zstd#4180 - ZSTD_c_useBlockSplitter was an experimental parameter that never should have been used.

@jjerphan
Copy link

To understand why this fails, see:

/* python-zstandard relies on unstable zstd C API features. This means
that changes in zstd may break expectations in python-zstandard.
python-zstandard is distributed with a copy of the zstd sources.
python-zstandard is only guaranteed to work with the bundled version
of zstd.
However, downstream redistributors or packagers may unbundle zstd
from python-zstandard. This can result in a mismatch between zstd
versions and API semantics. This essentially "voids the warranty"
of python-zstandard and may cause undefined behavior.
We detect this mismatch here and refuse to load the module if this
scenario is detected.
*/
.

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

3 participants