ubuntu 24.04 build from source install newest arbitrum chain nightly node

 

Title ubuntu 24.04 build from source install newest arbitrum chain nightly node


see: https://docs.arbitrum.io/run-arbitrum-node/nitro/build-nitro-locally


$ sudo apt install git curl build-essential cmake npm golang make python3 -y

$ sudo apt install clang gotestsum wabt lld-19 -y

$ npm install --global yarn

$ ln -s /usr/bin/wasm-ld-13 /usr/local/bin/wasm-ld


$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

$ nvm install 23

$ nvm use 23


$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

$ source "$HOME/.cargo/env"

$ rustup install 1.86.0

$ rustup default 1.86.0

$ rustup install nightly-2025-05-08

$ rustup target add wasm32-unknown-unknown --toolchain 1.86.0

$ rustup target add wasm32-wasi --toolchain 1.86.0

$ rustup target add wasm32-wasip1 --toolchain 1.86.0

$ rustup target add wasm32-unknown-unknown --toolchain nightly-2025-05-08

$ rustup target add wasm32-wasi --toolchain nightly-2025-05-08

$ rustup target add wasm32-wasip1 --toolchain nightly-2025-05-08

$ rustup component add rust-src --toolchain nightly-2025-05-08

$ cargo install cbindgen


$ sudo apt-get install bison


$ bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)

$ source "$HOME/.gvm/scripts/gvm"

$ gvm install go1.24

$ gvm use go1.24 --default

$ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2


$ curl -L https://foundry.paradigm.xyz | bash

$ source ~/.bashrc

$ foundryup


$ git clone --branch v3.6.2 --depth 1 https://github.com/OffchainLabs/nitro.git

$ cd nitro

$ git submodule update --init --recursive --force


$ ./scripts/check-build.sh

if had some red error(version different), skip them


if tip no install docker, change build options

$ vi Makefile

CBROTLI_WASM_BUILD_ARGS ?= # -d


$ apt-get install -y lld

$ rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu


$ vi util/log.go    // 48:5 if (*h.FirstOccurrence).Equal((time.Time{})) {

if (h.FirstOccurrence).Equal((time.Time{})) { 


$ vi .golangci.yml

linters-settings:

  staticcheck:

    checks:

      - "-ST1012" # disable error variable name check


$ make

$ make build


--------------------------------------------------------------------------------------

below is some build error, i had ask free deepseek ai to resolve them.


Q: some 


Q: emcc   is not a full path and was not found in the PATH.

A: # get emsdk

$ git clone https://github.com/emscripten-core/emsdk.git

$ cd emsdk

$ ./emsdk install latest

$ ./emsdk activate latest

$ source ./emsdk_env.sh


or add Emscripten to PATH

$ echo 'source "your path/emsdk/emsdk_env.sh"' >> ~/.bashrc

$ source ~/.bashrc


Q: ZOE ERROR (from forge): zoeParseOptions: unknown option (--version)

ZOE library version 2013-02-16

A:

$ rm -rf ~/.foundry /usr/bin/forge

$ rm -rf ~/.cargo/bin/forge ~/.cargo/bin/cast ~/.cargo/bin/anvil

$ curl -L https://foundry.paradigm.xyz | bash

$ source ~/.bashrc

$ foundryup


Q: make: golangci-lint: No such file or directory

A: $ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.1.6


Q: arbnode/blockmetadata.go:49:5: ST1012: error var wrongChainIdErr should have name of the form errFoo (staticcheck)

var wrongChainIdErr = errors.New("wrong chain id")

A: $ vi .golangci.yml

linters-settings:

  staticcheck:

    checks:

      - "-ST1012" # disable error variable name check


Q: go run ./linters ./...

golangci-lint run --fix

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/product/migration-guide for migration instructions

A: $ cp .golangci.yml .golangci.yml.bak

$ golangci-lint migrate --skip-validation


Q: go run ./linters ./...

golangci-lint run --fix

util/log.go:48:5: underef: could simplify (*h.FirstOccurrence).Equal to h.FirstOccurrence.Equal (gocritic)

        if (*h.FirstOccurrence).Equal((time.Time{})) {           ^

1 issues:

* gocritic: 1

make: *** [Makefile:571: .make/lint] Error 1

A: $ vi util/log.go

if (h.FirstOccurrence).Equal((time.Time{})) { 


Q: /bin/sh: 1: wasm-ld: not found

make: *** [Makefile:399: target/machines/latest/soft-float.wasm] Error 127

A: apt-get install -y lld


Q: error: "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/Cargo.lock" does not exist, unable to build with the standard library, try:

        rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu

make: *** [Makefile:461: arbitrator/stylus/tests/keccak/target/wasm32-unknown-unknown/release/keccak.wasm] Error 101

A: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu


Q: === FAIL: system_tests TestProgramCreate (unknown)

DONE 1029 tests, 8 skipped, 31 failures in 632.793s

make: *** [Makefile:583: .make/test-go] Error 1

A: not sure need fix them, i skip them

Comments

Popular posts from this blog

php openid test log

add login for owncloud with your system - developer

how vmware player run or develop with f-stack(dpdk)