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

Install cargo-contract failed #467

Closed
boundless-forest opened this issue Mar 18, 2022 · 3 comments
Closed

Install cargo-contract failed #467

boundless-forest opened this issue Mar 18, 2022 · 3 comments

Comments

@boundless-forest
Copy link

Error happened following Setup guide

$ cargo install cargo-contract --vers ^1.0 --force --locked

The following warnings were emitted during compilation:

warning: Git command failed with status: exit status: 128
warning: Could not find `.git/HEAD` searching from `/home/bear/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-contract-1.0.0` upwards!

error: failed to run custom build command for `cargo-contract v1.0.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installOMZbTA/release/build/cargo-contract-f3259483a1def9da/build-script-build` (exit status: 1)
  --- stdout
  cargo:warning=Git command failed with status: exit status: 128
  cargo:rustc-env=CARGO_CONTRACT_CLI_IMPL_VERSION=1.0.0-unknown-x86_64-linux-gnu
  cargo:warning=Could not find `.git/HEAD` searching from `/home/bear/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-contract-1.0.0` upwards!
  Creating template zip: template_dir '/home/bear/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-contract-1.0.0/templates/new', destination archive '/tmp/cargo-installOMZbTA/release/build/cargo-contract-57adca395546b84a/out/template.zip'
  Done: /home/bear/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-contract-1.0.0/templates/new written to /tmp/cargo-installOMZbTA/release/build/cargo-contract-57adca395546b84a/out/template.zip

  --- stderr
  Encountered error: No such file or directory (os error 2)
warning: build failed, waiting for other jobs to finish...
@cmichi cmichi transferred this issue from use-ink/ink-docs Mar 18, 2022
@cmichi
Copy link
Collaborator

cmichi commented Mar 18, 2022

Oha, thank you for creating this issue!

I can't reproduce it locally and our CI also runs fine, I've created a branch with more detailed error reporting. Could you please try this and post the output?

cargo install --git https://github.com/paritytech/cargo-contract.git --branch cmichi-add-build-script-output --force --locked

@boundless-forest
Copy link
Author

boundless-forest commented Mar 18, 2022

This command works! Do you know the root cause here? @cmichi

@cmichi
Copy link
Collaborator

cmichi commented Mar 18, 2022

@AsceticBear Unfortunately not, we tried to reproduce it on different operating systems, but haven't succeeded. We've added some more error output to the installation process, if it reappears this might give a better idea what could have gone wrong.

I think it's likely an issue with the ink_linting folder not being properly copied during installation, but I can't think of any scenario how this would happen. I guess you don't have any exotic in your setup? No exotic file system or so?

I'll close this issue for now, as you've managed to install now.

@cmichi cmichi closed this as completed Mar 18, 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

2 participants