erigontech / erigon

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

Docker build error with 2022.04.04-alpha #4019

Closed mohoff closed 2 years ago

mohoff commented 2 years ago

Using the Dockerfile in the repo, I'm getting this docker build error:

[+] Building 129.9s (16/21)
 => [internal] load build definition from Dockerfile                                                                                                                     0.0s
 => => transferring dockerfile: 1.32kB                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                        0.0s
 => => transferring context: 137B                                                                                                                                        0.0s
 => resolve image config for docker.io/docker/dockerfile:1                                                                                                               5.3s
 => docker-image://docker.io/docker/dockerfile:1@sha256:91f386bc3ae6cd5585fbd02f811e295b4a7020c23c7691d686830bf6233e91ad                                                 2.2s
 => => resolve docker.io/docker/dockerfile:1@sha256:91f386bc3ae6cd5585fbd02f811e295b4a7020c23c7691d686830bf6233e91ad                                                     0.0s
 => => sha256:7c651b7122e7366e15d4ea5327b27111f6862d9b9896383a4a695d3190f3909d 528B / 528B                                                                               0.0s
 => => sha256:edddd0dce574bd03c542d84013e16caf779de32ce2a1c5b402a0bc7405f85b20 2.37kB / 2.37kB                                                                           0.0s
 => => sha256:0f821387874bc19cdfd45922f5ff075fd256356bf3f2baba7fb109d2b3a64bbd 9.93MB / 9.93MB                                                                           1.8s
 => => sha256:91f386bc3ae6cd5585fbd02f811e295b4a7020c23c7691d686830bf6233e91ad 2.00kB / 2.00kB                                                                           0.0s
 => => extracting sha256:0f821387874bc19cdfd45922f5ff075fd256356bf3f2baba7fb109d2b3a64bbd                                                                                0.3s
 => [internal] load build definition from Dockerfile                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/alpine:3.15                                                                                                           1.1s
 => [internal] load metadata for docker.io/library/golang:1.18-alpine3.15                                                                                                1.0s
 => CACHED [stage-1  1/10] FROM docker.io/library/alpine:3.15@sha256:4edbd2beb5f78b1014028f4fbb99f3237d9561100b6881aabbf5acce2c4f9454                                    0.0s
 => [builder 1/5] FROM docker.io/library/golang:1.18-alpine3.15@sha256:42d35674864fbb577594b60b84ddfba1be52b4d4298c961b46ba95e9fb4712e8                                  0.0s
 => [internal] load build context                                                                                                                                        1.1s
 => => transferring context: 38.03MB                                                                                                                                     1.1s
 => [stage-1 2/7] RUN apk add --no-cache ca-certificates libgcc libstdc++ tzdata                                                                                         6.4s
 => [builder 2/5] RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++                                                           64.6s
 => [builder 3/5] WORKDIR /app                                                                                                                                           0.0s
 => [builder 4/5] ADD . .                                                                                                                                                0.2s
 => ERROR [builder 5/5] RUN make erigon rpcdaemon integration sentry txpool downloader hack db-tools                                                                    55.5s
------
 > [builder 5/5] RUN make erigon rpcdaemon integration sentry txpool downloader hack db-tools:
#16 0.294 Updating git submodules
#16 0.305 fatal: not a git repository (or any of the parent directories): .git
#16 0.306 fatal: not a git repository (or any of the parent directories): .git
#16 0.307 fatal: not a git repository (or any of the parent directories): .git
#16 0.309 fatal: not a git repository (or any of the parent directories): .git
#16 0.310 fatal: not a git repository (or any of the parent directories): .git
#16 0.311 Building erigon
#16 0.324 go: downloading github.com/urfave/cli v1.22.5
#16 0.324 go: downloading github.com/ledgerwatch/erigon-lib v0.0.0-20220426111915-6745c226947e
#16 0.324 go: downloading github.com/c2h5oh/datasize v0.0.0-20200825124411-48ed595a09d2
#16 0.325 go: downloading github.com/ledgerwatch/log/v3 v3.4.1
#16 0.325 go: downloading github.com/spf13/pflag v1.0.5
#16 1.447 go: downloading github.com/anacrolix/log v0.13.1
#16 2.528 go: downloading github.com/spf13/cobra v1.4.0
#16 3.180 go: downloading github.com/torquem-ch/mdbx-go v0.23.2
#16 3.183 go: downloading github.com/holiman/uint256 v1.2.0
#16 3.194 go: downloading google.golang.org/grpc v1.45.0
#16 3.196 go: downloading google.golang.org/protobuf v1.28.0
#16 3.204 go: downloading github.com/davecgh/go-spew v1.1.1
#16 3.213 go: downloading github.com/gofrs/flock v0.8.1
#16 3.355 go: downloading github.com/rs/cors v1.8.2
#16 3.714 go: downloading github.com/VictoriaMetrics/metrics v1.18.1
#16 3.722 go: downloading golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4
#16 3.724 go: downloading github.com/go-stack/stack v1.8.1
#16 3.726 go: downloading github.com/mattn/go-colorable v0.1.11
#16 4.298 go: downloading github.com/mattn/go-isatty v0.0.14
#16 5.000 go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.1
#16 5.018 go: downloading github.com/anacrolix/go-libutp v1.2.0
#16 5.020 go: downloading github.com/anacrolix/torrent v1.42.0
#16 5.059 go: downloading golang.org/x/time v0.0.0-20220411224347-583f2d630306
#16 5.061 go: downloading github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea
#16 5.405 go: downloading github.com/edsrzf/mmap-go v1.0.0
#16 5.418 go: downloading github.com/goccy/go-json v0.9.7
#16 5.518 go: downloading github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
#16 5.851 go: downloading github.com/ledgerwatch/secp256k1 v1.0.0
#16 5.854 go: downloading golang.org/x/sys v0.0.0-20220422013727-9388b58f7150
#16 5.864 go: downloading github.com/shirou/gopsutil/v3 v3.22.2
#16 5.955 go: downloading github.com/huin/goupnp v1.0.3
#16 6.415 go: downloading github.com/jackpal/go-nat-pmp v1.0.2
#16 6.715 go: downloading go.uber.org/atomic v1.9.0
#16 6.715 go: downloading github.com/google/btree v1.0.1
#16 6.715 go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
#16 6.743 go: downloading github.com/flanglet/kanzi-go v1.9.1-0.20211212184056-72dda96261ee
#16 6.746 go: downloading github.com/ugorji/go/codec v1.1.13
#16 6.879 go: downloading github.com/valyala/fastjson v1.6.3
#16 6.898 go: downloading github.com/xsleonard/go-merkle v1.1.0
#16 6.977 go: downloading github.com/RoaringBitmap/roaring v0.9.4
#16 7.276 go: downloading github.com/stretchr/testify v1.7.1
#16 7.278 go: downloading github.com/emicklei/dot v0.16.0
#16 7.291 go: downloading github.com/json-iterator/go v1.1.12
#16 7.313 go: downloading github.com/gorilla/websocket v1.5.0
#16 7.682 go: downloading github.com/golang-jwt/jwt/v4 v4.3.0
#16 7.691 go: downloading github.com/VictoriaMetrics/fastcache v1.10.0
#16 7.744 go: downloading github.com/golang/protobuf v1.5.2
#16 7.814 go: downloading golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
#16 7.837 go: downloading github.com/valyala/histogram v1.2.0
#16 7.840 go: downloading github.com/russross/blackfriday/v2 v2.1.0
#16 7.956 go: downloading github.com/anacrolix/missinggo v1.3.0
#16 8.349 go: downloading github.com/anacrolix/mmsg v1.0.0
#16 8.406 go: downloading github.com/anacrolix/sync v0.4.0
#16 8.503 go: downloading github.com/anacrolix/missinggo/v2 v2.5.4-0.20220317032254-8c5ea4947a0b
#16 8.590 go: downloading github.com/anacrolix/chansync v0.3.0
#16 8.666 go: downloading github.com/anacrolix/dht/v2 v2.16.2-0.20220311024416-dd658f18fd51
#16 9.121 go: downloading github.com/anacrolix/generics v0.0.0-20220217222028-44932cf46edd
#16 9.125 go: downloading github.com/anacrolix/missinggo/perf v1.0.0
#16 9.290 go: downloading github.com/anacrolix/multiless v0.2.1-0.20211218050420-533661eef5dc
#16 9.292 go: downloading github.com/dustin/go-humanize v1.0.0
#16 9.292 go: downloading github.com/anacrolix/upnp v0.1.3-0.20220123035249-922794e51c96
#16 9.379 go: downloading github.com/pion/datachannel v1.5.2
#16 9.382 go: downloading github.com/pion/webrtc/v3 v3.1.24-0.20220208053747-94262c1b2b38
#16 9.547 go: downloading github.com/pkg/errors v0.9.1
#16 9.556 go: downloading github.com/golang/snappy v0.0.4
#16 9.562 go: downloading github.com/tklauser/go-sysconf v0.3.9
#16 9.645 go: downloading github.com/emirpasic/gods v1.12.0
#16 9.936 go: downloading github.com/spaolacci/murmur3 v1.1.0
#16 9.939 go: downloading github.com/pelletier/go-toml/v2 v2.0.0-beta.8
#16 9.949 go: downloading google.golang.org/genproto v0.0.0-20200825200019-8632dd797987
#16 10.00 go: downloading github.com/tendermint/go-amino v0.14.1
#16 10.43 go: downloading github.com/tendermint/iavl v0.12.0
#16 10.44 go: downloading github.com/tendermint/tendermint v0.31.11
#16 10.54 go: downloading github.com/pelletier/go-toml v1.9.5
#16 12.87 go: downloading gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6
#16 12.88 go: downloading gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
#16 12.88 go: downloading github.com/pmezard/go-difflib v1.0.0
#16 12.88 go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
#16 13.17 go: downloading github.com/modern-go/reflect2 v1.0.2
#16 13.26 go: downloading github.com/cespare/xxhash/v2 v2.1.2
#16 13.27 go: downloading github.com/valyala/fastrand v1.1.0
#16 13.51 go: downloading github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8
#16 13.53 go: downloading github.com/huandu/xstrings v1.3.2
#16 13.53 go: downloading github.com/rs/dnscache v0.0.0-20210201191234-295bba877686
#16 13.56 go: downloading github.com/anacrolix/envpprof v1.2.1
#16 13.77 go: downloading github.com/ajwerner/btree v0.0.0-20211201061316-91c8b66ad617
#16 13.79 go: downloading github.com/tidwall/btree v0.7.2-0.20211211132910-4215444137fc
#16 13.80 go: downloading github.com/pion/logging v0.2.2
#16 13.82 go: downloading golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
#16 14.04 go: downloading github.com/pion/sctp v1.8.2
#16 14.06 go: downloading github.com/tklauser/numcpus v0.3.0
#16 14.06 go: downloading github.com/pion/dtls/v2 v2.1.2
#16 14.35 go: downloading github.com/pion/ice/v2 v2.1.20
#16 14.36 go: downloading github.com/pion/interceptor v0.1.7
#16 14.70 go: downloading github.com/pion/randutil v0.1.0
#16 14.70 go: downloading github.com/pion/rtp v1.7.4
#16 14.70 go: downloading github.com/pion/rtcp v1.2.9
#16 14.93 go: downloading github.com/pion/sdp/v3 v3.0.4
#16 15.46 go: downloading github.com/pion/srtp/v2 v2.0.5
#16 15.46 go: downloading github.com/pion/transport v0.13.0
#16 15.72 go: downloading github.com/gogo/protobuf v1.3.2
#16 16.27 go: downloading github.com/benbjohnson/immutable v0.3.0
#16 16.28 go: downloading github.com/pion/udp v0.1.1
#16 17.48 go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
#16 17.48 go: downloading github.com/google/uuid v1.3.0
#16 17.75 go: downloading github.com/pion/mdns v0.0.5
#16 17.76 go: downloading github.com/pion/stun v0.3.5
#16 17.77 go: downloading github.com/pion/turn/v2 v2.0.6
#16 17.78 go: downloading github.com/syndtr/goleveldb v1.0.0
#16 18.25 go: downloading github.com/btcsuite/btcd v0.22.0-beta
#16 18.25 go: downloading github.com/go-kit/kit v0.10.0
#16 19.01 go: downloading github.com/go-logfmt/logfmt v0.5.0
#16 19.01 go: downloading github.com/prometheus/client_golang v1.11.0
#16 20.40 go: downloading github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a
#16 20.51 go: downloading golang.org/x/text v0.3.7
#16 20.68 go: downloading github.com/anacrolix/stm v0.3.0
#16 21.68 go: downloading github.com/prometheus/client_model v0.2.0
#16 22.58 go: downloading github.com/prometheus/common v0.30.0
#16 23.43 go: downloading github.com/beorn7/perks v1.0.1
#16 23.70 go: downloading github.com/prometheus/procfs v0.7.2
#16 23.92 go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
#16 55.13 ../downloader/trackers/embed.go:16:12: pattern trackerslist/trackers_all_http.txt: no matching files found
#16 55.13 /app/turbo/snapshotsync/snapshothashes/embed.go:22:12: pattern erigon-snapshots/bsc.toml: no matching files found
AskAlexSharov commented 2 years ago

