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
Remove usage of experimental/private APIs of zstd #17374
Comments
Specifically:
|
The reasoning was: it's currently the only way to access the long distance matching |
Thanks for providing some context. Is that feature really significant for Godot, or can we do without it until zstd makes it stable? Linux distros don't want being forced to bundle libraries when they're already provided as shared libraries by the system. |
It depends I guess. If you have large data, long range distance matching may help a lot. But this might be relevant for only a handful of people out there. You should be able to remove it by reverting the commit f3436a8 |
Long distance matching requires at least zstd 1.3.2 but as far as I understand it's here to stay |
The problem is not the version, we can easily ask distro packagers to use zstd 1.3.2 or later, but this API is not exposed when compiling zstd as a shared library due to its experimental nature. So as it stands our build requirements are zstd >= 1.3.2 and statically linked (i.e. use the bundled one).
I guess we could keep the code behind |
Note: As discussed in #24754, it's likely not worth spending time making this optional as those features are on their way to reaching stable status in zstd 1.4.0. |
Reopening, as even with 1.4.0 there is still one experimental method that we use I think I'll just drop the use of these advanced features. |
One step towards fixing godotengine#17374 as most experimental APIs we use are now part of the stable 1.4.0.
`ZSTD_DCtx_setMaxWindowSize` is still part of the experimental API (thus unexposed in the shared library). Upstream examples seem to use `ZSTD_d_windowLogSize` instead, so it's probably what we should use too. Fixes godotengine#17374. Distro packagers can now unbundle Zstd.
Godot version:
3.0.2, current master (b842369)
OS/device including version:
Any.
Issue description:
We currently use experimental APIs from zstd, which are as such not exposed publicly in stable zstd releases compiled as shared libraries (i.e. those we could link against on Linux).
I don't think we have any reason to use such APIs, it was likely done without paying much attention to their availability, or lack thereof, depending on build options.
Steps to reproduce:
Build against system libzstd with
builtin_zstd=no
. Tested against zstd 1.3.2 and 1.3.4.The text was updated successfully, but these errors were encountered: