knox-networks / ssi

Rust SSI library that helps developers handle Digital Identity, Verifiable Credentials and Verifiable Presentations.
Apache License 2.0
2 stars 0 forks source link

Error Building ssi project main branch #150

Closed yanctrindade closed 1 year ago

yanctrindade commented 1 year ago

Trying to build libraries from main branch im facing following issue on ssi:

yanctrindade@YanTrindade3-MBP ssi % cargo install
error: found a virtual manifest at `/Users/yanctrindade/Documents/projects/ssi/Cargo.toml` instead of a package manifest
yanctrindade@YanTrindade3-MBP ssi % cargo make
[cargo-make] INFO - cargo make 0.36.12
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: default
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Running Task: workspace
/Users/yanctrindade/Documents/projects/ssi
[cargo-make][1] INFO - Calling cargo metadata to extract project info
[cargo-make][1] INFO - Cargo metadata done
[cargo-make][1] INFO - Project: ssi_core
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: default
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Skipping Task: legacy-migration 
[cargo-make][1] INFO - Execute Command: "cargo" "fmt"
[cargo-make][1] INFO - Skipping Task: format-toml-conditioned-flow 
[cargo-make][1] INFO - Execute Command: "cargo" "build" "--all-features"
   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
   Compiling libc v0.2.147
   Compiling syn v1.0.109
   Compiling once_cell v1.18.0
   Compiling generic-array v0.14.7
   Compiling ahash v0.8.3
   Compiling smallvec v1.11.0
   Compiling futures-core v0.3.28
   Compiling slab v0.4.9
   Compiling utf8-decode v1.0.1
   Compiling futures-channel v0.3.28
   Compiling futures-task v0.3.28
   Compiling pct-str v1.2.0
   Compiling indexmap v1.9.3
   Compiling futures-sink v0.3.28
   Compiling futures-util v0.3.28
   Compiling contextual v0.1.6
   Compiling iref v2.2.3
   Compiling hashbrown v0.13.2
   Compiling pin-project-lite v0.2.13
   Compiling futures-io v0.3.28
   Compiling locspan v0.7.15
   Compiling json-number v0.4.6
   Compiling smallstr v0.3.0
   Compiling subtle v2.5.0
   Compiling langtag v0.3.4
   Compiling digest v0.9.0
   Compiling num-traits v0.2.16
   Compiling value-bag v1.4.1
   Compiling static-iref v2.0.0
   Compiling log v0.4.20
   Compiling serde v1.0.187
   Compiling mime v0.3.17
   Compiling crypto-mac v0.8.0
   Compiling block-buffer v0.9.0
   Compiling aho-corasick v1.0.4
   Compiling data-encoding v2.4.0
   Compiling thiserror v1.0.47
   Compiling quote v1.0.33
   Compiling anyhow v1.0.75
   Compiling regex-syntax v0.7.4
   Compiling syn v2.0.29
   Compiling getrandom v0.2.10
   Compiling proc-macro-error-attr v1.0.4
   Compiling ahash v0.7.6
   Compiling getrandom v0.1.16
   Compiling hashbrown v0.12.3
   Compiling rand_core v0.5.1
   Compiling cpufeatures v0.2.9
   Compiling rand_core v0.6.4
   Compiling tinyvec_macros v0.1.1
   Compiling rand_chacha v0.2.2
   Compiling tinyvec v1.6.0
   Compiling sha2 v0.9.9
   Compiling regex-automata v0.3.6
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.4
   Compiling either v1.9.0
   Compiling predicates-core v1.0.6
   Compiling unicode-normalization v0.1.22
   Compiling digest v0.10.7
   Compiling itertools v0.10.5
   Compiling float-cmp v0.9.0
   Compiling rand v0.7.3
   Compiling rand_chacha v0.3.1
   Compiling hmac v0.8.1
   Compiling pbkdf2 v0.4.0
   Compiling termtree v0.4.1
   Compiling core-foundation-sys v0.8.4
   Compiling proc-macro-error v1.0.4
   Compiling async-trait v0.1.73
   Compiling serde_json v1.0.105
   Compiling iana-time-zone v0.1.57
   Compiling predicates-tree v1.0.9
   Compiling rand v0.8.5
   Compiling regex v1.9.3
   Compiling sha2 v0.10.7
   Compiling time v0.1.45
   Compiling predicates v2.1.5
   Compiling ryu v1.0.15
   Compiling itoa v1.0.9
   Compiling chrono v0.4.26
   Compiling futures-macro v0.3.28
   Compiling zeroize_derive v1.4.2
   Compiling serde_derive v1.0.187
   Compiling thiserror-impl v1.0.47
   Compiling locspan-derive v0.6.0
   Compiling derivative v2.2.0
   Compiling data-encoding-macro-internal v0.1.11
   Compiling mockall_derive v0.11.4
   Compiling zeroize v1.3.0
   Compiling data-encoding-macro v0.1.13
   Compiling curve25519-dalek v3.2.1
   Compiling multibase v0.9.1
   Compiling rdf-types v0.12.19
   Compiling json-syntax v0.9.6
   Compiling tiny-bip39 v0.8.2
   Compiling json-ld-syntax v0.11.0
   Compiling mockall v0.11.4
   Compiling futures-executor v0.3.28
   Compiling futures v0.3.28
   Compiling json-ld-core v0.11.0
   Compiling json-ld-context-processing v0.11.0
   Compiling ed25519-zebra v3.1.0
   Compiling signature v0.1.0 (/Users/yanctrindade/Documents/projects/ssi/signature)
   Compiling json-ld-expansion v0.11.0
   Compiling json-ld-compaction v0.11.0
   Compiling json-ld v0.11.0
   Compiling ssi_core v0.1.0 (/Users/yanctrindade/Documents/projects/ssi/core)
