Repository navigation
Conversation
- FindZstd: prefer the static libzstd.a over the shared lib so zstd is embedded in the NIF (portable binary, no libzstd.so runtime dependency) - build-rocksdb: propagate the resolved zstd lib+include to the inner rocksdb ExternalProject. Without this rocksdb runs its own find_package(zstd) and grabs the shared .so, silently undoing the wrapper's static choice (snappy/lz4 were already propagated; zstd was missed) - build-rocksdb: add the bundled-zstd build-step dependency so a parallel clean build can't configure rocksdb before libzstd.a is installed (snappy/lz4 had this ordering; zstd did not, causing intermittent clean-build failures)
Contributor
|
Hi, PR looks usefuful but tests don't pass for now. Can you look at it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The NIF currently links libzstd dynamically even when zstd is bundled: the wrapper picks the shared lib, and
build-rocksdb.cmakepasses-DWITH_ZSTDto the inner rocksdb without the resolved library path, so rocksdb runs its own find and grabslibzstd.so. This leaves alibzstd.so.1runtime dependency on the final binary.This branch:
libzstd.a(fall back to shared if no.a), so zstd is embedded in the NIF.ZSTD_LIBRARIES/ZSTD_INCLUDE_DIRSto the inner rocksdb ExternalProject (snappy and lz4 were already propagated; zstd was missed).libzstd.ais installed (snappy/lz4 had this ordering; zstd did not, causing intermittent clean-build failures).Verified: with
-DWITH_ZSTD=ON -DWITH_BUNDLE_ZSTD=ON,ldd liberocksdb.soshows nolibzstd/libz/libcrypto— fully static — and rocksdb+zstd works at runtime.