Skip to content

Installer doesn't work on alpine/musl #1326

@konstin

Description

@konstin

If i use the installer script for linux (curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin) on an alpine docker container, i get a glibc build instead of the musl build:

To reproduce, start a docker container (in my case x86_64) with docker run --rm -it alpine and run the following commands in it:

apk add curl file tar
mkdir -p /root/.cargo/bin
curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
file /root/.cargo/bin/cargo-nextest

Output:

/root/.cargo/bin/cargo-nextest: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.0.0, stripped

Running /root/.cargo/bin/cargo-nextest prints "not found".

Compared with a musl binary:

$ file /bin/tar
/bin/tar: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, BuildID[sha1]=27564d92ae8bd019cb2e3511726a515526a95b5c, stripped

The musl binary from the releases page does work, it seems it's only the installer not checking the platform:

$ file /root/.cargo/bin/cargo-nextest
/root/.cargo/bin/cargo-nextest: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, stripped

Since the statically linked musl version also works on glibc systems, would it be possible to link the musl version under https://get.nexte.st/latest/linux instead of the glibc version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions