Skip to content

Outdated installation instructions #101

@ongrid

Description

@ongrid

The current setup instructions provided in README.md are outdated and prevent from installing the correct versions of rustc, solana and anchor:

Issues:

  • Dead Solana installation endpoint: The installation snippet sh -c "$(curl -sSfL https://release.solana.com/v1.16.27/install)" no longer works as release.solana.com has an expired TLS certificate and is inaccessible.
  • Broken Anchor documentation link: The referenced URL https://book.anchor-lang.com/getting_started/installation.html returns a 404 error.
  • Version incompatibility: Following the current Anchor official installation docs results in installing incompatible versions of Rust, Solana, and Anchor, causing local builds to fail due to outdated crate dependencies.

The following snippet worked on Ubuntu 24.04 arch x86_64

# Install Rust and downgrade it to legacy 1.70.0
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
rustup install 1.70.0
rustup default 1.70.0
export PATH="${HOME}/.cargo/bin:${PATH}"

# Download precompiled solana-install 1.16.27 from the archived solana-labs repository binary artifacts
# Using binary since it's not buildable from source by neither 1.70.0 nor latest rustc 
mkdir -p ~/.local/bin
wget https://github.com/solana-labs/solana/releases/download/v1.16.27/solana-install-init-x86_64-unknown-linux-gnu -O ~/.local/bin/solana-install
chmod +x ~/.local/bin/solana-install
export PATH="${HOME}/.local/bin:${PATH}"
solana-install 1.16.27

# Build legacy Anchor version 0.29.0 by its git tag using cargo with custom toolchain version `1.83.0` instead of default `1.70.0`
cargo +1.83.0 install --git https://github.com/solana-foundation/anchor.git --tag v0.29.0 avm --force
avm install 0.29.0
avm use 0.29.0
export PATH="$HOME/.avm/bin:$PATH"

Expected result:

$ solana -V
solana-cli 1.16.27 (src:eb1dc08d; feat:2294205250, client:SolanaLabs)
$ rustc -V
rustc 1.70.0 (90c541806 2023-05-31)
$ avm -V
avm 0.29.0
$ anchor -V
anchor-cli 0.29.0

Now drift-vaults project is buildable

$ anchor test
...
Finished release [optimized] target(s) in 11m 03s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions