Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Alpine docker build failure #10614

Closed
holiman opened this issue Apr 29, 2019 · 4 comments
Closed

Alpine docker build failure #10614

holiman opened this issue Apr 29, 2019 · 4 comments
Labels
M0-build 🏗 Building and build system.

Comments

@holiman
Copy link
Contributor

holiman commented Apr 29, 2019

As noted in #10525, parity now requires version Rust 1.33. I'm trying to build the alpine docker version of Parity, based on the template in the repo: https://github.com/paritytech/parity-ethereum/blob/master/scripts/docker/alpine/Dockerfile .

Here are the first couple of lines from the docker image, followed by an abort:

#cat Dockerfile 
FROM alpine:edge AS builder

# show backtraces
ENV RUST_BACKTRACE 1

RUN apk add --no-cache \
  build-base \
  cargo \
  cmake \
  eudev-dev \
  linux-headers \
  perl \
  rust

RUN rustc --version
RUN bazonk

When I run this, I get

Sending build context to Docker daemon   2.56kB
Step 1/19 : FROM alpine:edge AS builder
 ---> 3e8d7a5561f0
Step 2/19 : ENV RUST_BACKTRACE 1
 ---> Using cache
 ---> f0f140aa78eb
Step 3/19 : RUN apk add --no-cache   build-base   cargo   cmake   eudev-dev   linux-headers   perl   rust
 ---> Using cache
 ---> 0f1dbd2833df
Step 4/19 : RUN rustc --version
 ---> Running in 4d289bd0267f
rustc 1.31.1

So the alpine:edge vesion of rust does not seem sufficiently up to date. And indeed, that is also what alpine reports: https://pkgs.alpinelinux.org/package/edge/community/x86_64/rust

So, are there any workarounds for this?
The error I eventually wind up with is

error[E0658]: use of unstable library feature 'duration_as_u128' (see issue #50202)
   --> ethcore/src/engines/clique/mod.rs:342:75
    |
342 |                 trace!(target: "engine", "Back-filling succeed, took {} ms.", elapsed.as_millis());
    |                                                                                       ^^^^^^^^^

@holiman holiman changed the title Alpine docker build problems Alpine docker build failure Apr 29, 2019
@jam10o-new jam10o-new added the M0-build 🏗 Building and build system. label Apr 29, 2019
@jam10o-new jam10o-new added this to the 2.6 milestone Apr 29, 2019
@ordian
Copy link
Member

ordian commented Apr 29, 2019

So, are there any workarounds for this?

As a workaround, could you install rustup instead (cf. https://github.com/sitkevij/alpine-rust/blob/master/alpine-rust-rustup.rs/Dockerfile)?
EDIT: rust-lang/rustup#1517 would probably make it easier.

@mati865
Copy link

mati865 commented May 7, 2019

There is no official stable release of Rust that runs on musl distros yet. You can use beta or nightly for now: https://forge.rust-lang.org/other-installation-methods.html#standalone

@holiman
Copy link
Contributor Author

holiman commented May 7, 2019

I switched over to base my image on the official centos docker image, that seems to work

@ordian ordian modified the milestones: 2.6, 2.7 Jul 12, 2019
@adria0
Copy link

adria0 commented Jul 27, 2020

Closing issue due to its stale state.

@adria0 adria0 closed this as completed Jul 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
M0-build 🏗 Building and build system.
Projects
None yet
Development

No branches or pull requests

5 participants