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

Creating another gameroom type example for supplychain #822

Open
sbshrey opened this issue May 12, 2020 · 2 comments
Open

Creating another gameroom type example for supplychain #822

sbshrey opened this issue May 12, 2020 · 2 comments

Comments

@sbshrey
Copy link

sbshrey commented May 12, 2020

This error does not come for gameroom although the section is missing from database cargo.toml

tried to replicate the basic functionality of gameroom.
getting this error
cargo-deb: cargo (metadata): error: failed to parse manifest at /build/examples/supplychain/database/Cargo.toml

Caused by:
no targets specified in the manifest
either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present

ERROR: Service 'scabbard-cli' failed to build: The command '/bin/sh -c cargo deb --deb-version $REPO_VERSION $CARGO_ARGS' returned a non-zero code: 1

I have provided the cargo.toml for all cli, daemon and database in cli and scabbard of splinter. Still getting this error.

Can someone help me out in regard to this?

@sbshrey
Copy link
Author

sbshrey commented May 12, 2020

I have tried mentioning for database cargo.toml

[lib]
name = "supplychainlib"
path = "src/lib.rs"

then it resulted in error
Compiling splinter v0.3.17 (/build/libsplinter)
Compiling private-counter-cli v0.3.17 (/build/examples/private_counter/cli)
Compiling supplychain-database v0.3.17 (/build/examples/supplychain/database)
Compiling gameroom-database v0.3.17 (/build/examples/gameroom/database)
Compiling supplychain-cli v0.3.17 (/build/examples/supplychain/cli)
error: couldn't read examples/supplychain/database/src/lib.rs: No such file or directory (os error 2)

error: couldn't read examples/supplychain/cli/src/main.rs: No such file or directory (os error 2)

error: aborting due to previous error

error: aborting due to previous error

error: could not compile supplychain-database.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: could not compile supplychain-cli.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
cargo-deb: build failed
ERROR: Service 'scabbard-cli' failed to build: The command '/bin/sh -c cargo deb --deb-version $REPO_VERSION $CARGO_ARGS' returned a non-zero code: 1

@ameliabradley
Copy link
Contributor

@sbshrey You are using the Splinter gameroom docker build for your supplychain app. The problem is that the gameroom Dockerfile would not have copied your source code to the docker image when the image was created. That's why the build can't find examples/supplychain/database/src/lib.rs and examples/supplychain/cli/src/main.rs.

You just need to modify the Dockerfile-installed-focal file to add COPY commands for the directories containing your supplychain code. That should fix your problem.

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