Skip to content

Statically-link pre-compiled binaries #2208

@mleonhard

Description

@mleonhard

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:

curl --silent --show-error --location https://github.com/rust-lang/mdBook/releases/download/v0.4.35/mdbook-v0.4.35-x86_64-unknown-linux-gnu.tar.gz --output mdbook.tar.gz --time-cond mdbook.tar.gz
echo '4ef777bfcb3fd01687deed990372a6eb5e125f79b592014b0ac09b61595f0b34  mdbook.tar.gz' >mdbook.tar.gz.sha256
shasum -a 256 mdbook.tar.gz.sha256
tar xzvf mdbook.tar.gz mdbook
mdbook build docs/
mdbook: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by mdbook)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InstallationArea: Installation of mdbook itselfC-enhancementCategory: Enhancement or feature requestS-WishlistStatus: Wishlist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions