Skip to content
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

Error with rust-openssl and Alpine Linux #95

Closed
kirillt opened this issue Apr 28, 2020 · 1 comment
Closed

Error with rust-openssl and Alpine Linux #95

kirillt opened this issue Apr 28, 2020 · 1 comment

Comments

@kirillt
Copy link

kirillt commented Apr 28, 2020

Hey, the following Dockerfile:

FROM alpine
RUN apk add git cargo pkgconfig openssl openssl-dev
RUN git clone https://github.com/sfackler/rust-openssl /build
RUN cd /build && cargo build --release

produces the following error:

error: failed to run custom build command for `systest v0.1.0 (/build/systest)`

Caused by:
  process didn't exit successfully: `/build/target/release/build/systest-9a76ac7552bababf/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'unknown os/family width: x86_64-alpine-linux-musl', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ctest-0.2.22/src/lib.rs:1117:9

Is it correct that this panic comes from ctest?

@kirillt
Copy link
Author

kirillt commented May 4, 2020

The problem is that Alpine uses target x86_64-alpine-linux-musl instead of x86_64-unknown-linux-musl. Installing Rust manually with latter target helps. Here is the working Dockerfile:

FROM alpine:edge
RUN apk add git curl
RUN apk add pkgconfig openssl-dev gcc musl-dev rustup
RUN rustup-init -t x86_64-unknown-linux-musl --default-toolchain nightly --profile minimal -y
RUN git clone https://github.com/sfackler/rust-openssl /build
RUN cd /build && /root/.cargo/bin/cargo build --release

This is probably not a bug, so closing the issue.

@kirillt kirillt closed this as completed May 4, 2020
kindtek added a commit to kindtek/solana that referenced this issue Dec 8, 2022
kindtek added a commit to kindtek/sdb that referenced this issue Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant