indygreg / indygreg/python-zstandard

Please make this error compile-time: Python bindings were not compiled/linked against expected zstd version (10405 returned by the lib, 10408 hardcoded in zstd headers, 10408 hardcoded in the cext)

Open
#132 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
642
Forks
116
Avg merge
1d 14h
Merged PRs (30d)
5

Description

I have zstd-1.4.5 installed when the current latest zstd is 1.4.8.

With ```--system-zstd```, it builds and installs, but fails in the runtime:
```
ImportError: zstd C API versions mismatch; Python bindings were not compiled/linked against expected zstd version (10405 returned by the lib, 10408 hardcoded in zstd headers, 10408 hardcoded in the cext)
```

Please move this test to compilation time because this would make it more fail-proof.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the --system-zstd build path and the existing runtime version check described in the issue. Move the mismatch validation into compilation so an incompatible zstd library fails during the build rather than on import; done means the reported version mismatch cannot produce an installable extension.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.