rust-cross / rust-musl-cross

Docker images for compiling static Rust binaries using musl-cross
MIT License
601 stars 66 forks source link

Add gcc-multilib #111

Closed 0x676e67 closed 1 year ago

0x676e67 commented 1 year ago

Cross compile BoringSSL bindings dependencies

messense commented 1 year ago

9 9.288 Reading state information...

9 9.294 Package gcc-multilib is not available, but is referred to by another package.

9 9.294 This may mean that the package is missing, has been obsoleted, or

9 9.294 is only available from another source

9 9.294

9 9.298 E: Package 'gcc-multilib' has no installation candidate

messense commented 1 year ago

It's not available on arm64.

0x676e67 commented 1 year ago

Modify it like this

ARG TARGETPLATFORM

FROM messense/rust-musl-cross:x86_64-musl
WORKDIR /src

RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
        apt update -y && apt install gcc-aarch64-linux-gnu; \
    elif [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
        apt update -y && apt install gcc-multilib; \
    fi

image