snarkOS: [Bug] compiling snarkvm-ledger-store fails with error snarkvm-ledger-store
π Bug Report
Executing ./build_ubuntu.sh fails with the following error. I did not find a similar report, so filing a new one
error[E0308]: mismatched types
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/snarkvm-ledger-store-0.16.11/src/helpers/rocksdb/internal/mod.rs:113:69
|
113 | let primary = aleo_std::aleo_ledger_dir(network_id, dev);
| ------------------------- ^^^ expected `StorageMode`, found `Option<u16>`
| |
| arguments to this function are incorrect
|
= note: expected enum `StorageMode`
found enum `std::option::Option<u16>`
note: function defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aleo-std-storage-0.1.7/src/lib.rs:89:8
|
89 | pub fn aleo_ledger_dir(network: u16, mode: StorageMode) -> PathBuf {
| ^^^^^^^^^^^^^^^
help: call `Into::into` on this expression to convert `std::option::Option<u16>` into `StorageMode`
|
113 | let primary = aleo_std::aleo_ledger_dir(network_id, dev.into());
| +++++++
Steps to Reproduce
git clone https://github.com/AleoHQ/snarkOS.git --depth 1 cd snarkOS ./build_ubuntu.sh
Expected Behavior
Compilation should work successfully
Your Environment
- v2.2.5
- rustc 1.75.0
- Ubuntu 22.04.3 LTS
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Reactions: 1
- Comments: 24 (7 by maintainers)
Executing ./build_ubuntu.sh after doing this fix fails with the following error:
Compiling aleo-std v0.1.18 error[E0432]: unresolved imports
aleo_std_storage::aleo_operator_dir
,aleo_st d_storage::aleo_prover_dir
β> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aleo-std-0.1.18 /src/lib.rs:21:55 | 21 | β¦_ledger_dir, aleo_operator_dir, aleo_prover_dir}; | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ | | | | | noaleo_prover_dir
in the root | | help: a similar name exists in the modul e:aleo_ledger_dir
| noaleo_operator_dir
in the rooterror[E0432]: unresolved imports
aleo_std_storage::aleo_operator_dir
,aleo_st d_storage::aleo_prover_dir
β> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/aleo-std-0.1.18 /src/lib.rs:28:59 | 28 | β¦_ledger_dir, aleo_operator_dir, aleo_prover_dir}; | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ | | | | | noaleo_prover_dir
in the root | | help: a similar name exists in the modul e:aleo_ledger_dir
| noaleo_operator_dir
in the root | = help: consider importing this unresolved item through its public re-export instead: crate::aleo_operator_dir = help: consider importing this unresolved item through its public re-export instead: crate::aleo_prover_dirFor more information about this error, try
rustc --explain E0432
. error: could not compilealeo-std
(lib) due to 2 previous errors warning: build failed, waiting for other jobs to finish⦠error: failed to compilesnarkos v2.2.7 (/root/snarkOS)
, intermediate artifact s can be found at/root/snarkOS/target
. To reuse those artifacts with a future compilation, set the environment variableCARGO_TARGET_DIR
to that path.The PR above updates the code to the API change, but @ljedrz change may be safer until @howardwu can look at the PR.
@osirisss11
git pull
@jhdi The warnings are not breakages, please understand the differences before filing a complaint.
@ljedrz can you evaluate each of the
remove
cases and decide whethershift
orswap
is necessary?