-
Notifications
You must be signed in to change notification settings - Fork 287
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
Failing to compile 0.28.0 for Windows and musl platforms with vendored openssl #446
Comments
Hm, nothing changed about the build system between v0.27.0 and v0.28.0 that I can see, so really not sure what's going wrong. I wonder if it's librdkafka itself that's misbehaving. You could try adjusting vectordotdev/vector#10302 to update rdkafka without updating rdkafka-sys. That would help to isolate the problem, and would let you pick up the bugfix without bumping librdkafka itself. Otherwise my reply in #447 (comment) applies here too. If you can re-run with |
Thanks for taking a peek @benesch ! I reran a clean build of my dummy project with https://gist.github.com/d52bf10d2ea38df0658a79f4bd90c5f7 I'm curious if anything jumps out to you. |
I attempted to just upgrade rdkafka to 0.28.0 and keep rdkafka-sys at 4.0.0, but ran into the same failure. |
@jszwedko try this: #479 (comment) |
Hi all, I'm investigating this issue with @jszwedko . @0x003e , I tried that solution and while it did not work in moving from 0.27 to 0.28 , it did help reveal something intriguing. If I specify the following, I get the same error as in the original comment (undefined reference to ENGINE_*). rdkafka = { git="https://github.com/fede1024/rust-rdkafka", rev="v0.27.0", default-features = false, features = ["ssl-vendored", "libz", "tokio", "zstd"] } However, if I override the rdkafka-sys to the version in v0.26.0 , compilation succeeds. [patch.'https://github.com/fede1024/rust-rdkafka']
rdkafka-sys = { path = '../rust-rdkafka-old/rdkafka-sys' } (where rust-rdkafka-old is a checkout of v0.26.0) I believe @0x003e is on to something with this comment: I also saw here: https://github.com/edenhill/librdkafka/releases/tag/v1.7.0 Wondering if the openssl-sys version that rdkafka-sys specifies (0.9.48) needs to be upgraded, to a version that includes OpenSSL Engine support. It appears the openssl-sys version in rdkafka-sys has not been modified since 2019. |
On further inspection, I found that it is not the SSL version that is the problem. This combined with the fact that librdkafka v1.7.0 introduced a dependency on the SSL Engine feature, means that the cross compilation won't work without a modification somewhere. It seems either openssl-sys needs to allow SSL Engine feature for musl cross-compilation, or rust-rdkafka / librdkafka needs to make SSL Engine dependency configurable. This is where the openssl-sys is setting the no-engine flag: |
it's now possible to force-enable engine on musl thanks to alexcrichton/openssl-src-rs#151 [build-dependencies]
openssl-src = { version = "111.24.0" , features = ["force-engine"] } On alpine it requires to install |
Hey!
Apologies, I tried to nail this down myself, but have been banging my head against it all day and thought maybe you would have some insight.
We have a project (https://github.com/vectordotdev/vector) using
rust-rdkafka
that we are trying to upgrade from 0.27.0 to 0.28.0 to include de421ba but our cross compilation for musl-based platfroms as well as native builds for Windows have errors linking a vendored openssl that they didn't for 0.27.0.For the cross compilation to musl this looks like:
For Windows this looks like: https://gist.github.com/jszwedko/5e959ee2cc4c1508238ad8a146d20192
They seem plausibly related.
The features we use are:
For openssl:
You can see the CI build failures here: https://github.com/vectordotdev/vector/runs/5029404180?check_suite_focus=true
I put together an simplified example repo that seems to reproduce it for me using just
rdkafka
with thessl/vendored
feature here: https://github.com/jszwedko/rdkafka-vendored-sslIn there I run:
Any insight would be appreciated 🙂
The text was updated successfully, but these errors were encountered: