nervosnetwork / capsule

Capsule is an out-of-box development framework for creating smart contract on Nervos' CKB.
MIT License
61 stars 34 forks source link

[BUG] Installing capsule 10.5 returns a capsule compilation error #157

Closed phroi closed 3 months ago

phroi commented 4 months ago
user@host:~/ickb/v1-core/scripts$ cargo install ckb-capsule --git https://github.com/nervosnetwork/capsule.git --branch develop
    Updating git repository `https://github.com/nervosnetwork/capsule.git`
warning: skipping duplicate package `tests` found at `/home/user/.cargo/git/checkouts/capsule-456f646e9dda89ac/bd6e4f7/crates/tests/test-contract/tests`
warning: skipping duplicate package `tests` found at `/home/user/.cargo/git/checkouts/capsule-456f646e9dda89ac/bd6e4f7/templates/lua/embedded/contract`
warning: skipping duplicate package `tests` found at `/home/user/.cargo/git/checkouts/capsule-456f646e9dda89ac/bd6e4f7/templates/lua/standalone/contract`
  Installing ckb-capsule v0.10.5 (https://github.com/nervosnetwork/capsule.git?branch=develop#bd6e4f71)
    Updating crates.io index
  Downloaded chrono-tz-build v0.3.0
  Downloaded ckb-pow v0.117.0
  Downloaded ckb-hash v0.117.0
  Downloaded ckb-fixed-hash-macros v0.117.0
  Downloaded ckb-fixed-hash v0.117.0
  Downloaded ckb-error v0.117.0
  Downloaded ckb-fixed-hash-core v0.117.0
  Downloaded ckb-rational v0.117.0
  Downloaded ckb-logger v0.117.0
  Downloaded ckb-traits v0.117.0
  Downloaded ckb-occupied-capacity-macros v0.117.0
  Downloaded ckb-occupied-capacity-core v0.117.0
  Downloaded ckb-occupied-capacity v0.117.0
  Downloaded ckb-constant v0.117.0
  Downloaded ckb-dao-utils v0.117.0
  Downloaded fastrand v2.1.0
  Downloaded autocfg v1.3.0
  Downloaded paste v1.0.15
  Downloaded pest_generator v2.7.11
  Downloaded errno v0.3.9
  Downloaded either v1.13.0
  Downloaded lazy_static v1.5.0
  Downloaded ckb-occupied-capacity-macros v0.116.1
  Downloaded ckb-channel v0.117.0
  Downloaded ckb-channel v0.116.1
  Downloaded ckb-occupied-capacity-core v0.116.1
  Downloaded ckb-logger v0.116.1
  Downloaded ckb-fixed-hash-macros v0.116.1
  Downloaded ckb-fixed-hash-core v0.116.1
  Downloaded ckb-rational v0.116.1
  Downloaded ckb-mock-tx-types v0.116.1
  Downloaded ckb-vm-definitions v0.24.9
  Downloaded ckb-verification-traits v0.116.1
  Downloaded ckb-traits v0.116.1
  Downloaded ckb-systemtime v0.116.1
  Downloaded ckb-pow v0.116.1
  Downloaded ckb-hash v0.116.1
  Downloaded ckb-constant v0.116.1
  Downloaded ckb-crypto v0.116.1
  Downloaded ppv-lite86 v0.2.18
  Downloaded ckb-error v0.116.1
  Downloaded ckb-dao-utils v0.116.1
  Downloaded ckb-occupied-capacity v0.116.1
  Downloaded ckb-dao v0.116.1
  Downloaded ckb-mock-tx-types v0.117.0
  Downloaded ckb-crypto v0.117.0
  Downloaded molecule v0.8.0
  Downloaded ckb-fixed-hash v0.116.1
  Downloaded globwalk v0.9.1
  Downloaded ckb-resource v0.117.0
  Downloaded parking_lot_core v0.9.10
  Downloaded ckb-jsonrpc-types v0.117.0
  Downloaded pest_derive v2.7.11
  Downloaded serde_spanned v0.6.7
  Downloaded getrandom v0.2.15
  Downloaded native-tls v0.2.12
  Downloaded toml_datetime v0.6.8
  Downloaded lock_api v0.4.12
  Downloaded ckb-verification v0.116.1
  Downloaded xxhash-rust v0.8.12
  Downloaded tokio-macros v2.4.0
  Downloaded ckb_schemars_derive v0.8.19
  Downloaded bitflags v2.6.0
  Downloaded crc32fast v1.4.2
  Downloaded derive_more v0.99.18
  Downloaded httparse v1.9.4
  Downloaded ckb-chain-spec v0.117.0
  Downloaded log v0.4.22
  Downloaded miniz_oxide v0.7.4
  Downloaded num-traits v0.2.19
  Downloaded ckb-types v0.117.0
  Downloaded crossbeam-utils v0.8.20
  Downloaded ckb-jsonrpc-types v0.116.1
  Downloaded anyhow v1.0.86
  Downloaded thiserror v1.0.63
  Downloaded ckb-resource v0.116.1
  Downloaded parking_lot v0.12.3
  Downloaded version_check v0.9.5
  Downloaded reflink-copy v0.1.19
  Downloaded openssl-sys v0.9.103
  Downloaded thiserror-impl v1.0.63
  Downloaded pest_meta v2.7.11
  Downloaded ckb-types v0.116.1
  Downloaded ckb-chain-spec v0.116.1
  Downloaded ryu v1.0.18
  Downloaded cc v1.1.7
  Downloaded indexmap v2.3.0
  Downloaded bytes v1.7.0
  Downloaded serde_derive_internals v0.26.0
  Downloaded serde_derive v1.0.204
  Downloaded tinyvec v1.8.0
  Downloaded flate2 v1.0.30
  Downloaded socket2 v0.5.7
  Downloaded ckb_schemars v0.8.19
  Downloaded semver v1.0.23
  Downloaded zerocopy v0.6.6
  Downloaded ckb-gen-types v0.117.0
  Downloaded proc-macro2 v1.0.86
  Downloaded mio v1.0.1
  Downloaded parse-zoneinfo v0.3.1
  Downloaded memchr v2.7.4
  Downloaded url v2.5.2
  Downloaded crossbeam-channel v0.5.13
  Downloaded ckb-vm v0.24.9
  Downloaded ckb-gen-types v0.116.1
  Downloaded serde v1.0.204
  Downloaded pest v2.7.11
  Downloaded tera v1.20.0
  Downloaded hashbrown v0.14.5
  Downloaded tokio-util v0.7.11
  Downloaded secp256k1 v0.29.0
  Downloaded serde_json v1.0.121
  Downloaded deunicode v1.6.0
  Downloaded hyper v0.14.30
  Downloaded chrono v0.4.38
  Downloaded regex v1.10.5
  Downloaded openssl v0.10.66
  Downloaded syn v2.0.72
  Downloaded rustix v0.38.34
  Downloaded regex-syntax v0.8.4
  Downloaded chrono-tz v0.9.0
  Downloaded bstr v1.10.0
  Downloaded unicode-width v0.1.13
  Downloaded zerocopy-derive v0.6.6
  Downloaded regex-automata v0.4.7
  Downloaded tokio v1.39.2
  Downloaded libc v0.2.155
  Downloaded secp256k1-sys v0.10.0
  Downloaded ckb-script v0.116.1
  Downloaded ckb-script v0.117.0
  Downloaded encoding_rs v0.8.34
  Downloaded ckb-sdk v3.3.0
  Downloaded linux-raw-sys v0.4.14
  Downloaded 133 crates (19.7 MB) in 7.76s (largest was `secp256k1-sys` at 2.6 MB)
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling serde v1.0.204
   Compiling syn v1.0.109
   Compiling cc v1.1.7
   Compiling libc v0.2.155
   Compiling thiserror v1.0.63
   Compiling cfg-if v1.0.0
   Compiling getrandom v0.1.16
   Compiling quote v1.0.36
   Compiling syn v2.0.72
   Compiling serde_json v1.0.121
   Compiling byteorder v1.5.0
   Compiling rand_core v0.5.1
   Compiling rand_pcg v0.2.1
   Compiling memchr v2.7.4
   Compiling faster-hex v0.6.1
   Compiling ckb_schemars v0.8.19
   Compiling serde_derive_internals v0.26.0
   Compiling blake2b-rs v0.2.0
   Compiling heapsize v0.4.2
   Compiling ryu v1.0.18
   Compiling itoa v1.0.11
   Compiling crossbeam-utils v0.8.20
   Compiling dyn-clone v1.0.17
   Compiling numext-constructor v0.1.6
   Compiling anyhow v1.0.86
   Compiling ckb_schemars_derive v0.8.19
   Compiling convert_case v0.4.0
   Compiling siphasher v0.3.11
   Compiling once_cell v1.19.0
   Compiling serde_derive v1.0.204
   Compiling thiserror-impl v1.0.63
   Compiling zerocopy-derive v0.6.6
   Compiling zerocopy v0.6.6
   Compiling ppv-lite86 v0.2.18
   Compiling derive_more v0.99.18
   Compiling rand_chacha v0.2.2
   Compiling rand v0.7.3
   Compiling version_check v0.9.5
   Compiling paste v1.0.15
   Compiling autocfg v1.3.0
   Compiling cty v0.2.2
   Compiling numext-fixed-uint-core v0.1.6
   Compiling bytes v1.7.0
   Compiling phf_shared v0.8.0
   Compiling log v0.4.22
   Compiling blake2b-ref v0.3.1
   Compiling adler v1.0.2
   Compiling miniz_oxide v0.7.4
   Compiling crossbeam-channel v0.5.13
   Compiling crc32fast v1.4.2
   Compiling numext-fixed-uint-hack v0.1.6
   Compiling flate2 v1.0.30
   Compiling phf_generator v0.8.0
   Compiling ckb-occupied-capacity-core v0.116.1
   Compiling same-file v1.0.6
   Compiling pin-project-lite v0.2.14
   Compiling walkdir v2.5.0
   Compiling ckb-occupied-capacity-macros v0.116.1
   Compiling phf_codegen v0.8.0
   Compiling golomb-coded-set v0.2.1
   Compiling ckb-merkle-mountain-range v0.5.2
   Compiling merkle-cbt v0.3.2
   Compiling bit-vec v0.6.3
   Compiling includedir_codegen v0.6.0
   Compiling ckb-fixed-hash-core v0.116.1
   Compiling bitflags v2.6.0
   Compiling ckb-fixed-hash-macros v0.116.1
   Compiling numext-fixed-uint v0.1.6
   Compiling ckb-occupied-capacity-core v0.117.0
   Compiling typenum v1.17.0
   Compiling futures-core v0.3.30
   Compiling ckb-occupied-capacity-macros v0.117.0
   Compiling ckb-fixed-hash-core v0.117.0
   Compiling slab v0.4.9
   Compiling generic-array v0.14.7
   Compiling futures-sink v0.3.30
   Compiling ckb-fixed-hash-macros v0.117.0
   Compiling ckb-system-scripts v0.5.4
   Compiling futures-channel v0.3.30
   Compiling tokio-macros v2.4.0
   Compiling futures-macro v0.3.30
   Compiling mio v1.0.1
   Compiling socket2 v0.5.7
   Compiling futures-task v0.3.30
   Compiling futures-io v0.3.30
   Compiling pin-utils v0.1.0
   Compiling tokio v1.39.2
   Compiling futures-util v0.3.30
   Compiling phf v0.8.0
   Compiling ckb-occupied-capacity v0.116.1
   Compiling includedir v0.6.0
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.4
   Compiling ckb-fixed-hash v0.116.1
   Compiling digest v0.10.7
   Compiling ckb-error v0.116.1
   Compiling ckb-hash v0.116.1
   Compiling molecule v0.7.5
   Compiling getrandom v0.2.15
   Compiling cpufeatures v0.2.12
   Compiling unicode-width v0.1.13
   Compiling rustix v0.38.34
   Compiling ckb-occupied-capacity v0.117.0
   Compiling ckb-gen-types v0.116.1
   Compiling ckb-fixed-hash v0.117.0
   Compiling ckb-rational v0.116.1
   Compiling ckb-channel v0.116.1
   Compiling ckb-constant v0.116.1
   Compiling linux-raw-sys v0.4.14
   Compiling base64 v0.21.7
   Compiling ckb-error v0.117.0
   Compiling futures-executor v0.3.30
   Compiling ckb-hash v0.117.0
   Compiling molecule v0.8.0
   Compiling miette-derive v5.10.0
   Compiling lazy_static v1.5.0
   Compiling vcpkg v0.2.15
   Compiling pkg-config v0.3.30
   Compiling ckb-types v0.116.1
   Compiling openssl-sys v0.9.103
   Compiling miette v5.10.0
   Compiling ckb-gen-types v0.117.0
   Compiling futures v0.3.30
   Compiling sha-1 v0.10.1
   Compiling sha2 v0.10.8
   Compiling ckb-rational v0.117.0
   Compiling ckb-channel v0.117.0
   Compiling fastrand v2.1.0
   Compiling hex v0.4.3
   Compiling ckb-constant v0.117.0
   Compiling xxhash-rust v0.8.12
   Compiling eaglesong v0.1.0
   Compiling ssri v9.2.0
   Compiling tempfile v3.10.1
   Compiling ckb-types v0.117.0
   Compiling reflink-copy v0.1.19
   Compiling sha1 v0.10.6
   Compiling tokio-stream v0.1.15
   Compiling scroll_derive v0.10.5
   Compiling memmap2 v0.5.10
   Compiling secp256k1-sys v0.6.1
   Compiling hashbrown v0.14.5
   Compiling either v1.13.0
   Compiling cacache v12.0.0
   Compiling scroll v0.10.2
   Compiling rand_core v0.6.4
   Compiling toml v0.5.11
   Compiling phf_shared v0.11.2
   Compiling plain v0.2.3
   Compiling equivalent v1.0.1
   Compiling regex-syntax v0.8.4
   Compiling regex-automata v0.4.7
   Compiling indexmap v2.3.0
   Compiling rand v0.8.5
   Compiling rand_chacha v0.3.1
   Compiling ckb-resource v0.116.1
   Compiling ahash v0.7.8
   Compiling aho-corasick v1.1.3
   Compiling ckb-vm v0.24.9
   Compiling secp256k1-sys v0.10.0
   Compiling fnv v1.0.7
   Compiling openssl v0.10.66
   Compiling foreign-types-shared v0.1.1
   Compiling foreign-types v0.3.2
   Compiling http v0.2.12
   Compiling regex v1.10.5
   Compiling phf_generator v0.11.2
   Compiling secp256k1 v0.24.3
   Compiling goblin v0.2.3
   Compiling goblin v0.4.0
   Compiling ckb-jsonrpc-types v0.116.1
   Compiling ckb-traits v0.116.1
   Compiling ckb-vm-definitions v0.24.9
   Compiling openssl-macros v0.1.1
   Compiling tracing-core v0.1.32
   Compiling native-tls v0.2.12
   Compiling tinyvec_macros v0.1.1
   Compiling httparse v1.9.4
   Compiling percent-encoding v2.3.1
   Compiling tinyvec v1.8.0
   Compiling tracing v0.1.40
   Compiling ckb-crypto v0.116.1
   Compiling phf_codegen v0.11.2
   Compiling parse-zoneinfo v0.3.1
   Compiling ckb-resource v0.117.0
   Compiling phf v0.11.2
   Compiling ckb-pow v0.116.1
   Compiling ckb-dao-utils v0.116.1
   Compiling tokio-util v0.7.11
   Compiling ckb-logger v0.116.1
   Compiling num-traits v0.2.19
   Compiling lock_api v0.4.12
   Compiling proc-macro-error-attr v1.0.4
   Compiling ucd-trie v0.1.6
   Compiling openssl-probe v0.1.5
   Compiling parking_lot_core v0.9.10
   Compiling bitflags v1.3.2
   Compiling try-lock v0.2.5
   Compiling want v0.3.1
   Compiling pest v2.7.11
   Compiling ckb-chain-spec v0.116.1
   Compiling h2 v0.3.26
   Compiling chrono-tz-build v0.3.0
   Compiling secp256k1 v0.29.0
   Compiling hashbrown v0.12.3
   Compiling unicode-normalization v0.1.23
   Compiling form_urlencoded v1.2.1
   Compiling http-body v0.4.6
   Compiling ckb-traits v0.117.0
   Compiling ckb-jsonrpc-types v0.117.0
   Compiling crossbeam-epoch v0.9.18
   Compiling proc-macro-error v1.0.4
   Compiling bstr v1.10.0
   Compiling httpdate v1.0.3
   Compiling unicode-bidi v0.3.15
   Compiling smallvec v1.13.2
   Compiling ckb-script v0.116.1
   Compiling scopeguard v1.2.0
   Compiling tower-service v0.3.2
   Compiling unic-char-range v0.9.0
   Compiling libm v0.2.8
   Compiling unic-common v0.9.0
   Compiling cfg_aliases v0.1.1
   Compiling nix v0.28.0
   Compiling unic-ucd-version v0.9.0
   Compiling unic-char-property v0.9.0
   Compiling hyper v0.14.30
   Compiling idna v0.5.0
   Compiling globset v0.4.14
   Compiling crossbeam-deque v0.8.5
   Compiling lru v0.7.8
   Compiling ckb-crypto v0.117.0
   Compiling pest_meta v2.7.11
   Compiling chrono-tz v0.9.0
   Compiling tokio-native-tls v0.3.1
   Compiling ckb-dao-utils v0.117.0
   Compiling ckb-pow v0.117.0
   Compiling ckb-logger v0.117.0
   Compiling sparse-merkle-tree v0.6.1
   Compiling ckb-script v0.117.0
   Compiling iana-time-zone v0.1.60
   Compiling chrono v0.4.38
   Compiling ckb-chain-spec v0.117.0
   Compiling hyper-tls v0.5.0
   Compiling pest_generator v2.7.11
   Compiling ignore v0.4.22
   Compiling url v2.5.2
   Compiling unic-ucd-segment v0.9.0
   Compiling serde_urlencoded v0.7.1
   Compiling ckb-dao v0.116.1
   Compiling ckb-verification-traits v0.116.1
   Compiling rustls-pemfile v1.0.4
   Compiling encoding_rs v0.8.34
   Compiling ckb-systemtime v0.116.1
   Compiling deunicode v1.6.0
   Compiling cfg-if v0.1.10
   Compiling ipnet v2.9.0
   Compiling keccak v0.1.5
   Compiling mime v0.3.17
   Compiling sync_wrapper v0.1.2
   Compiling reqwest v0.11.27
   Compiling sha3 v0.10.8
   Compiling slug v0.1.5
   Compiling ckb-verification v0.116.1
   Compiling humansize v2.1.3
   Compiling unic-segment v0.9.0
   Compiling globwalk v0.9.1
   Compiling pest_derive v2.7.11
   Compiling enum-repr-derive v0.2.0
   Compiling dashmap v5.5.3
   Compiling parking_lot v0.12.3
   Compiling ckb-mock-tx-types v0.117.0
   Compiling ckb-mock-tx-types v0.116.1
   Compiling jsonrpc-core v18.0.0
   Compiling textwrap v0.11.0
   Compiling ckb-capsule v0.10.5 (/home/user/.cargo/git/checkouts/capsule-456f646e9dda89ac/bd6e4f7)
   Compiling toml_datetime v0.6.8
   Compiling serde_spanned v0.6.7
   Compiling derive-getters v0.2.1
   Compiling is-terminal v0.4.12
   Compiling xshell-macros v0.2.2
   Compiling strsim v0.8.0
   Compiling winnow v0.5.40
   Compiling bech32 v0.8.1
   Compiling unsafe-libyaml v0.2.11
   Compiling humantime v2.1.0
   Compiling ckb-always-success-script v0.0.1
   Compiling vec_map v0.8.2
   Compiling termcolor v1.4.1
   Compiling toml_edit v0.19.15
   Compiling env_logger v0.10.2
   Compiling serde_yaml v0.9.34+deprecated
   Compiling clap v2.34.0
   Compiling ckb-testtool v0.12.0 (/home/user/.cargo/git/checkouts/capsule-456f646e9dda89ac/bd6e4f7/crates/testtool)
   Compiling ckb-sdk v3.3.0
   Compiling xshell v0.2.2
   Compiling tera v1.20.0
   Compiling ctrlc v3.4.4
   Compiling users v0.10.0
   Compiling rpassword v4.0.5
   Compiling atty v0.2.14
   Compiling path_macro v1.0.0
error[E0277]: the trait bound `ckb_testtool::ckb_types::packed::Script: From<&ckb_sdk::Address>` is not satisfied
   --> src/wallet/wallet.rs:246:25
    |
246 |         (&self.address).into()
    |                         ^^^^ the trait `From<&ckb_sdk::Address>` is not implemented for `ckb_testtool::ckb_types::packed::Script`
    |
    = help: the trait `From<ckb_testtool::ckb_jsonrpc_types::Script>` is implemented for `ckb_testtool::ckb_types::packed::Script`
    = note: required for `&ckb_sdk::Address` to implement `Into<ckb_testtool::ckb_types::packed::Script>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `ckb-capsule` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `ckb-capsule v0.10.5 (https://github.com/nervosnetwork/capsule.git?branch=develop#bd6e4f71)`, intermediate artifacts can be found at `/tmp/cargo-installrm3hah`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
user@host:~/ickb/v1-core/scripts$ capsule --version
Capsule 0.10.4 eff02bf
quake commented 3 months ago

please use

cargo install ckb-capsule --git https://github.com/nervosnetwork/capsule.git --branch develop --locked
phroi commented 3 months ago

Hey @quake, thanks for replying!!

I'm aware of the fix thanks to CyberOrange, still I believe this represents an issue that you may want to fix, possibly at a later time.

For now I'll just stick to Capsule 10.4. By any chance, do you know if there is any know issue with 10.4? (vs 10.5)

quake commented 3 months ago

Hey @quake, thanks for replying!!

I'm aware of the fix thanks to CyberOrange, still I believe this represents an issue that you may want to fix, possibly at a later time.

it's not a bug, we have update the README accordingly.

For now I'll just stick to Capsule 10.4. By any chance, do you know if there is any know issue with 10.4? (vs 10.5)

no major issue with 10.4

phroi commented 3 months ago

Perfect, closing this issue then :+1: