-
Notifications
You must be signed in to change notification settings - Fork 7
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
RFC: Add optional support for building against the system library using pkg-config. #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am actually wondering if it should be other way around, adding a 'vendored' feature and making a native build the default one.
It's a breaking change though (so requires a version bump), but consistent with other crates.
I am fine with it either way and can change accordingly if you'd like. Note that defaulting to the system library will yield compatibility issues for some though as e.g. qpdf 11.x seems to have removed some API that are available with 10.x. I guess we should feature gate the older API as well then, so that fewer builds break. Personally, I would suggest disabling that feature by default and only offering the older encryption option variants if explicitly requested. |
Sounds good to me. |
There is actually a |
…d require explicit opt-in for vendoring.
Personally, I would prefer compatibility with both 10.x and 11.x because our servers would use 10.x (Ubuntu LTS), but our development machines use 11.x (Ubuntu 23.10). If apparently the R2/3/4 encryption options would be the only issue, then the cost of supporting both appears small at first sight. |
…df 10.x and 11.x in the default configuration.
Pushed a variant adding I did not touch the crate version or anything. Let me know if I should. I am also not sure what CI and/or documentation updates you would think appropriate for that change. |
May be a README update with a section about feature flags and add the 'vendored' feature in the CI script for now. |
Something is not right with the CI builds, I am not sure why does it fail because the build script has |
I think the problem is that the default build fails because I tried to add the necessary changes to make the CI use a vendored build where necessary and explicitly test a system build on Linux, but admittedly this is difficult to test for me due to the workflow approval requirement. |
I think a sudo is probably needed for apt-get to work. AFAIK the workflows are using passwordless sudo. |
Great, thanks for your contribution! |
I would be grateful if you could release the system library support on crates.io so that we can integrate it downstream and give it gets more testing under realistic conditions. Thank you! |
Done, version 0.2.0 is published. |
qpdf is a pretty big build requiring vendored copies of zlib and libjpeg so it would be nice to link against the system library instead. I understand that there a no guarantees on compatibility, but for example my main target Ubuntu 22.04 currently ships qpdf 10.6.3 which appears to closely match what is vendored here. But even using qpdf 11.9.0 on OpenSUSE Tumbleweed, the only tests which break are for the apparently dropped r2/3/4 encryption options.