Here is the fix: https://github.com/ledgerwatch/erigon/pull/4024/files

mohoff commented 2 years ago

@AskAlexSharov Your diff applied on top of 2022.04.04 still gives the error:

#16 56.95 go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
#16 144.7 ../downloader/trackers/embed.go:16:12: pattern trackerslist/trackers_all_http.txt: no matching files found
#16 144.7 /app/turbo/snapshotsync/snapshothashes/embed.go:22:12: pattern erigon-snapshots/bsc.toml: no matching files found
#16 144.7 make: *** [Makefile:50: erigon.cmd] Error 1
------
executor failed running [/bin/sh -c make erigon rpcdaemon integration sentry txpool downloader hack observer db-tools]: exit code: 2

Is this a fix for devel? Haven't tested that

AskAlexSharov commented 2 years ago

You didn’t pull git-submodules

mohoff commented 2 years ago

Hmm the git submodule update --quiet --init --recursive --force (see Makefile) doesn't do anything. Only a manual git submodule add per submodule adds them to .git/config which itself makes the update/init commands work.

I'm using the tarball of the release, not git clone. So there might be an issue with that tarball - switching to git clone based builds should do the trick for me

AskAlexSharov commented 2 years ago

“ I'm using the tarball of the release” - then you are on your own. I never used it - github producing it automatically.