Skip to content

maybe the version problem #23

@Marshal1l

Description

@Marshal1l

when I try to compile my trustee env in docker as followes

git clone https://git.codelinaro.org/linaro/dcap/cca-demos/build-ccs.git
cd build-ccs/trustee
docker compose up -d

veraison-apiclient = { git = "https://github.com/veraison/rust-apiclient", branch = "async+https", optional = true }
I find https://github.com/thomas-fossati/rust-apiclient is abandoned, so I find this repository,and I do this to change the source of rust-apiclient.
RUN sed -i 's|git = "https://github.com/thomas-fossati/rust-apiclient"|git = "https://github.com/veraison/rust-apiclient"|' /usr/src/kbs/coco-trustee/attestation-service/verifier/Cargo.toml
The branch is still async+https ,but I meet the problem as followes, I think maybe this branch is also differ from the old repository https://github.com/veraison/rust-apiclient, Dear developer, can you give me some advice, the error is as follows.

91.05    Compiling verifier v0.1.0 (/usr/src/attestation-service/coco-trustee/attestation-service/verifier)
91.28 error[E0433]: failed to resolve: use of undeclared type `DiscoveryBuilder`
91.28   --> attestation-service/verifier/src/cca/remote.rs:39:29
91.28    |
91.28 39 |     let mut disco_builder = DiscoveryBuilder::new().with_url(discovery_api_endpoint);
91.28    |                             ^^^^^^^^^^^^^^^^ use of undeclared type `DiscoveryBuilder`
91.28
91.31 error[E0599]: no method named `with_root_certificate` found for struct `veraison_apiclient::ChallengeResponseBuilder` in the current scope
91.31   --> attestation-service/verifier/src/cca/remote.rs:63:33
91.31    |
91.31 63 |         cr_builder = cr_builder.with_root_certificate(ca_cert.clone().unwrap())
91.31    |                                 ^^^^^^^^^^^^^^^^^^^^^ method not found in `ChallengeResponseBuilder`
91.31
91.34 error[E0061]: this method takes 2 arguments but 3 arguments were supplied
91.34    --> attestation-service/verifier/src/cca/remote.rs:72:27
91.34     |
91.34 72  |     let result = match cr.run(n, evidence_builder, token.clone()).await {
91.34     |                           ^^^                      ------------- unexpected argument #3 of type `Vec<u8>`
91.34     |
91.34 note: incorrect number of function parameters
91.34    --> attestation-service/verifier/src/cca/remote.rs:72:34
91.35     |
91.35 72  |     let result = match cr.run(n, evidence_builder, token.clone()).await {
91.35     |                                  ^^^^^^^^^^^^^^^^
91.35     = note: expected fn pointer `for<'a, 'b> fn(&'a [u8], &'b [std::string::String]) -> std::result::Result<_, _>`
91.35                   found fn item `for<'a, 'b> fn(&'a [u8], &'b [std::string::String], Vec<u8>) -> std::result::Result<_, _> {evidence_builder}`
91.35 note: method defined here
91.35    --> /usr/local/cargo/git/checkouts/rust-apiclient-0a19ef7cc3635a19/8e1268e/rust-client/src/lib.rs:115:12
91.35     |
91.35 115 |     pub fn run(
91.35     |            ^^^
91.35 help: remove the extra argument
91.35     |
91.35 72  -     let result = match cr.run(n, evidence_builder, token.clone()).await {
91.35 72  +     let result = match cr.run(n, /* for<'a, 'b> fn(&'a [u8], &'b [std::string::String]) -> std::result::Result<(Vec<u8>, std::string::String), veraison_apiclient::Error> */).await {
91.35     |
91.35
91.35 error[E0277]: `std::result::Result<std::string::String, veraison_apiclient::Error>` is not a future
91.35   --> attestation-service/verifier/src/cca/remote.rs:72:67
91.35    |
91.35 72 |     let result = match cr.run(n, evidence_builder, token.clone()).await {
91.35    |                                                                  -^^^^^
91.35    |                                                                  ||
91.35    |                                                                  |`std::result::Result<std::string::String, veraison_apiclient::Error>` is not a future
91.35    |                                                                  help: remove the `.await`
91.35    |
91.35    = help: the trait `Future` is not implemented for `std::result::Result<std::string::String, veraison_apiclient::Error>`
91.35    = note: std::result::Result<std::string::String, veraison_apiclient::Error> must be a future or must implement `IntoFuture` to be awaited
91.35    = note: required for `std::result::Result<std::string::String, veraison_apiclient::Error>` to implement `IntoFuture`
91.35
91.65 Some errors have detailed explanations: E0061, E0277, E0433, E0599.
91.65 For more information about an error, try `rustc --explain E0061`.
91.66 error: could not compile `verifier` (lib) due to 4 previous errors
91.66 warning: build failed, waiting for other jobs to finish...
221.5 error: failed to compile `attestation-service v0.1.0 (/usr/src/attestation-service/coco-trustee/attestation-service/attestation-service)`, intermediate artifacts can be found at `/usr/src/attestation-service/coco-trustee/target`.
221.5 To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
------
failed to solve: process "/bin/sh -c cd coco-trustee/attestation-service &&     cargo install     --path attestation-service     --bin grpc-as     --no-default-features     --features cca-verifier,rvps-grpc,grpc-bin,reference-value-provider-service" did not complete successfully: exit code: 101

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions