erigontech / erigon

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

Unable to build Erigon – package External/erigon/build/bin/erigon is not in GOROOT #5210

Closed Petter-s closed 2 years ago

Petter-s commented 2 years ago

Ubuntu 22.04.1 LST Erigon alpha branch

I am trying to build Erigon in Ubuntu. I have just installed GO 1.18.5. Following the getting started guide I have done these steps:

git clone https://github.com/ledgerwatch/erigon.git
cd erigon
git checkout alpha
make erigon

But when I try to make Erigon I get the following error:

Building erigon 
package External/erigon/build/bin/erigon is not in GOROOT (/usr/local/go/src/External/erigon/build/bin/erigon) 
make: *** [Makefile:91: erigon.cmd] Error 1

Do I need to add/change my GO installation somehow in order for it to make Erigon? This is my GO env:

GO111MODULE="off" 
GOARCH="amd64" 
GOBIN="" 
GOCACHE="/home/pett3r/.cache/go-build" 
GOENV="/home/pett3r/.config/go/env" 
GOEXE="" 
GOEXPERIMENT="" 
GOFLAGS="" 
GOHOSTARCH="amd64" 
GOHOSTOS="linux" 
GOINSECURE="" 
GOMODCACHE="/home/pett3r/go/pkg/mod" 
GONOPROXY="" 
GONOSUMDB="" 
GOOS="linux" 
GOPATH="/home/pett3r/go" 
GOPRIVATE="" 
GOPROXY="https://proxy.golang.org,direct" 
GOROOT="/snap/go/9952" 
GOSUMDB="sum.golang.org" 
GOTMPDIR="" 

Im not sure if this is an issue with Erigon or with my GO env.

AskAlexSharov commented 2 years ago
  1. try GOFLAGS="-v" make erigon
  2. try go build -v ./cmd/erigon
revitteth commented 2 years ago

@Petter-s - GO111MODULE="off" - worth setting this to auto/on?

Petter-s commented 2 years ago

I changed GO111MODULE to on like @revitteth suggested.

This is the output when I run GOFLAGS="-v" make erigon

Building erigon 
package External/erigon/build/bin/erigon is not in GOROOT (/usr/local/go/src/External/erigon/build/bin/erigon) 
make: *** [Makefile:91: erigon.cmd] Error 1

The go build -v ./cmd/erigon command however did not produce an error. It produced this output:

go: downloading github.com/urfave/cli v1.22.9 
go: downloading github.com/ledgerwatch/erigon-lib v0.0.0-20220825082934-55029084e0c7 
go: downloading github.com/ledgerwatch/log/v3 v3.4.1 
go: downloading github.com/pelletier/go-toml v1.9.5 
go: downloading github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b 
go: downloading github.com/spf13/pflag v1.0.5 
go: downloading github.com/spf13/cobra v1.5.0 
go: downloading github.com/gofrs/flock v0.8.1 
go: downloading github.com/rs/cors v1.8.2 
go: downloading golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e 
go: downloading golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d 
go: downloading github.com/VictoriaMetrics/metrics v1.22.2 
go: downloading golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f 
go: downloading github.com/ledgerwatch/secp256k1 v1.0.0 
go: downloading github.com/ugorji/go/codec v1.1.13 
go: downloading github.com/valyala/fastjson v1.6.3 
go: downloading go.uber.org/atomic v1.10.0 
go: downloading golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 
go: downloading github.com/anacrolix/go-libutp v1.2.0 
go: downloading github.com/anacrolix/log v0.13.2-0.20220427063716-a4894bb521c6 
go: downloading github.com/anacrolix/torrent v1.46.1-0.20220808053819-61302332cfc5 
go: downloading golang.org/x/time v0.0.0-20220609170525-579cf78fd858 
go: downloading github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea 
go: downloading github.com/edsrzf/mmap-go v1.1.0 
go: downloading github.com/goccy/go-json v0.9.7 
go: downloading github.com/torquem-ch/mdbx-go v0.25.2 
go: downloading github.com/pion/stun v0.3.5 
go: downloading github.com/mattn/go-colorable v0.1.11 
go: downloading github.com/mattn/go-isatty v0.0.14 
go: downloading github.com/golang-jwt/jwt/v4 v4.4.1 
go: downloading github.com/gorilla/websocket v1.5.0 
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2 
go: downloading github.com/RoaringBitmap/roaring v1.2.1 
go: downloading github.com/google/btree v1.1.2 
go: downloading github.com/flanglet/kanzi-go v1.9.1-0.20211212184056-72dda96261ee 
go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 
go: downloading github.com/emirpasic/gods v1.18.1 
go: downloading golang.org/x/net v0.0.0-20220630215102-69896b714898 
go: downloading github.com/spaolacci/murmur3 v1.1.0 
go: downloading github.com/ledgerwatch/erigon-snapshot v1.0.1-0.20220809023834-6309df4da4b1 
go: downloading github.com/pelletier/go-toml/v2 v2.0.3 
go: downloading github.com/VictoriaMetrics/fastcache v1.10.0 
go: downloading github.com/stretchr/testify v1.8.0 
go: downloading github.com/emicklei/dot v1.0.0 
go: downloading github.com/valyala/histogram v1.2.0 
go: downloading google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 
go: downloading github.com/anacrolix/missinggo v1.3.0 
go: downloading github.com/anacrolix/mmsg v1.0.0 
go: downloading github.com/anacrolix/sync v0.4.0 
go: downloading github.com/russross/blackfriday/v2 v2.1.0 
go: downloading github.com/anacrolix/chansync v0.3.0 
go: downloading github.com/anacrolix/dht/v2 v2.18.0 
go: downloading github.com/anacrolix/generics v0.0.0-20220618083756-f99e35403a60 
go: downloading github.com/anacrolix/missinggo/perf v1.0.0 
go: downloading github.com/anacrolix/missinggo/v2 v2.7.0 
go: downloading github.com/anacrolix/multiless v0.3.0 
go: downloading github.com/anacrolix/upnp v0.1.3-0.20220123035249-922794e51c96 
go: downloading github.com/bahlo/generic-list-go v0.2.0 
go: downloading github.com/dustin/go-humanize v1.0.0 
go: downloading github.com/lispad/go-generics-tools v1.1.0 
go: downloading github.com/pion/datachannel v1.5.2 
go: downloading github.com/pion/webrtc/v3 v3.1.42 
go: downloading crawshaw.io/sqlite v0.3.3-0.20210127221821-98b1f83c5508 
go: downloading go.etcd.io/bbolt v1.3.6 
go: downloading github.com/ledgerwatch/trackerslist v1.0.0 
go: downloading github.com/tendermint/go-amino v0.14.1 
go: downloading github.com/tendermint/tendermint v0.31.11 
go: downloading github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48 
go: downloading github.com/valyala/fastrand v1.1.0 
go: downloading gopkg.in/yaml.v3 v3.0.1 
go: downloading github.com/huandu/xstrings v1.3.2 
go: downloading github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 
go: downloading github.com/anacrolix/envpprof v1.2.1 
go: downloading github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 
go: downloading github.com/tidwall/btree v1.3.1 
go: downloading github.com/pion/logging v0.2.2 
go: downloading github.com/rs/dnscache v0.0.0-20211102005908-e0241e321417 
go: downloading github.com/pion/sctp v1.8.2 
go: downloading github.com/pion/dtls/v2 v2.1.5 
go: downloading github.com/pion/ice/v2 v2.2.6 
go: downloading github.com/pion/interceptor v0.1.11 
go: downloading github.com/pion/randutil v0.1.0 
go: downloading github.com/pion/rtcp v1.2.9 
go: downloading github.com/pion/rtp v1.7.13 
go: downloading github.com/pion/sdp/v3 v3.0.5 
go: downloading github.com/pion/srtp/v2 v2.0.9 
go: downloading github.com/pion/transport v0.13.1 
go: downloading github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 
go: downloading github.com/benbjohnson/immutable v0.3.0 
go: downloading github.com/gogo/protobuf v1.3.2 
go: downloading github.com/pion/udp v0.1.1 
go: downloading github.com/google/uuid v1.3.0 
go: downloading github.com/pion/mdns v0.0.5 
go: downloading github.com/pion/turn/v2 v2.0.8 
go: downloading github.com/go-sourcemap/sourcemap v2.1.3+incompatible 
go: downloading github.com/anacrolix/stm v0.4.0 
go: downloading github.com/alecthomas/atomic v0.1.0-alpha2 
golang.org/x/exp/constraints 
golang.org/x/sys/internal/unsafeheader 
github.com/torquem-ch/mdbx-go/mdbx/mdbxarch 
github.com/ledgerwatch/erigon-lib/common/fixedgas 
github.com/ledgerwatch/erigon-lib/common/length 
github.com/bradfitz/iter 
github.com/anacrolix/chansync/events 
github.com/anacrolix/multiless 
github.com/pion/dtls/v2/internal/ciphersuite/types 
github.com/pion/dtls/v2/pkg/crypto/clientcertificate 
github.com/pion/dtls/v2/pkg/crypto/signature 
golang.org/x/crypto/cryptobyte/asn1 
golang.org/x/net/internal/iana 
github.com/bahlo/generic-list-go 
github.com/alecthomas/atomic 
github.com/ledgerwatch/erigon-lib/common/cmp 
github.com/anacrolix/generics 
golang.org/x/exp/slices 
github.com/ledgerwatch/erigon-lib/common/bitutil 
github.com/ledgerwatch/erigon/params/networkname 
github.com/tendermint/tendermint/version 
github.com/lispad/go-generics-tools/binheap 
github.com/pion/rtp/pkg/obu 
github.com/flanglet/kanzi-go/util 
golang.org/x/net/dns/dnsmessage 
github.com/ledgerwatch/erigon/common/bitutil 
github.com/anacrolix/missinggo/v2/pubsub 
github.com/anacrolix/torrent/internal/limiter 
github.com/anacrolix/torrent/segments 
github.com/anacrolix/torrent/smartban 
github.com/tidwall/btree 
github.com/huandu/xstrings 
github.com/valyala/fastrand 
golang.org/x/crypto/sha3 
golang.org/x/sync/semaphore 
github.com/RoaringBitmap/roaring/internal 
github.com/anacrolix/missinggo/slices 
golang.org/x/sys/unix 
github.com/anacrolix/missinggo/mime 
github.com/c2h5oh/datasize 
github.com/ledgerwatch/erigon-lib/common/dbg 
github.com/valyala/histogram 
go.uber.org/atomic 
github.com/google/btree 
golang.org/x/net/internal/timeseries 
github.com/torquem-ch/mdbx-go/mdbx 
golang.org/x/net/http2/hpack 
github.com/ledgerwatch/erigon-lib/common/u256 
golang.org/x/net/idna 
github.com/ledgerwatch/erigon-lib/gointerfaces/types 
github.com/VictoriaMetrics/metrics 
google.golang.org/genproto/googleapis/rpc/status 
github.com/ledgerwatch/erigon-lib/rlp 
github.com/ledgerwatch/secp256k1 
github.com/anacrolix/log 
golang.org/x/net/trace 
github.com/anacrolix/missinggo/v2 
github.com/anacrolix/missinggo/expect 
google.golang.org/grpc/internal/status 
github.com/anacrolix/mmsg/socket 
github.com/RoaringBitmap/roaring 
github.com/ledgerwatch/erigon-lib/gointerfaces 
github.com/anacrolix/dht/v2/int160 
github.com/benbjohnson/immutable 
github.com/anacrolix/stm 
google.golang.org/grpc/status 
github.com/anacrolix/torrent/logonce 
golang.org/x/sync/singleflight 
golang.org/x/time/rate 
github.com/anacrolix/missinggo/v2/pproffd 
github.com/anacrolix/mmsg 
github.com/anacrolix/envpprof 
google.golang.org/grpc/internal/binarylog 
github.com/ajwerner/btree/internal/abstract 
github.com/rs/dnscache 
crawshaw.io/sqlite 
github.com/anacrolix/missinggo/v2/resource 
github.com/anacrolix/torrent/version 
github.com/gorilla/websocket 
github.com/pion/logging 
github.com/pion/randutil 
github.com/anacrolix/missinggo 
github.com/anacrolix/missinggo/v2/iter 
github.com/pion/dtls/v2/internal/util 
golang.org/x/net/http/httpguts 
github.com/ajwerner/btree 
github.com/pion/dtls/v2/pkg/crypto/ccm 
golang.org/x/crypto/curve25519/internal/field 
github.com/pion/sctp 
github.com/pion/dtls/v2/pkg/protocol 
github.com/pion/dtls/v2/pkg/crypto/hash 
golang.org/x/crypto/cryptobyte 
github.com/anacrolix/stm/stmutil 
github.com/pion/dtls/v2/internal/closer 
golang.org/x/net/http2 
github.com/pion/dtls/v2/pkg/protocol/alert 
github.com/pion/dtls/v2/pkg/crypto/signaturehash 
github.com/pion/transport/connctx 
github.com/pion/transport/deadline 
github.com/pion/transport/replaydetector 
golang.org/x/crypto/curve25519 
github.com/pion/dtls/v2/pkg/crypto/fingerprint 
github.com/pion/transport/packetio 
github.com/anacrolix/missinggo/inproc 
github.com/anacrolix/missinggo/perf 
github.com/anacrolix/torrent/bencode 
github.com/anacrolix/missinggo/iter 
github.com/anacrolix/missinggo/httptoo 
github.com/pion/dtls/v2/pkg/crypto/elliptic 
github.com/pion/udp 
github.com/google/uuid 
golang.org/x/net/bpf 
github.com/pion/stun/internal/hmac 
github.com/mattn/go-isatty 
google.golang.org/grpc/internal/channelz 
google.golang.org/grpc/internal/syscall 
github.com/anacrolix/sync 
github.com/edsrzf/mmap-go 
github.com/anacrolix/torrent/mse 
github.com/mattn/go-colorable 
go.etcd.io/bbolt 
github.com/anacrolix/torrent/iplist 
github.com/anacrolix/go-libutp 
github.com/anacrolix/chansync 
github.com/anacrolix/torrent/mmap_span 
github.com/pion/dtls/v2/pkg/crypto/prf 
github.com/ledgerwatch/log/v3 
github.com/anacrolix/torrent/metainfo 
github.com/pion/dtls/v2/pkg/protocol/extension 
github.com/pion/stun 
golang.org/x/net/internal/socket 
github.com/pion/transport/vnet 
github.com/pion/turn/v2/internal/ipnet 
google.golang.org/grpc/channelz 
golang.org/x/net/internal/socks 
github.com/RoaringBitmap/roaring/BitSliceIndexing 
google.golang.org/grpc/balancer 
github.com/anacrolix/missinggo/v2/bitmap 
github.com/anacrolix/dht/v2/krpc 
github.com/ledgerwatch/erigon-lib/common 
github.com/anacrolix/torrent/common 
github.com/anacrolix/torrent/internal/testutil 
github.com/anacrolix/torrent/typed-roaring 
github.com/anacrolix/torrent/webseed 
github.com/pion/datachannel 
github.com/pion/dtls/v2/pkg/protocol/handshake 
golang.org/x/net/ipv4 
golang.org/x/net/proxy 
github.com/pion/rtcp 
github.com/pion/rtp 
github.com/pion/turn/v2/internal/proto 
github.com/pion/rtp/codecs 
github.com/pion/sdp/v3 
github.com/anacrolix/dht/v2/bep44 
github.com/anacrolix/dht/v2/k-nearest-nodes 
github.com/anacrolix/dht/v2/peer-store 
github.com/anacrolix/dht/v2/types 
github.com/anacrolix/torrent/peer_protocol 
github.com/anacrolix/torrent/tracker/udp 
github.com/pion/dtls/v2/pkg/protocol/recordlayer 
github.com/anacrolix/dht/v2/containers 
github.com/pion/webrtc/v3/internal/fmtp 
github.com/pion/turn/v2/internal/allocation 
github.com/pion/turn/v2/internal/client 
google.golang.org/grpc/internal/transport 
github.com/pion/webrtc/v3/internal/util 
github.com/pion/dtls/v2/pkg/crypto/ciphersuite 
github.com/anacrolix/dht/v2/traversal 
github.com/pion/webrtc/v3/pkg/media 
github.com/anacrolix/torrent/tracker/shared 
github.com/anacrolix/torrent/types 
github.com/pion/turn/v2/internal/server 
github.com/pion/webrtc/v3/pkg/rtcerr 
github.com/anacrolix/torrent/request-strategy 
github.com/pion/mdns 
github.com/anacrolix/torrent/tracker/http 
github.com/anacrolix/upnp 
github.com/dustin/go-humanize 
golang.org/x/sync/errgroup 
github.com/anacrolix/dht/v2 
github.com/pion/dtls/v2/internal/ciphersuite 
github.com/ledgerwatch/erigon/common/debug 
github.com/pion/interceptor 
github.com/pion/srtp/v2 
github.com/huin/goupnp/httpu 
github.com/pion/interceptor/pkg/nack 
github.com/pion/turn/v2 
github.com/pion/interceptor/pkg/report 
github.com/pion/interceptor/pkg/twcc 
github.com/anacrolix/torrent/tracker 
github.com/huin/goupnp/ssdp 
github.com/pion/dtls/v2 
github.com/ledgerwatch/erigon/common/hexutil 
github.com/ledgerwatch/erigon/common/math 
github.com/ledgerwatch/erigon/common/paths 
github.com/deckarep/golang-set 
github.com/goccy/go-json/internal/errors 
github.com/goccy/go-json/internal/runtime 
github.com/ledgerwatch/erigon/common/u256 
github.com/RoaringBitmap/roaring/roaring64 
github.com/ledgerwatch/erigon/common 
github.com/VictoriaMetrics/fastcache 
github.com/gofrs/flock 
github.com/huin/goupnp 
github.com/flanglet/kanzi-go 
github.com/ledgerwatch/erigon-lib/mmap 
github.com/goccy/go-json/internal/decoder 
github.com/goccy/go-json/internal/encoder 
github.com/ledgerwatch/erigon-lib/common/dir 
github.com/flanglet/kanzi-go/bitstream 
github.com/ledgerwatch/erigon/p2p/nat 
github.com/flanglet/kanzi-go/entropy 
github.com/ledgerwatch/erigon-lib/sais 
github.com/ledgerwatch/erigon-lib/recsplit/eliasfano16 
github.com/ledgerwatch/erigon-lib/recsplit/eliasfano32 
github.com/spaolacci/murmur3 
github.com/ledgerwatch/erigon/visual 
github.com/ledgerwatch/erigon/rlp 
github.com/ledgerwatch/erigon/turbo/rlphacks 
github.com/ledgerwatch/erigon/common/dbutils 
github.com/valyala/fastjson/fastfloat 
github.com/ugorji/go/codec 
google.golang.org/grpc 
github.com/pion/ice/v2 
github.com/golang-jwt/jwt/v4 
github.com/flanglet/kanzi-go/transform 
github.com/ledgerwatch/erigon/common/mclock 
github.com/valyala/fastjson 
github.com/ledgerwatch/erigon/metrics 
github.com/ledgerwatch/erigon/p2p/netutil 
github.com/emicklei/dot 
github.com/tendermint/go-amino 
github.com/gogo/protobuf/proto 
github.com/tendermint/tendermint/crypto/tmhash 
github.com/ledgerwatch/erigon/rpc 
golang.org/x/crypto/ed25519 
github.com/tendermint/tendermint/libs/log 
github.com/goccy/go-json/internal/encoder/vm_color_indent 
github.com/tendermint/tendermint/crypto/multisig/bitarray 
golang.org/x/crypto/ripemd160 
github.com/gogo/protobuf/sortkeys 
golang.org/x/net/context 
github.com/tendermint/tendermint/libs/pubsub/query 
github.com/tendermint/tendermint/types/time 
github.com/ledgerwatch/erigon/core/vm/stack 
golang.org/x/sys/cpu 
github.com/ledgerwatch/erigon/crypto/bls12381 
github.com/ledgerwatch/erigon/node/nodecfg/datadir 
github.com/ledgerwatch/erigon/crypto/blake2b 
github.com/ledgerwatch/erigon/crypto/bn256/cloudflare 
github.com/ledgerwatch/erigon/p2p/enr 
github.com/ledgerwatch/erigon-lib/gointerfaces/remote 
github.com/grpc-ecosystem/go-grpc-middleware 
github.com/grpc-ecosystem/go-grpc-middleware/recovery 
github.com/ledgerwatch/erigon-lib/gointerfaces/downloader 
github.com/ledgerwatch/erigon-lib/gointerfaces/sentry 
github.com/ledgerwatch/erigon-lib/gointerfaces/txpool 
google.golang.org/grpc/reflection/grpc_reflection_v1alpha 
google.golang.org/grpc/health/grpc_health_v1 
github.com/pion/webrtc/v3/internal/mux 
github.com/ledgerwatch/erigon-lib/patricia 
github.com/pion/webrtc/v3 
github.com/ledgerwatch/erigon/crypto/bn256 
github.com/ledgerwatch/erigon/common/fdlimit 
google.golang.org/grpc/health 
github.com/ledgerwatch/erigon/metrics/exp 
github.com/spf13/pflag 
github.com/ledgerwatch/erigon-lib/common/background 
github.com/russross/blackfriday/v2 
google.golang.org/grpc/reflection 
github.com/ledgerwatch/erigon/cmd/downloader/downloadergrpc 
github.com/ledgerwatch/erigon-snapshot 
github.com/pelletier/go-toml/v2/internal/danger 
github.com/emirpasic/gods/utils 
gopkg.in/yaml.v3 
github.com/pelletier/go-toml/v2/internal/ast 
github.com/ledgerwatch/erigon-lib/direct 
github.com/ledgerwatch/erigon/rpc/rpccfg 
github.com/emirpasic/gods/containers 
github.com/ledgerwatch/erigon-lib/gointerfaces/grpcutil 
github.com/pelletier/go-toml/v2/internal/tracker 
github.com/ledgerwatch/erigon/event 
github.com/emirpasic/gods/maps 
github.com/pelletier/go-toml/v2 
github.com/emirpasic/gods/trees 
golang.org/x/crypto/hkdf 
github.com/emirpasic/gods/trees/redblacktree 
github.com/rs/cors 
github.com/ledgerwatch/trackerslist 
github.com/ledgerwatch/erigon/cmd/downloader/trackers 
github.com/emirpasic/gods/maps/treemap 
github.com/ledgerwatch/erigon-lib/gointerfaces/starknet 
github.com/ledgerwatch/erigon/cmd/rpcdaemon/health 
github.com/spf13/cobra 
github.com/cpuguy83/go-md2man/v2/md2man 
github.com/dlclark/regexp2/syntax 
github.com/go-sourcemap/sourcemap/internal/base64vlq 
github.com/dop251/goja/token 
github.com/dop251/goja/unistring 
github.com/go-sourcemap/sourcemap 
github.com/urfave/cli 
github.com/gogo/protobuf/protoc-gen-gogo/descriptor 
github.com/gogo/protobuf/types 
github.com/dop251/goja/ftoa/internal/fast 
github.com/dop251/goja/file 
github.com/dop251/goja/ftoa 
github.com/dop251/goja/ast 
github.com/ledgerwatch/erigon/turbo/snapshotsync/snapcfg 
golang.org/x/text/internal/tag 
github.com/anacrolix/torrent/webtorrent 
github.com/stretchr/testify/assert 
github.com/ledgerwatch/erigon/eth/tracers/internal/tracers 
google.golang.org/protobuf/types/known/wrapperspb 
github.com/dop251/goja/parser 
golang.org/x/text/internal/language 
github.com/ledgerwatch/erigon/ethdb/cbor 
github.com/ledgerwatch/erigon/consensus/aura/aurainterfaces 
github.com/ledgerwatch/erigon/consensus/aura/contracts 
github.com/gogo/protobuf/gogoproto 
github.com/pelletier/go-toml 
github.com/dlclark/regexp2 
github.com/ledgerwatch/erigon/consensus/aura/consensusconfig 
github.com/ledgerwatch/erigon/internal/debug 
github.com/tendermint/tendermint/libs/common 
golang.org/x/text/internal/language/compact 
golang.org/x/text/language 
golang.org/x/text/internal 
golang.org/x/text/internal/colltab 
github.com/tendermint/tendermint/lite/errors 
github.com/tendermint/tendermint/crypto 
github.com/tendermint/tendermint/libs/pubsub 
github.com/tendermint/tendermint/crypto/merkle 
golang.org/x/text/cases 
github.com/tendermint/tendermint/crypto/ed25519 
github.com/tendermint/tendermint/crypto/secp256k1 
github.com/gogo/protobuf/jsonpb 
github.com/tendermint/tendermint/crypto/multisig 
golang.org/x/text/collate 
github.com/tendermint/tendermint/crypto/encoding/amino 
github.com/ledgerwatch/erigon/core/vm/lightclient/iavl 
github.com/tendermint/tendermint/abci/types 
github.com/goccy/go-json/internal/encoder/vm_color 
github.com/tendermint/tendermint/types 
github.com/ledgerwatch/erigon/core/vm/lightclient 
github.com/dop251/goja 
github.com/goccy/go-json/internal/encoder/vm_indent 
github.com/ledgerwatch/erigon-lib/types 
github.com/ledgerwatch/erigon/crypto 
github.com/ledgerwatch/erigon/core/types/accounts 
github.com/ledgerwatch/erigon/p2p/discover/v4wire 
github.com/ledgerwatch/erigon/crypto/ecies 
github.com/ledgerwatch/erigon/accounts/abi 
github.com/ledgerwatch/erigon/p2p/rlpx 
github.com/goccy/go-json/internal/encoder/vm 
github.com/ledgerwatch/erigon-lib/kv 
github.com/ledgerwatch/erigon-lib/kv/kvcache 
github.com/ledgerwatch/erigon-lib/chain 
github.com/ledgerwatch/erigon-lib/kv/mdbx 
github.com/ledgerwatch/erigon-lib/etl 
github.com/ledgerwatch/erigon-lib/kv/remotedbserver 
github.com/ledgerwatch/erigon/ethdb 
github.com/ledgerwatch/erigon/eth/stagedsync/stages 
github.com/ledgerwatch/erigon/params 
github.com/ledgerwatch/erigon/ethdb/bitmapdb 
github.com/ledgerwatch/erigon/turbo/trie 
github.com/ledgerwatch/erigon-lib/recsplit 
github.com/ledgerwatch/erigon-lib/compress 
github.com/ledgerwatch/erigon/common/changeset 
github.com/ledgerwatch/erigon/ethdb/olddb 
github.com/ledgerwatch/erigon/internal/flags 
github.com/ledgerwatch/erigon/core/forkid 
github.com/ledgerwatch/erigon/ethdb/prune 
github.com/ledgerwatch/erigon/turbo/shards 
github.com/ledgerwatch/erigon-lib/kv/remotedb 
github.com/ledgerwatch/erigon-lib/kv/memdb 
github.com/ledgerwatch/erigon-lib/txpool 
github.com/ledgerwatch/erigon/consensus/db 
github.com/ledgerwatch/erigon/p2p/enode 
github.com/ledgerwatch/erigon-lib/state 
github.com/ledgerwatch/erigon/p2p/dnsdisc 
github.com/ledgerwatch/erigon/p2p/discover/v5wire 
github.com/ledgerwatch/erigon/p2p/discover 
github.com/ledgerwatch/erigon-lib/txpool/txpooluitl 
github.com/ledgerwatch/erigon/core/types 
github.com/ledgerwatch/erigon/p2p 
github.com/ledgerwatch/erigon/turbo/services 
github.com/ledgerwatch/erigon 
github.com/ledgerwatch/erigon/core/bloombits 
github.com/ledgerwatch/erigon/core/state 
github.com/ledgerwatch/erigon/accounts/abi/bind 
github.com/ledgerwatch/erigon/core/rawdb 
github.com/ledgerwatch/erigon/consensus/aura/auraabi 
github.com/ledgerwatch/erigon/cmd/hack/tool 
github.com/ledgerwatch/erigon/turbo/engineapi 
github.com/ledgerwatch/erigon/eth/protocols/eth 
github.com/ledgerwatch/erigon/turbo/adapter 
github.com/ledgerwatch/erigon/consensus 
github.com/ledgerwatch/erigon/consensus/misc 
github.com/ledgerwatch/erigon/core/systemcontracts 
github.com/ledgerwatch/erigon/core/vm 
github.com/ledgerwatch/erigon/eth/gasprice 
github.com/ledgerwatch/erigon/eth/ethutils 
github.com/ledgerwatch/erigon/consensus/serenity 
github.com/ledgerwatch/erigon/turbo/stages/bodydownload 
github.com/ledgerwatch/erigon/turbo/stages/headerdownload 
github.com/goccy/go-json 
github.com/ledgerwatch/erigon/consensus/clique 
github.com/ledgerwatch/erigon/consensus/ethash 
github.com/ledgerwatch/erigon/consensus/aura 
github.com/ledgerwatch/erigon/eth/calltracer 
github.com/ledgerwatch/erigon/eth/tracers/logger 
github.com/ledgerwatch/erigon/core 
github.com/ledgerwatch/erigon/turbo/builder 
github.com/ledgerwatch/erigon/internal/ethapi 
github.com/ledgerwatch/erigon/eth/filters 
github.com/ledgerwatch/erigon/consensus/bor 
github.com/ledgerwatch/erigon/ethdb/privateapi 
github.com/ledgerwatch/erigon/turbo/rpchelper 
github.com/ledgerwatch/erigon/turbo/adapter/ethapi 
github.com/ledgerwatch/erigon/eth/tracers 
github.com/ledgerwatch/erigon/cmd/rpcdaemon/rpcservices 
github.com/ledgerwatch/erigon/turbo/transactions 
# crawshaw.io/sqlite 
In file included from /usr/include/string.h:535, 
                from /home/pett3r/go/pkg/mod/crawshaw.io/sqlite@v0.3.3-0.20210127221821-98b1f83c5508/./c/sqlite3.c:14113, 
                from /home/pett3r/go/pkg/mod/crawshaw.io/sqlite@v0.3.3-0.20210127221821-98b1f83c5508/static.go:19: 
