Skip to content

Commit

Permalink
Reintroduce netgo (fix issues #12570 and #12556) (#12597)
Browse files Browse the repository at this point in the history
Reintroducing `netgo` into the builds to fix the following issues:
#12556
#12570

`netgo` was removed in this PR:
#7421

but didn't seem to fix that issue.

---------

Co-authored-by: antonis19 <antonis19@users.noreply.github.com>
  • Loading branch information
antonis19 and antonis19 authored Nov 19, 2024
1 parent 3b596d4 commit 400de4c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd-main-branch-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
-v ${HOME}/go/pkg/mod:/go/pkg/mod \
-w /erigon --entrypoint /bin/sh \
${{ env.BUILDER_IMAGE }} \
-c "apk update; apk add make git gcc libstdc++ build-base linux-headers bash ca-certificates; git config --global --add safe.directory /erigon; make GOARCH=arm64 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm erigon integration rpcdaemon"
-c "apk update; apk add make git gcc libstdc++ build-base linux-headers bash ca-certificates; git config --global --add safe.directory /erigon; make GOARCH=arm64 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm,netgo erigon integration rpcdaemon"
- name: Build amd64
run: |
Expand All @@ -94,7 +94,7 @@ jobs:
-v ${HOME}/go/pkg/mod:/go/pkg/mod \
-w /erigon --entrypoint /bin/sh \
${{ env.BUILDER_IMAGE }} \
-c "apk update; apk add make git gcc libstdc++ build-base linux-headers bash ca-certificates; git config --global --add safe.directory /erigon; make GOARCH=amd64 GOAMD64=v2 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm erigon integration rpcdaemon"
-c "apk update; apk add make git gcc libstdc++ build-base linux-headers bash ca-certificates; git config --global --add safe.directory /erigon; make GOARCH=amd64 GOAMD64=v2 GOBIN=/erigon-build BUILD_TAGS=nosqlite,noboltdb,nosilkworm,netgo erigon integration rpcdaemon"
- name: Build and push multi-platform docker image based on the commit id ${{ steps.getCommitId.outputs.short_commit_id }} in the main branch
env:
Expand Down
80 changes: 40 additions & 40 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ builds:
- CXX=o64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -51,7 +51,7 @@ builds:
- CXX=o64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -71,7 +71,7 @@ builds:
- CXX=o64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -91,7 +91,7 @@ builds:
- CXX=o64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -111,7 +111,7 @@ builds:
- CXX=o64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -131,7 +131,7 @@ builds:
- CXX=o64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -151,7 +151,7 @@ builds:
- CXX=o64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -171,7 +171,7 @@ builds:
- CXX=o64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -191,7 +191,7 @@ builds:
- CXX=o64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -211,7 +211,7 @@ builds:
- CXX=o64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -232,7 +232,7 @@ builds:
- CXX=oa64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -250,7 +250,7 @@ builds:
- CXX=oa64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -268,7 +268,7 @@ builds:
- CXX=oa64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -286,7 +286,7 @@ builds:
- CXX=oa64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -304,7 +304,7 @@ builds:
- CXX=oa64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -322,7 +322,7 @@ builds:
- CXX=oa64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -340,7 +340,7 @@ builds:
- CXX=oa64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -358,7 +358,7 @@ builds:
- CXX=oa64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -376,7 +376,7 @@ builds:
- CXX=oa64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -394,7 +394,7 @@ builds:
- CXX=oa64-clang++
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT_DARWIN }}
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -418,7 +418,7 @@ builds:
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -439,7 +439,7 @@ builds:
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -460,7 +460,7 @@ builds:
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -481,7 +481,7 @@ builds:
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -502,7 +502,7 @@ builds:
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -523,7 +523,7 @@ builds:
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -544,7 +544,7 @@ builds:
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -565,7 +565,7 @@ builds:
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -586,7 +586,7 @@ builds:
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -607,7 +607,7 @@ builds:
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }}
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -628,7 +628,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -646,7 +646,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -664,7 +664,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -682,7 +682,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -700,7 +700,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -718,7 +718,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -736,7 +736,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -754,7 +754,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -772,7 +772,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand All @@ -790,7 +790,7 @@ builds:
- CXX=aarch64-linux-gnu-g++
- CGO_CFLAGS={{ .Env.CGO_CFLAGS_DEFAULT }} -D__BLST_PORTABLE__
- CGO_LDFLAGS={{ .Env.CGO_LDFLAGS_DEFAULT }}
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
flags:
- -trimpath
- -buildvcs=false
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ifeq ($(shell uname -s), Darwin)
endif

# about netgo see: https://github.com/golang/go/issues/30310#issuecomment-471669125 and https://github.com/golang/go/issues/57757
BUILD_TAGS = nosqlite,noboltdb
BUILD_TAGS = nosqlite,noboltdb,netgo

ifneq ($(shell "$(CURDIR)/turbo/silkworm/silkworm_compat_check.sh"),)
BUILD_TAGS := $(BUILD_TAGS),nosilkworm
Expand Down

0 comments on commit 400de4c

Please sign in to comment.