-
Notifications
You must be signed in to change notification settings - Fork 259
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
How to build for x86_64-unknown-linux-musl #524
Comments
This is my configuration for a musl build rdkafka = { version = "0.28.0", features = ["cmake-build"] } For a static musl build I use => messense/rust-musl-cross |
I am having a similar issue I believe. On a x86 Mac I can't build for arm with
I also get a similar error on Github Actions when trying to build for ARM on x86 runners: https://github.com/514-labs/igloo-stack/actions/runs/7234952479/job/19711831300 When we use Cmake though everything works properly |
I have this in Cargo toml
rdkafka = { version = "0.29.0", features = [ "ssl", "cmake-build"] }
I tried to compile to x86_64-unknown-linux-musl using 2 options. Both failed.
cargo build --target x86_64-unknown-linux-musl --release
OUTPUT:
linking with
cc
failed: exit status: 1rdkafka_ssl.c:(.text.rd_kafka_ssl_ctx_term+0x2b): undefined reference to `ENGINE_free'
collect2: error: ld returned 1 exit status
cross build --target=x86_64-unknown-linux-musl --release
OUTPUT:
rdkafka_ssl.c:(.text.rd_kafka_ssl_ctx_term+0x2b): undefined reference to `ENGINE_free'
collect2: error: ld returned 1 exit status
They both give the same error.
I am using Arch and it doesn't fail using just "cmake-build" feature
Here is the github repo I made where the issue is recreated
https://github.com/0xDjole/rust-rdkafka-musl
Can rust-rdkafka be compiled to x86_64-unknown-linux-musl ?
The text was updated successfully, but these errors were encountered: