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

Building failed. #44

Closed
herou opened this issue May 30, 2020 · 14 comments
Closed

Building failed. #44

herou opened this issue May 30, 2020 · 14 comments
Assignees

Comments

@herou
Copy link

herou commented May 30, 2020

Hello guys,

I am trying to build in release either in developing but I am facing the issue below:
image

@danforbes
Copy link
Contributor

I believe I have seen problems like this related to the Rust version that is being used. Can you please share this?

~: rustc --version
rustc 1.42.0 (b8cedc004 2020-03-09)
~: cargo --version
cargo 1.42.0 (86334295e 2020-01-31)

@danforbes danforbes self-assigned this May 30, 2020
@herou
Copy link
Author

herou commented May 30, 2020

~: rustc --version
rustc 1.43.1 (8d69840ab 2020-05-04)
~: cargo --version
cargo 1.43.0 (2cbe9048e 2020-05-03)

I do not see any main difference between your versions and mine :/

@danforbes
Copy link
Contributor

Can you share some steps to reproduce this issue? Are you building the node template? What tutorial are you following and what step are you at?

@herou
Copy link
Author

herou commented May 30, 2020

I am following this tutorial: https://www.substrate.io/tutorials/create-your-first-substrate-chain/v2.0.0-alpha.8/setup

and then I ran these commands:

Update Rust

rustup update nightly
rustup update stable

Add Wasm target

rustup target add wasm32-unknown-unknown --toolchain nightly

cd substrate-node-template/
git checkout -b my-first-substrate-chain
cargo build --release

That's it.

@herou
Copy link
Author

herou commented May 30, 2020

Another screenshot which may help:
image

@danforbes
Copy link
Contributor

Okay, it looks like you're building v2.0.0-rc of the node template, but following v2.0.0-alpha.8 of the tutorial, which may be a problem. Here is the current version of that tutorial. Did you do the source ~/.cargo/env step?

@herou
Copy link
Author

herou commented May 30, 2020

The initial commands are the same for both versions (v2.0.0-rc and v2.0.0-alpha.8). Yes, I executed also the source ~/.cargo/env command.

@danforbes
Copy link
Contributor

Okay, it looks like you're running on Windows, correct? Let me see if I can find someone with a Windows machine who may be able to replicate this issue.

@herou
Copy link
Author

herou commented May 30, 2020

Yes, I am using Windows but I am using Windows subsystem for Linux.

@danforbes
Copy link
Contributor

Helpful information, thanks for the context 👍

@danforbes
Copy link
Contributor

I asked in our Substrate Technical channel on Riot and the suggestion was, indeed, that you need to downgrade your Rust nightly to 15.05. Here are some commands that someone else provided me with but I have not tried myself:

rustup install nightly-2020-05-15
rustup override set nightly-2020-05-15
rustup target add wasm32-unknown-unknown --toolchain nightly-2020-05-15

@danforbes
Copy link
Contributor

Linking to the upstream Issue in Substrate paritytech/substrate#6167.

@herou
Copy link
Author

herou commented May 30, 2020

@danforbes it worked. Thank you!

@lam-my
Copy link

lam-my commented Jun 2, 2020

install or update rust:

cmd:
rustup update
rustup self update
rustup install nightly
rustup default nightly

or 大陆:

使用USTC 的rust mirror
echo "export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static" >> ~/.bashrc
echo "export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup" >> ~/.bashrc
source ~/.bashrc

使用cargo代理,增快rust下载速度
cat >~/.cargo/config <<EOF
[source.crates-io]
replace-with = 'ustc'

[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
EOF

安装rust nightly版本,并默认使用nightly版本
rustup install nightly
rustup default nightly

*** 安装RLS组建***
rustup component add rls --toolchain nightly
rustup component add rust-analysis --toolchain nightly
rustup component add rust-src --toolchain nightly

安装racer
cargo install racer

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants