Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Build error v2.2.7 on WSL2 Ubuntu 22.04 LTS #3433

Open
AndreaLanfranchi opened this issue Nov 12, 2024 · 5 comments
Open

[Bug] Build error v2.2.7 on WSL2 Ubuntu 22.04 LTS #3433

AndreaLanfranchi opened this issue Nov 12, 2024 · 5 comments
Labels
bug Incorrect or unexpected behavior

Comments

@AndreaLanfranchi
Copy link

🐛 Bug Report

Build error while running ./build_ubuntu.sh

   Compiling snarkvm-ledger-store v0.16.15
error[E0308]: mismatched types
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/snarkvm-ledger-store-0.16.15/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());
    |                                                                        +++++++

For more information about this error, try `rustc --explain E0308`.
error: could not compile `snarkvm-ledger-store` (lib) due to 1 previous error
error: failed to compile `snarkos v2.2.7 (/home/andrea/snarkOS)`, intermediate artifacts can be found at `/home/andrea/snarkOS/target`

Steps to Reproduce

Follow build from source instructions using reported environment

Expected Behavior

Build should complete gracefully and artifacts generated

Your Environment

  • snarkOS tag/v2.2.7
  • Rust version 1.82.0
  • Ubuntu 22.04 LTS (on WSL2)
@AndreaLanfranchi AndreaLanfranchi added the bug Incorrect or unexpected behavior label Nov 12, 2024
@ljedrz
Copy link
Collaborator

ljedrz commented Nov 13, 2024

snarkOS tag/v2.2.7

That tag is almost 1 year old; I'd recommend using the current mainnet branch instead.

@zosorock we might want to push some newer tags to avoid confusion in the future.

@AndreaLanfranchi
Copy link
Author

AndreaLanfranchi commented Nov 13, 2024

Thank you for your response.
Seems like switching to mainnet branch allows a clean build.

Actually, as you mentioned, isn't probably better to state clearly that mainnet branch is current release ? (your latest release is tagged 2.2.7)

@ljedrz
Copy link
Collaborator

ljedrz commented Nov 13, 2024

It is stated in the readme:

Start by cloning this GitHub repository:
git clone --branch mainnet --single-branch https://github.com/AleoNet/snarkOS.git

@AndreaLanfranchi
Copy link
Author

I understand that but this, at least to me, sounds odd.
First thing I always look at and which I also find consistently in other projects is this

image

The instructions you linked do not state the difference amongst mainnet branch and a release.
A release is supposedly a stable version.

@ljedrz
Copy link
Collaborator

ljedrz commented Nov 13, 2024

Indeed, and that's why I tagged the applicable member so this can be adjusted 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect or unexpected behavior
Projects
None yet
Development

No branches or pull requests

2 participants