-
Notifications
You must be signed in to change notification settings - Fork 292
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
Compilation fails w/ rust-musl-builder #88
Comments
I made a demo repo to replicate this: https://github.com/Licenser/rust-rdkafka-musl it can be caused with |
I don't have much experience with musl, but I believe @messense managed to compile it in the past. |
Judging from the error message
It seems that it is not correctly linking with musl libc. You might wanna check out https://github.com/fede1024/kafka-view/blob/master/Dockerfile for some ideas. |
hmm I've tried the kafka view (vanilla w/o changes) and it fails with the same error. Does it still work for you? |
I've done a bit of experimenting and found this to work: Licenser/rust-rdkafka-musl@bbaa8a3 but this seems kind of wrong. |
I have the same error on rust-musl-builder:stable image. @Licenser Dockerfile
Error Log
|
Sorry no, I gave up on rust+musl for my taste it is too fragile at the moment. |
@Licenser @shuuky @messense @fede1024 try https://github.com/LooMaclin/test_kafka_musl#solution
Thanks to @polachok for help! |
@michael-grunder pointed out that this may only work with rust nightly or 1.33. |
Any progress or other alternatives for this? The workarounds didn't work for me, but I'd love to see this work. I blindly flailed around for a while but had to bail. |
@dtanner I've switched to just linking with glibc for my project, but the Dockerfile I posted in the other repo still appears to work for me out of the box. I created a repo with a Rust project and Dockerfile That builds for me on Ubuntu by just cloning the repo and then doing docker build. |
Thanks @michael-grunder ! That worked for me. Brought my deployed docker container from >1GB down to 22MB. |
Edit: deleted instructions, what I posted produced broken builds ;/ |
If anyone is still trying this, I'd recommend using the CMake build system via |
The workaround seems to be working (see, for example, #170 (comment)), so I'm going to close this out for now. Feel free to file a new issue if you see failures with the |
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Try using cmake to build librdkafka. Related issue: fede1024/rust-rdkafka#88
Thanks @LooMaclin |
When compiling a rust application using rdkafka on rust-musl-builder the build fails when linking:
My guess is that the rdkafka lib is build with glibc and then fails w/ musl.
Is there a way to specify what to build it against the same way that dynamic linking can be specified?
The text was updated successfully, but these errors were encountered: