erigontech / erigon

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io
GNU Lesser General Public License v3.0
3.09k stars 1.08k forks source link

`make erigon` fail (likely due to incorrect system requirements) #8505

Open bap2pecs opened 10 months ago

bap2pecs commented 10 months ago

System information

Erigon version: erigon version 2.52.5-7c5e4e77

OS & Version: Ubuntu

Commit hash: 7c5e4e770f122299c34a9309a37a33a146443da8

Erigon Command (with flags/config): make erigon

Consensus Layer:

Consensus Layer Command (with flags/config):

Chain/Network:

Expected behaviour

build erigon

Actual behaviour

$ make erigon
Building erigon
github.com/ledgerwatch/erigon-lib/sais: build constraints exclude all Go files in /home/ubuntu/erigon/erigon-lib/sais
github.com/erigontech/mdbx-go/mdbx: build constraints exclude all Go files in /home/ubuntu/go/pkg/mod/github.com/erigontech/mdbx-go@v0.27.17/mdbx
# github.com/anacrolix/go-libutp
../../../go/pkg/mod/github.com/anacrolix/go-libutp@v1.3.1/status.go:9:2: undefined: mu
../../../go/pkg/mod/github.com/anacrolix/go-libutp@v1.3.1/status.go:10:8: undefined: mu
../../../go/pkg/mod/github.com/anacrolix/go-libutp@v1.3.1/status.go:11:20: undefined: libContextToSocket
# github.com/ledgerwatch/erigon-lib/types
../../erigon-lib/types/txn.go:606:24: undefined: secp256k1.RecoverPubkeyWithContext
../../erigon-lib/types/txn.go:606:59: undefined: secp256k1.DefaultContext
# github.com/supranational/blst/bindings/go
../../../go/pkg/mod/github.com/supranational/blst@v0.3.11/bindings/go/rb_tree.go:130:18: undefined: Message
make: *** [Makefile:98: erigon.cmd] Error 1

$ clang -v
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Candidate multilib: .;@m64
Selected multilib: .;@m64

Steps to reproduce the behaviour

The system requirement section says "GCC 10+ or Clang". I only installed Clang and it gave this error. Then I tried to install GNC and the build succeed. I think the "or" here is misleading.

AskAlexSharov commented 10 months ago

try golang >= 1.20

bap2pecs commented 10 months ago

thanks @AskAlexSharov but I am using >= 1.20 version

$ go version
go version go1.21.3 linux/amd64
AskAlexSharov commented 10 months ago
go ​clean -modcache -chache
go build -v ./cmd/erigon
go env

# also just for test you can try
git checkout devel
go build ./cmd/erigon
dennis-tra commented 7 months ago

Same issue on my side. Fresh Ubuntu+Go 1.21.4 installation, v2.57.3 -> same error message as OP.

AskAlexSharov commented 7 months ago

go env

AskAlexSharov commented 7 months ago

what if you do: https://github.com/ledgerwatch/erigon/issues/8505#issuecomment-1769814910

gladcow commented 7 months ago

I've had the same issue on fresh Ubuntu, sudo apt-get install build-essential resolves the issue.