Skip to content

Released sccache-v0.14.0-riscv64gc-unknown-linux-musl is _not_ statically linked #2681

Closed

Description

@luhenry

Hello,

First of all, thank you so much for providing riscv64 pre-built binaries of sccache, it's greatly helping the ecosystem!

However, when trying to install it on linux-riscv64 hardware using hendrikmuhs/ccache-action on a non-musl-based distribution (Ubuntu for example), I'm getting the following error:

+ env SCCACHE_IDLE_TIMEOUT=0 SCCACHE_DIR=/home/runner/work/riscv-runner-sample/riscv-runner-sample/.sccache SCCACHE_CACHE_SIZE=500MB sccache --start-server
  env: 'sccache': No such file or directory

From connecting to the worker, the issue is very clear:

runner@rise-riscv-runner-staging-trzsxzy3n:~$ file /usr/local/bin/sccache
/usr/local/bin/sccache: ELF 64-bit LSB pie executable, UCB RISC-V, RVC, double-float ABI, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-riscv64.so.1, stripped

That's a dynamically-linked executable, that depends on interpreter /lib/ld-musl-riscv64.so.1.

I could confirm that this is indeed the case on the sccache binary coming from the latest release:

runner@rise-riscv-runner-staging-trzsxzy3n:~$ curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.14.0/sccache-v0.14.0-riscv64gc-unknown-linux-musl.tar.gz | tar -xvzf - -C /tmp/
sccache-v0.14.0-riscv64gc-unknown-linux-musl/
sccache-v0.14.0-riscv64gc-unknown-linux-musl/LICENSE
sccache-v0.14.0-riscv64gc-unknown-linux-musl/README.md
sccache-v0.14.0-riscv64gc-unknown-linux-musl/sccache
runner@rise-riscv-runner-staging-trzsxzy3n:~$ file /tmp/sccache-v0.14.0-riscv64gc-unknown-linux-musl/sccache
/tmp/sccache-v0.14.0-riscv64gc-unknown-linux-musl/sccache: ELF 64-bit LSB pie executable, UCB RISC-V, RVC, double-float ABI, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-riscv64.so.1, stripped

And I could confirm that it's not the case for the x86_64 binary:

runner@rise-riscv-runner-staging-trzsxzy3n:~$ curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.14.0/sccache-v0.14.0-x86_64-unknown-linux-musl.tar.gz | tar -xvzf - -C /tmp/
sccache-v0.14.0-x86_64-unknown-linux-musl/
sccache-v0.14.0-x86_64-unknown-linux-musl/LICENSE
sccache-v0.14.0-x86_64-unknown-linux-musl/README.md
sccache-v0.14.0-x86_64-unknown-linux-musl/sccache
runner@rise-riscv-runner-staging-trzsxzy3n:~$ file /tmp/sccache-v0.14.0-x86_64-unknown-linux-musl/sccache
/tmp/sccache-v0.14.0-x86_64-unknown-linux-musl/sccache: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, stripped

(Note the static-pie linked).

I haven't looked yet how this could be fixed, but happy to get pointers or for someone else to pick up that issue.

Activity

  1. added a commit that references this issue on Apr 21, 2026
  2. wojiushixiaobai commented on Apr 23, 2026

    @wojiushixiaobai
    Contributor
                target: riscv64gc-unknown-linux-musl
                container: '{"image": "messense/rust-musl-cross:riscv64gc-musl"}'
                rustflags: -Ctarget-feature=+crt-static

    As we lack riscv64 hardware for local verification, please help test this fix in your environment. file sccache should now report it as statically linked.

  3. luhenry commented on Apr 23, 2026

    @luhenry
    Author

    As we lack riscv64 hardware for local verification, please help test this fix in your environment. file sccache should now report it as statically linked.

    * https://github.com/loong64/sccache/releases/download/v0.14.0/sccache-v0.14.0-riscv64gc-unknown-linux-musl.tar.gz
    

    I did that fix on my fork and got lost in verification but it works!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions