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

Build error: the target phat_hello is a binary and can't have any crate-types set #3

Open
logesh2496 opened this issue Jun 9, 2023 · 2 comments

Comments

@logesh2496
Copy link

I downloaded the code and tried to build the project using cargo +nightly contract build after installing cargo-contract. But got the below error:

error: failed to parse manifest at /private/var/folders/nw/vl8k59fs3gng74cg8c2_51280000gn/T/cargo-contract_o8a6PG/Cargo.toml``

Caused by:
the target phat_hello is a binary and can't have any crate-types set (currentlERROR: command ["/Users/.../.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo", "build", "--color=always", "--target=wasm32-unknown-unknown", "-Zbuild-std=core,alloc", "--no-default-features", "--release", "--target-dir=/Users/.../Downloads/phat-hello-master/target/ink", "--features", "ink/ink-debug"] exited with code 101

cargo version: 1.70.0
cargo-contract-contract 3.0.1-unknown-aarch64-apple-darwin

Thanks

@HashWarlock
Copy link
Collaborator

HashWarlock commented Jun 9, 2023

I'd suggest using cargo-contract v2. Cargo contract v3 introduced breaking changes to how artifacts are stored and you'll have to move them manually if you wish to use it. We will be making the changes to fix this, but for the time-being, we recommend to use v2.

Also, for context of what needs to be changed:
https://github.com/paritytech/cargo-contract/releases/tag/v3.0.0

@HashWarlock
Copy link
Collaborator

I fixed this in the swanky phala CLI tool here https://github.com/Phala-Network/swanky-plugin-phala/releases/tag/v0.1.10

Another thing to notice is you will need to use cargo version 1.69.0. I listed the minimum versions for building Phat Contracts in the README.md

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