error[E0277]: the trait bound `DateTime<Utc>: Serialize` is not satisfied
    --> core/src/lib.rs:28:17
     |
28   | #[derive(Debug, serde::Serialize, serde::Deserialize)]
     |                 ^^^^^^^^^^^^^^^^ the trait `Serialize` is not implemented for `DateTime<Utc>`
...
31   |     pub created: chrono::DateTime<chrono::Utc>,
     |     --- required by a bound introduced by this call
     |
     = help: the following other types implement trait `Serialize`:
               &'a T
               &'a mut T
               ()
               (T0, T1)
               (T0, T1, T2)
               (T0, T1, T2, T3)
               (T0, T1, T2, T3, T4)
               (T0, T1, T2, T3, T4, T5)
             and 147 others
note: required by a bound in `_::_serde::ser::SerializeStruct::serialize_field`
    --> /Users/yanctrindade/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.187/src/ser/mod.rs:1865:12
     |
1865 |         T: Serialize;
     |            ^^^^^^^^^ required by this bound in `_::_serde::ser::SerializeStruct::serialize_field`

error[E0277]: the trait bound `DateTime<Utc>: Deserialize<'_>` is not satisfied
    --> core/src/lib.rs:31:18
     |
31   |     pub created: chrono::DateTime<chrono::Utc>,
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `DateTime<Utc>`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               &'a Path
               &'a [u8]
               &'a str
               ()
               (T0, T1)
               (T0, T1, T2)
               (T0, T1, T2, T3)
               (T0, T1, T2, T3, T4)
             and 151 others
note: required by a bound in `next_element`
    --> /Users/yanctrindade/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.187/src/de/mod.rs:1724:12
     |
1724 |         T: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `next_element`

error[E0277]: the trait bound `DateTime<Utc>: Deserialize<'_>` is not satisfied
    --> core/src/lib.rs:33:18
     |
33   |     pub updated: chrono::DateTime<chrono::Utc>,
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `DateTime<Utc>`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               &'a Path
               &'a [u8]
               &'a str
               ()
               (T0, T1)
               (T0, T1, T2)
               (T0, T1, T2, T3)
               (T0, T1, T2, T3, T4)
             and 151 others
note: required by a bound in `next_element`
    --> /Users/yanctrindade/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.187/src/de/mod.rs:1724:12
     |
1724 |         T: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `next_element`

error[E0277]: the trait bound `DateTime<Utc>: Deserialize<'_>` is not satisfied
    --> core/src/lib.rs:31:18
     |
31   |     pub created: chrono::DateTime<chrono::Utc>,
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `DateTime<Utc>`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               &'a Path
               &'a [u8]
               &'a str
               ()
               (T0, T1)
               (T0, T1, T2)
               (T0, T1, T2, T3)
               (T0, T1, T2, T3, T4)
             and 151 others
note: required by a bound in `next_value`
    --> /Users/yanctrindade/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.187/src/de/mod.rs:1863:12
     |
1863 |         V: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `next_value`

error[E0277]: the trait bound `DateTime<Utc>: Deserialize<'_>` is not satisfied
    --> core/src/lib.rs:33:18
     |
