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

Cannot compile flipper contract #391

Closed
ayeteng opened this issue May 11, 2020 · 3 comments
Closed

Cannot compile flipper contract #391

ayeteng opened this issue May 11, 2020 · 3 comments

Comments

@ayeteng
Copy link

ayeteng commented May 11, 2020

ubuntu@ubuntu1804:~/tmp/flipper$ cargo +nightly contract build
 [1/4] Collecting crate metadata
 [2/4] Building cargo project
   Compiling flipper v0.1.0 (/tmp/.cargo-contract_zD0iFQ)
error: failed to get bitcode from object file for LTO (Bitcode section not found in object file)

error: aborting due to previous error

error: could not compile `flipper`.

To learn more, run the command again with --verbose.
ERROR: xbuild failed with status exit code: 101

Version:
get flipper by cargo contract new flipper
cargo-contract v0.6.0
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.43.1 (8d69840ab 2020-05-04)
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.45.0-nightly (9912925c2 2020-05-10)

is this relevant here?

@Robbepop
Copy link
Collaborator

What seems to be the source of the problem:
rust-osdev/cargo-xbuild#69

@ascjones
Copy link
Collaborator

I think caused by rust-lang/cargo#8192.

I'm currently investigating this. In the meantime it will work using an older nightly release e.g.

cargo +nightly-2020-03-11 contract build

Note that you may need to install rust-src for that with rustup component add rust-src --toolchain nightly-2020-03-11

@riusricardo
Copy link
Contributor

Fixed on #52

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

4 participants