Open mleonhard opened 1 year ago
Static linking with glibc is notoriously hard and error-prone:
https://stackoverflow.com/questions/31770604/how-to-generate-statically-linked-executables https://users.rust-lang.org/t/statically-link-executable-with-glibc/32648 https://stackoverflow.com/questions/3430400/linux-static-linking-is-dead
I tried building it statically myself and failed, miserably. I'm afraid this one is a WONTFIX, as sad as that sounds.
However, there are a few things that could be done to make glibc struggles a bit less painful:
For your particular use case, I think solution number 1 is best. It would be indeed nice to have musl static binaries.
@rustbot label +A-Installation +S-Wishlist
There is a musl build now so it should be ok?
Problem
Hi mdBook Team, Thanks so much for making this tool! I'm using it to publish https://www.applin.dev/docs/ .
Running the pre-built binary on Render.com in a Rust build is failing:
This is a problem with Render's Linux image having incompatible versions of libm and libc. I fixed the build by making it download and build mdbook, which is slow.
Proposed Solution
I wish
mdbook
was statically linked. Then it would always work, even on systems with broken or missing libraries.What do you think about statically linking the pre-compiled
mdbook
binaries?Cheers, Michael
Notes
No response