HigherOrderCO / Kind

A modern proof language
https://higherorderco.com
MIT License
3.58k stars 142 forks source link

Getting errors when trying to run cargo install kind2 #520

Closed Arrow7000 closed 1 year ago

Arrow7000 commented 1 year ago

I'm getting errors when running cargo install kind2. I've pasted the full log below, but the first error is

error[E0554]: `#![feature]` may not be used on the stable release channel

followed by a bunch of

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope

I don't really use Rust so this may well be something pretty basic, like enabling a language feature flag. If so would you be able to point me towards which language features should be enabled, and any other settings I need to change to get this to install correctly?

I'm using an M1 MacBook Pro, on macOS Ventura 13.2.1. Cargo version 1.68.1 (115f34552 2023-02-26).

Full log

aron in ~ $ cargo install kind2
    Updating crates.io index
  Downloaded kind2 v0.3.8
  Downloaded 1 crate (15.8 KB) in 1.00s
  Installing kind2 v0.3.8
  Downloaded primitive-types v0.11.1
  Downloaded rand_core v0.3.1
  Downloaded memoffset v0.8.0
  Downloaded parity-scale-codec-derive v3.1.4
  Downloaded opaque-debug v0.3.0
  Downloaded scopeguard v1.1.0
  Downloaded rustc-hex v2.1.0
  Downloaded strsim v0.10.0
  Downloaded proc-macro-crate v1.3.1
  Downloaded radium v0.7.0
  Downloaded proc-macro-error-attr v1.0.4
  Downloaded pathdiff v0.2.1
  Downloaded atty v0.2.14
  Downloaded autocfg v1.1.0
  Downloaded autocfg v0.1.8
  Downloaded adler v1.0.2
  Downloaded sysinfo v0.26.9
  Downloaded termcolor v1.2.0
  Downloaded syn v2.0.10
  Downloaded serde v1.0.158
  Downloaded parking_lot_core v0.9.7
  Downloaded once_cell v1.17.1
  Downloaded miniz_oxide v0.6.2
  Downloaded tiny-keccak v2.0.2
  Downloaded version_check v0.9.4
  Downloaded unicode-width v0.1.10
  Downloaded unicode-ident v1.0.8
  Downloaded yansi v0.5.1
  Downloaded wyz v0.5.1
  Downloaded secp256k1 v0.22.2
  Downloaded toml_datetime v0.6.1
  Downloaded thiserror-impl v1.0.40
  Downloaded winnow v0.4.1
  Downloaded secp256k1-sys v0.5.2
  Downloaded bit-vec v0.6.3
  Downloaded rand v0.6.5
  Downloaded parity-scale-codec v3.4.0
  Downloaded ppv-lite86 v0.2.17
  Downloaded rand_jitter v0.1.4
  Downloaded rand_core v0.4.2
  Downloaded clap_lex v0.2.4
  Downloaded clap_lex v0.3.3
  Downloaded crunchy v0.2.2
  Downloaded funty v2.0.0
  Downloaded fxhash v0.2.1
  Downloaded fixed-hash v0.7.0
  Downloaded errno v0.2.8
  Downloaded hex v0.4.3
  Downloaded instant v0.1.12
  Downloaded crossbeam v0.8.2
  Downloaded is-terminal v0.4.5
  Downloaded bitvec v1.0.1
  Downloaded libc v0.2.140
  Downloaded termsize v0.1.6
  Downloaded crossbeam-epoch v0.9.14
  Downloaded crossbeam-deque v0.8.3
  Downloaded crossbeam-channel v0.5.7
  Downloaded either v1.8.1
  Downloaded generic-array v0.14.6
  Downloaded io-lifetimes v1.0.9
  Downloaded indexmap v1.9.3
  Downloaded rand_xorshift v0.1.1
  Downloaded rand_chacha v0.1.1
  Downloaded itertools v0.10.5
  Downloaded rustc-demangle v0.1.22
  Downloaded rayon v1.7.0
  Downloaded rayon-core v1.11.0
  Downloaded smallvec v1.10.0
  Downloaded toml_edit v0.19.8
  Downloaded textwrap v0.16.0
  Downloaded syn v1.0.109
  Downloaded static_assertions v1.1.0
  Downloaded tap v1.0.1
  Downloaded rand_isaac v0.1.1
  Downloaded sha3 v0.9.1
  Downloaded kind-tree v0.1.1
  Downloaded kind-target-kdl v0.1.1
  Downloaded kind-derive v0.1.1
  Downloaded kind-report v0.1.1
  Downloaded kind-target-hvm v0.1.1
  Downloaded kind-span v0.1.1
  Downloaded kind-parser v0.1.1
  Downloaded kind-query v0.1.1
  Downloaded kind-pass v0.1.1
  Downloaded kind-checker v0.1.1
  Downloaded highlight_error v0.1.1
  Downloaded kind-driver v0.1.1
  Downloaded HOPA v0.1.2
  Downloaded gimli v0.27.2
  Downloaded rustix v0.36.11
  Downloaded rand_hc v0.1.0
  Downloaded im-rc v15.1.0
  Downloaded byte-slice-cast v1.2.2
  Downloaded bitmaps v2.1.0
  Downloaded keccak v0.1.3
  Downloaded impl-trait-for-tuples v0.2.2
  Downloaded hashbrown v0.12.3
  Downloaded getrandom v0.2.8
  Downloaded crossbeam-queue v0.3.8
  Downloaded dashmap v5.4.0
  Downloaded crossbeam-utils v0.8.15
  Downloaded clap v4.1.13
  Downloaded core-foundation-sys v0.8.3
  Downloaded clap v3.2.23
  Downloaded kindelia_common v0.1.7
  Downloaded clap_derive v4.1.12
  Downloaded clap_derive v3.2.18
  Downloaded cc v1.0.79
  Downloaded byteorder v1.4.3
  Downloaded kindelia_lang v0.1.7
  Downloaded impl-codec v0.6.0
  Downloaded heck v0.4.1
  Downloaded digest v0.9.0
  Downloaded cfg-if v1.0.0
  Downloaded bitflags v1.3.2
  Downloaded object v0.30.3
  Downloaded anyhow v1.0.70
  Downloaded lock_api v0.4.9
  Downloaded backtrace v0.3.67
  Downloaded quote v1.0.26
  Downloaded uint v0.9.5
  Downloaded typenum v1.16.0
  Downloaded rand_chacha v0.3.1
  Downloaded rand_core v0.6.4
  Downloaded arrayvec v0.7.2
  Downloaded rand_os v0.1.3
  Downloaded rand v0.8.5
  Downloaded rand_pcg v0.1.2
  Downloaded proc-macro2 v1.0.54
  Downloaded proc-macro-error v1.0.4
  Downloaded thiserror v1.0.40
  Downloaded hvm v1.0.6
  Downloaded sized-chunks v0.6.5
  Downloaded os_str_bytes v6.5.0
  Downloaded memchr v2.5.0
  Downloaded serde_derive v1.0.158
  Downloaded rand_xoshiro v0.6.0
  Downloaded num_cpus v1.15.0
  Downloaded linked-hash-map v0.5.6
  Downloaded addr2line v0.19.0
  Downloaded block-padding v0.2.1
  Downloaded block-buffer v0.9.0
  Downloaded 142 crates (10.4 MB) in 2.58s (largest was `secp256k1-sys` at 2.5 MB)
   Compiling autocfg v1.1.0
   Compiling libc v0.2.140
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.54
   Compiling quote v1.0.26
   Compiling unicode-ident v1.0.8
   Compiling version_check v0.9.4
   Compiling syn v1.0.109
   Compiling crossbeam-utils v0.8.15
   Compiling cc v1.0.79
   Compiling scopeguard v1.1.0
   Compiling indexmap v1.9.3
   Compiling memoffset v0.8.0
   Compiling typenum v1.16.0
   Compiling crossbeam-epoch v0.9.14
   Compiling byteorder v1.4.3
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling crossbeam-channel v0.5.7
   Compiling getrandom v0.2.8
   Compiling rand_core v0.6.4
   Compiling autocfg v0.1.8
   Compiling memchr v2.5.0
   Compiling os_str_bytes v6.5.0
   Compiling heck v0.4.1
   Compiling crossbeam-deque v0.8.3
   Compiling bitflags v1.3.2
   Compiling rand_core v0.4.2
   Compiling rayon-core v1.11.0
   Compiling syn v2.0.10
   Compiling num_cpus v1.15.0
   Compiling atty v0.2.14
   Compiling core-foundation-sys v0.8.3
   Compiling either v1.8.1
   Compiling hashbrown v0.12.3
   Compiling crossbeam-queue v0.3.8
   Compiling once_cell v1.17.1
   Compiling backtrace v0.3.67
   Compiling termcolor v1.2.0
   Compiling strsim v0.10.0
   Compiling adler v1.0.2
   Compiling gimli v0.27.2
   Compiling miniz_oxide v0.6.2
   Compiling rayon v1.7.0
   Compiling object v0.30.3
   Compiling clap_lex v0.2.4
   Compiling rustc-demangle v0.1.22
   Compiling addr2line v0.19.0
   Compiling textwrap v0.16.0
   Compiling highlight_error v0.1.1
   Compiling clap_derive v3.2.18
   Compiling crossbeam v0.8.2
   Compiling itertools v0.10.5
   Compiling sysinfo v0.26.9
   Compiling HOPA v0.1.2
   Compiling rand_core v0.3.1
   Compiling fxhash v0.2.1
   Compiling instant v0.1.12
   Compiling serde_derive v1.0.158
   Compiling toml_datetime v0.6.1
   Compiling winnow v0.4.1
   Compiling kind-span v0.1.1
   Compiling termsize v0.1.6
   Compiling bitmaps v2.1.0
   Compiling im-rc v15.1.0
   Compiling generic-array v0.14.6
   Compiling clap v3.2.23
   Compiling linked-hash-map v0.5.6
   Compiling crunchy v0.2.2
   Compiling serde v1.0.158
   Compiling pathdiff v0.2.1
   Compiling unicode-width v0.1.10
   Compiling yansi v0.5.1
   Compiling toml_edit v0.19.8
   Compiling kind-report v0.1.1
   Compiling sized-chunks v0.6.5
   Compiling rand_xoshiro v0.6.0
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling proc-macro-crate v1.3.1
   Compiling ppv-lite86 v0.2.17
   Compiling rand_chacha v0.3.1
   Compiling impl-trait-for-tuples v0.2.2
   Compiling rand v0.6.5
   Compiling secp256k1-sys v0.5.2
   Compiling parity-scale-codec-derive v3.1.4
   Compiling byte-slice-cast v1.2.2
   Compiling arrayvec v0.7.2
   Compiling static_assertions v1.1.0
   Compiling rand v0.8.5
   Compiling rand_isaac v0.1.1
   Compiling rand_hc v0.1.0
   Compiling rand_xorshift v0.1.1
   Compiling rand_jitter v0.1.4
   Compiling rand_os v0.1.3
   Compiling tiny-keccak v2.0.2
   Compiling rustc-hex v2.1.0
   Compiling hex v0.4.3
   Compiling block-padding v0.2.1
   Compiling fixed-hash v0.7.0
   Compiling block-buffer v0.9.0
   Compiling uint v0.9.5
   Compiling digest v0.9.0
   Compiling io-lifetimes v1.0.9
   Compiling anyhow v1.0.70
   Compiling thiserror v1.0.40
   Compiling keccak v0.1.3
   Compiling opaque-debug v0.3.0
   Compiling sha3 v0.9.1
   Compiling parity-scale-codec v3.4.0
   Compiling thiserror-impl v1.0.40
   Compiling lock_api v0.4.9
   Compiling bit-vec v0.6.3
   Compiling rustix v0.36.11
   Compiling parking_lot_core v0.9.7
   Compiling impl-codec v0.6.0
   Compiling primitive-types v0.11.1
   Compiling errno v0.2.8
   Compiling smallvec v1.10.0
   Compiling clap_derive v4.1.12
   Compiling clap_lex v0.3.3
   Compiling secp256k1 v0.22.2
   Compiling dashmap v5.4.0
   Compiling is-terminal v0.4.5
   Compiling kindelia_common v0.1.7
   Compiling kindelia_lang v0.1.7
   Compiling hvm v1.0.6
   Compiling clap v4.1.13
