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

Build in docker failed (stable branch) #9305

Closed
ganibc opened this issue Aug 8, 2018 · 8 comments
Closed

Build in docker failed (stable branch) #9305

ganibc opened this issue Aug 8, 2018 · 8 comments
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M0-build 🏗 Building and build system. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Milestone

Comments

@ganibc
Copy link

ganibc commented Aug 8, 2018

Edit: Found out compile error not because of docker, but rust version. See my comment no 3.

Before filing a new issue, please provide the following information.

I'm running:

  • **Which Parity version? Stable branch
  • **Which operating system? Linux
  • **How installed? from source
  • **Are you fully synchronized? no (not relevant)
  • **Which network are you connected to? not relevant
  • **Did you try to restart the node? not relevant

Your issue description goes here below. Try to include actual vs. expected behavior and steps to reproduce the issue.

I'm trying to build parity by docker.

cd parity-ethereum
git checkout stable
sudo docker build -f docker/ubuntu/Dockerfile --tag ethcore/parity:a .

Error:

   Compiling quasi_codegen v0.32.0
     Running `rustc --crate-name quasi_codegen /root/.cargo/registry/src/github.com-1ecc6299db9ec823/quasi_codegen-0.32.0/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="aster"' --cfg 'feature="default"' --cfg 'feature="syntex"' --cfg 'feature="syntex_errors"' --cfg 'feature="syntex_syntax"' --cfg 'feature="with-syntex"' -C metadata=a56fe6dc6990a1b2 -C extra-filename=-a56fe6dc6990a1b2 --out-dir /build/parity/target/release/deps -L dependency=/build/parity/target/release/deps --extern aster=/build/parity/target/release/deps/libaster-5f97ab954e611081.rlib --extern syntex=/build/parity/target/release/deps/libsyntex-f919d9115a99a594.rlib --extern syntex_errors=/build/parity/target/release/deps/libsyntex_errors-42755b05d6218386.rlib --extern syntex_syntax=/build/parity/target/release/deps/libsyntex_syntax-7d0da333611756ca.rlib --cap-lints allow`
error[E0283]: type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>`
  --> util/network-devp2p/src/service.rs:35:91
   |
35 |                 info!(target: "network", "Public node URL: {}", Colour::White.bold().paint(public_url.as_ref()));
   |                                                                                                       ^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0283`.
error: Could not compile `ethcore-network-devp2p`.

last commit:

git log

commit 92776e4acf7b9c462ef8b01861facce5d4806f90 (HEAD -> stable, origin/stable)
Author: gabriel klawitter <gabreal@users.noreply.github.com>
Date:   Sat Jul 28 15:53:38 2018 +0200

    add snapcraft cmake build dependency (#9243)

Is there anything I'm missing? I'm able to build it without docker.

@ganibc
Copy link
Author

ganibc commented Aug 8, 2018

Related to #9304

@ganibc
Copy link
Author

ganibc commented Aug 8, 2018

I have more information.
I was able to compile with rustc version 1.26.1 (not on Docker)
Then I try updating
rustup update

info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2018-08-02, rust version 1.28.0 (9634041f0 2018-07-30)

Then

cargo clean
cargo build --release --features final

Now I got the same error.
I'm compiling in Ubuntu 18.04.
Succesfull with rustc version 1.26.1
Error with rustc version 1.28

@lrettig
Copy link

lrettig commented Aug 9, 2018

I'm getting the same error today trying to build 1.11.8 stable on Amazon Linux (CentOS), all dependencies installed, rustc 1.28.0 (9634041f0 2018-07-30).

@Tbaut Tbaut added F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M0-build 🏗 Building and build system. labels Aug 10, 2018
@Tbaut Tbaut added this to the 2.1 milestone Aug 10, 2018
@ghost
Copy link

ghost commented Aug 10, 2018

Same here, any suggestions??

error[E0283]: type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>`
  --> util/network-devp2p/src/service.rs:35:91
   |
35 |                 info!(target: "network", "Public node URL: {}", Colour::White.bold().paint(public_url.as_ref()));
   |                                                                                                       ^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0283`.
error: Could not compile `ethcore-network-devp2p`.

To learn more, run the command again with --verbose.

@Tbaut
Copy link
Contributor

Tbaut commented Aug 13, 2018

The rust version 1.28 isn't compatible with the stable branch due to a breaking change in rust. Please use a lower version.

@tomaka tomaka added the Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. label Aug 13, 2018
@ganibc
Copy link
Author

ganibc commented Aug 15, 2018

Hi @Tbaut,

In my case the problem was occur when I tried to build from docker file the project provided.
I think it can be helpful if the docker file is modified to download the working rust version or at least provide an instruction how to download the correct version.

@Tbaut
Copy link
Contributor

Tbaut commented Aug 15, 2018

@ganibc This is clear, it's the reason why the issue wasn't closed. Manually modifying the docker image is a proposed workaround, we need to fix the image.

@ordian
Copy link
Collaborator

ordian commented Aug 15, 2018

Should be fixed in 1.11.9 (#9228). Fixed by porting #8707.

@5chdn 5chdn modified the milestones: 2.1, 2.2 Sep 11, 2018
@debris debris closed this as completed Sep 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M0-build 🏗 Building and build system. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Projects
None yet
Development

No branches or pull requests

7 participants