In function ‘memcpy’, 
   inlined from ‘sqlite3Fts5IndexQuery’ at /home/pett3r/go/pkg/mod/crawshaw.io/sqlite@v0.3.3-0.20210127221821-98b1f83c5508/./c/sqlite3.c:220863:18: 
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:10: warning: ‘__builtin_memcpy’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-ove
rflow=] 
  29 |   return __builtin___memcpy_chk (__dest, __src, __len, 
     |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  30 |                                  __glibc_objsize0 (__dest)); 
     |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~ 
crawshaw.io/sqlite/sqlitex 
github.com/anacrolix/torrent/storage 
github.com/anacrolix/torrent 
github.com/ledgerwatch/erigon/cmd/downloader/downloader/downloadercfg 
github.com/ledgerwatch/erigon/eth/ethconfig 
github.com/ledgerwatch/erigon/cmd/rpcdaemon/cli/httpcfg 
github.com/ledgerwatch/erigon/turbo/snapshotsync/snap 
github.com/ledgerwatch/erigon/node/nodecfg 
github.com/ledgerwatch/erigon/cmd/downloader/downloader 
github.com/ledgerwatch/erigon/turbo/snapshotsync 
github.com/ledgerwatch/erigon/cmd/state/exec22 
github.com/ledgerwatch/erigon/consensus/parlia 
github.com/ledgerwatch/erigon/eth/ethconsensusconfig 
github.com/ledgerwatch/erigon/eth/stagedsync 
github.com/ledgerwatch/erigon/cmd/rpcdaemon/commands 
github.com/ledgerwatch/erigon/core/rawdb/rawdbreset 
github.com/ledgerwatch/erigon/migrations 
github.com/ledgerwatch/erigon/node 
github.com/ledgerwatch/erigon/cmd/utils 
github.com/ledgerwatch/erigon/cmd/rpcdaemon/cli 
github.com/ledgerwatch/erigon/turbo/cli 
github.com/ledgerwatch/erigon/cmd/sentry/sentry 
github.com/ledgerwatch/erigon/ethstats 
github.com/ledgerwatch/erigon/turbo/stages 
github.com/ledgerwatch/erigon/eth 
github.com/ledgerwatch/erigon/turbo/node 
github.com/ledgerwatch/erigon/turbo/app 
github.com/ledgerwatch/erigon/cmd/erigon