error[E0554]: `#![feature]` may not be used on the stable release channel
 --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/lib.rs:1:12
  |
1 | #![feature(atomic_from_mut)]
  |            ^^^^^^^^^^^^^^^

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/memory.rs:450:54
    |
450 | ...get_unchecked(*lvar.next.as_ptr() as usize).load(Ordering::Relaxed);
    |                             ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/memory.rs:459:20
    |
459 |         *lvar.next.as_ptr() += 1;
    |                    ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/memory.rs:461:23
    |
461 |         if *lvar.next.as_ptr() >= *lvar.amax.as_ptr() {
    |                       ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/memory.rs:461:46
    |
461 |         if *lvar.next.as_ptr() >= *lvar.amax.as_ptr() {
    |                                              ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/memory.rs:463:22
    |
463 |           *lvar.next.as_ptr() = *lvar.amin.as_ptr();
    |                      ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/memory.rs:463:44
    |
463 |           *lvar.next.as_ptr() = *lvar.amin.as_ptr();
    |                                            ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/memory.rs:473:29
    |
473 |           return *lvar.next.as_ptr() - length;
    |                             ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for reference `&AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/program.rs:174:30
    |
174 | ...  *aloc.get_unchecked(i).as_ptr() = alloc(heap, tid, (*nodes.get_unc...
    |                             ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/program.rs:176:19
    |
176 |     if *lvar.dups.as_ptr() + dupk >= (1 << 28) {
    |                   ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/program.rs:177:18
    |
177 |       *lvar.dups.as_ptr() = 0;
    |                  ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for reference `&AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/program.rs:180:41
    |
180 |       let host = *aloc.get_unchecked(i).as_ptr() as usize;
    |                                         ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/program.rs:192:16
    |
192 |     *lvar.dups.as_ptr() += dupk;
    |                ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for reference `&AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/program.rs:158:69
    |
158 | ...nchecked(*targ as usize).as_ptr() + slot;
    |                             ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

error[E0599]: no method named `as_ptr` found for struct `AtomicU64` in the current scope
   --> /Users/aron/.cargo/registry/src/github.com-1ecc6299db9ec823/hvm-1.0.6/src/runtime/base/program.rs:161:32
    |
161 |             val += (*lvar.dups.as_ptr() & 0xFFF_FFFF) * EXT;
    |                                ^^^^^^ help: there is a method with a similar name: `as_mut_ptr`

Some errors have detailed explanations: E0554, E0599.
For more information about an error, try `rustc --explain E0554`.
error: could not compile `hvm` due to 15 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `kind2 v0.3.8`, intermediate artifacts can be found at `/var/folders/hy/kfymq1p11394336znbbw4zdh0000gn/T/cargo-install4j2XFv`
algebraic-dev commented 1 year ago

It's a problem with the command in the README. I'll update it... try with cargo +nightly install kind2 instead.

Arrow7000 commented 1 year ago

That worked! Thank you