33   |     pub updated: chrono::DateTime<chrono::Utc>,
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `DateTime<Utc>`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               &'a Path
               &'a [u8]
               &'a str
               ()
               (T0, T1)
               (T0, T1, T2)
               (T0, T1, T2, T3)
               (T0, T1, T2, T3, T4)
             and 151 others
note: required by a bound in `next_value`
    --> /Users/yanctrindade/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.187/src/de/mod.rs:1863:12
     |
1863 |         V: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `next_value`

error[E0277]: the trait bound `DateTime<Utc>: Deserialize<'_>` is not satisfied
  --> core/src/lib.rs:31:5
   |
31 |     pub created: chrono::DateTime<chrono::Utc>,
   |     ^^^ the trait `Deserialize<'_>` is not implemented for `DateTime<Utc>`
   |
   = help: the following other types implement trait `Deserialize<'de>`:
             &'a Path
             &'a [u8]
             &'a str
             ()
             (T0, T1)
             (T0, T1, T2)
             (T0, T1, T2, T3)
             (T0, T1, T2, T3, T4)
           and 151 others
note: required by a bound in `_::_serde::__private::de::missing_field`
  --> /Users/yanctrindade/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.187/src/private/de.rs:25:8
   |
25 |     V: Deserialize<'de>,
   |        ^^^^^^^^^^^^^^^^ required by this bound in `_::_serde::__private::de::missing_field`

error[E0277]: the trait bound `DateTime<Utc>: Deserialize<'_>` is not satisfied
  --> core/src/lib.rs:33:5
   |
33 |     pub updated: chrono::DateTime<chrono::Utc>,
   |     ^^^ the trait `Deserialize<'_>` is not implemented for `DateTime<Utc>`
   |
   = help: the following other types implement trait `Deserialize<'de>`:
             &'a Path
             &'a [u8]
             &'a str
             ()
             (T0, T1)
             (T0, T1, T2)
             (T0, T1, T2, T3)
             (T0, T1, T2, T3, T4)
           and 151 others
note: required by a bound in `_::_serde::__private::de::missing_field`
  --> /Users/yanctrindade/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.187/src/private/de.rs:25:8
   |
25 |     V: Deserialize<'de>,
   |        ^^^^^^^^^^^^^^^^ required by this bound in `_::_serde::__private::de::missing_field`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `ssi_core` due to 7 previous errors
[cargo-make][1] ERROR - Error while executing command, exit code: 101
[cargo-make][1] WARN - Build Failed.
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 5 - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.
yanctrindade@YanTrindade3-MBP ssi % 
LuisOsta commented 1 year ago

When I run cargo build --target=aarch64-linux-android --release I get the following error:

   Compiling ctor v0.1.26
   Compiling serde_derive v1.0.150
   Compiling futures-macro v0.3.25
   Compiling tokio-macros v1.8.2
   Compiling tracing-attributes v0.1.23
   Compiling locspan-derive v0.6.0
   Compiling prost-derive v0.11.2
   Compiling ring v0.16.20
   Compiling derivative v2.2.0
   Compiling ahash v0.7.6
error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `/Users/luisosta/ssi/target/release/build/ring-7992b626c9c8bf31/build-script-build` (exit status: 101)
  --- stdout
  OPT_LEVEL = Some("3")
  TARGET = Some("aarch64-linux-android")
  HOST = Some("aarch64-apple-darwin")
  cargo:rerun-if-env-changed=CC_aarch64-linux-android
  CC_aarch64-linux-android = None
  cargo:rerun-if-env-changed=CC_aarch64_linux_android
  CC_aarch64_linux_android = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64-linux-android
  CFLAGS_aarch64-linux-android = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_linux_android
  CFLAGS_aarch64_linux_android = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")

  --- stderr
  running "aarch64-linux-android-clang" "-O3" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/luisosta/ssi/target/aarch64-linux-android/release/build/ring-8db0135fb314341d/out/aesv8-armx-linux64.o" "/Users/luisosta/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"
  thread 'main' panicked at 'failed to execute ["aarch64-linux-android-clang" "-O3" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/luisosta/ssi/target/aarch64-linux-android/release/build/ring-8db0135fb314341d/out/aesv8-armx-linux64.o" "/Users/luisosta/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"]: No such file or directory (os error 2)', /Users/luisosta/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/build.rs:653:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish..

I'm investigating what the solution needs to be

LuisOsta commented 1 year ago

Update: This problem seems to occur in registry resolver and bubbles up during workspace build