But I'm not sure how this helps me, I still don’t have any ./build/bin/erigon executable that I can run as far as I can tell.

I also tried to reinstall and update GO to version 1.19 to see if that would help (it didn't), Here is my new GO env:

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/pett3r/.cache/go-build"
GOENV="/home/pett3r/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/pett3r/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/pett3r/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/media/pett3r/M.2 External/erigon/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1018314397=/tmp/go-build -gno-record-gcc-switches"
AskAlexSharov commented 2 years ago

go build -o ./build/bin/erigon ./cmd/erigon

Petter-s commented 2 years ago

go build -o ./build/bin/erigon ./cmd/erigon

That worked, thank you very much!

shep-analytics commented 1 year ago

I am experiencing the same problem and none of the above solutions work for me -

I freshly installed ubuntu 22 server, installed go with sudo snap install go --classic

then

git clone --branch stable --single-branch https://github.com/ledgerwatch/erigon.git
cd erigon
make erigon
./build/bin/erigon

trying go build -v ./cmd/erigon results in

github.com/ledgerwatch/erigon-lib/sais github.com/ledgerwatch/erigon-lib/sais: build constraints exclude all Go files in /home/teancum/go/pkg/mod/github.com/ledgerwatch/erigon-lib@v0.0.0-20230405025700-b2bfe9a2ca46/sais github.com/torquem-ch/mdbx-go/mdbx github.com/torquem-ch/mdbx-go/mdbx: build constraints exclude all Go files in /home/teancum/go/pkg/mod/github.com/torquem-ch/mdbx-go@v0.27.10/mdbx github.com/supranational/blst/bindings/go # github.com/supranational/blst/bindings/go /home/teancum/go/pkg/mod/github.com/supranational/blst@v0.3.10/bindings/go/rb_tree.go:130:18: undefined: Message github.com/ledgerwatch/erigon-lib/types github.com/anacrolix/go-libutp # github.com/anacrolix/go-libutp /home/teancum/go/pkg/mod/github.com/anacrolix/go-libutp@v1.2.0/status.go:9:2: undefined: mu /home/teancum/go/pkg/mod/github.com/anacrolix/go-libutp@v1.2.0/status.go:10:8: undefined: mu /home/teancum/go/pkg/mod/github.com/anacrolix/go-libutp@v1.2.0/status.go:11:20: undefined: libContextToSocket # github.com/ledgerwatch/erigon-lib/types /home/teancum/go/pkg/mod/github.com/ledgerwatch/erigon-lib@v0.0.0-20230405025700-b2bfe9a2ca46/types/txn.go:450:24: undefined: secp256k1.RecoverPubkeyWithContext /home/teancum/go/pkg/mod/github.com/ledgerwatch/erigon-lib@v0.0.0-20230405025700-b2bfe9a2ca46/types/txn.go:450:59: undefined: secp256k1.DefaultContext