Skip to content

Prebuilt x86_64-unknown-linux-gnu binaries produce loader errors on systems with older glibc

Closed

Description

Hi. I'm attempting to add support for mdbook to the taiki-e/install-action github action, which downloads prebuilt binaries of developer tools. The work is happening in taiki-e/install-action#4. In theory, this should be fairly straightforward for mdBook, because you already include prebuilt binaries in the release.

Unfortunately, the build of the prebuilt binaries is done against ubuntu-latest. This means it will link against a very recent version of glibc. This will cause the loader to emit a runtime error from on systems which only have an older glibc. For example, this run of CI produces error output like the following:

mdbook: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.29' not found (required by mdbook)
mdbook: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by mdbook)

I believe there are a few options for how to address this. All of these should be changes only to your CI pipeline.

  1. Use ubuntu-18.04 to perform the build of the x86_64-unknown-linux-gnu binary. This should solve the issue for us, and should not break when used on systems with newer versions of glibc. This is probably the option I would take, since it seems like the most painless.

  2. Provide a binary which statically links against libc, such as one made against the x86_64-unknown-linux-musl target. This could be done either instead of or in addition to the x86_64-unknown-linux-gnu binary.

    This may or may not be possible for mdbook, but if it is possible, I believe it would produce a binary that works on any linux system, regardless of libc version.

  3. Do nothing. It's possible it's not worth the trouble for you to provide binaries that run on Linuxes with older versions of glibc, and that the CI test done in taiki-e/install-action is overly aggressive.

Thank you.

P.S. Sorry if I've misunderstood something, or if this is intentional somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions