-
Notifications
You must be signed in to change notification settings - Fork 28
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
Link system liblz4 when available #39
base: master
Are you sure you want to change the base?
Conversation
For the record, thanks a lot for doing this. I find it distasteful that someone publishes a |
Ideally https://docs.rs/system-deps/latest/system_deps/ would make even more streamlined dealing with this kind of dependencies, once this land it can be iterated over. |
Suggested in Fedora Linux package review: https://bugzilla.redhat.com/show_bug.cgi?id=2249863#c2
This reverts commit c9b6db5. Suggested in Fedora Linux package review: https://bugzilla.redhat.com/show_bug.cgi?id=2249863#c4
93cbd4e
to
7669972
Compare
Rebased on |
Another option is the solution adopted in zstd-rs: a feature to opt-in to pkg-config, otherwise build the local source by default. That's probably my current preference, mainly my use cases prefer this approach. I definitely don't want the linkage decision to depend on the whether or not a The |
Any of those approaches could work. If there is an opt-in feature, we would carry a downstream patch in Fedora’s If |
This allows linking an external/system copy of
liblz4
(particularly, a system-wide shared library as preferred or required for Linux distribution packaging), in the same manner asbzip2-sys
, by imitating:As noted in trifectatechfoundation/bzip2-rs#58 (comment), some would consider changing the default linking of
liblz4
a breaking change.This PR is offered with the purpose of packaging the
lz4-sys
andlz4
crates in Fedora Linux, where bundling is discouraged, but allowed under certain circumstances.This PR would fix #36.
Based on feedback in the Fedora Linux package review, I dropped the part of this PR that would have added a
static
feature akin to trifectatechfoundation/bzip2-rs#78, but I did so by reverting it rather than force-pushing, so you can still see how it would have worked if you are interested.