-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling a rust app with cargo on arm64 will returns exit code: 137
#122
Comments
FROM rust:alpine AS builder-ss
RUN apk update \
&& apk add --no-cache --virtual .build-deps musl-dev git
ARG SS_VERSION=v1.15.0-alpha.9
RUN git clone https://github.com/shadowsocks/shadowsocks-rust.git --branch $SS_VERSION \
&& cd shadowsocks-rust \
&& case "$(apk --print-arch)" in \
aarch64) build_features="local-redir local-tun aead-cipher-2022-extra armv8 neon";; \
*) build_features="local-redir local-tun aead-cipher-2022-extra";; \
esac \
&& cargo build --release --features "$build_features" \
&& install target/release/ssservice target/release/ssserver target/release/sslocal target/release/ssmanager target/release/ssurl /usr/local/bin/ \
&& cd - \
&& rm -r /shadowsocks-rust
|
Not directly linked to this issue but have you tried using cross-compilation to avoid emulation? See https://github.com/crazy-max/rust-docker-cross/blob/2f6d5f93dedbf1b9c8d65a172df47796281841da/Dockerfile#L43 More info: https://github.com/tonistiigi/xx/#rust |
No😅, but I was compile this dockerfile on Raspberry Pi 4B via |
The following two steps helped me:
It works as a combo. By itself, those two didn’t yield results. |
I tried compiling again yesterday, unbelievable it works: https://github.com/pexcn/docker-images/actions/runs/3741460531 |
About 3 weeks ago, this error appeared again. It seems to be related to this PR? Before this PR: https://github.com/pexcn/docker-images/actions/runs/4231301961/jobs/7349655537 It only seems to affect rust builds. |
This problem only occurs on the arm64 platform, everything works fine under amd64.
Log output: https://github.com/pexcn/docker-images/actions/runs/3391825550/jobs/5637357880
Relate issue: #109 (comment)
The text was updated successfully, but these errors were encountered: