I'm trying to build a docker image of a video conferencing platform written in Go using the pion package. Below is the error I'm facing
> [stage-0 6/6] RUN CGO_ENABLED=0 go build -o /bin/app ./cmd:
#13 0.446 /go/pkg/mod/github.com/pion/stun@v0.4.0/xoraddr.go:10:2: //go:build comment without // +build comment
------
executor failed running [/bin/sh -c CGO_ENABLED=0 go build -o /bin/app ./cmd]: exit code: 1
make: *** [build-dev] Error 1
I have tried all the solutions I came accross on the internet.
=> Updated my go version to @1.20 and also tried downgrading my version to @1.17 => Downgraded the specific package I was facing the issue with stun@v0.4.0 -> stun@0.3.5
The first one is the solution provided in many of the issues which were already raised. But it didnt work for me. Please help.
I'm using go version @1.18 which I installed using homebrew on my mac m1, below is my go env:
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/teja/Library/Caches/go-build"
GOENV="/Users/teja/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/teja/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/teja/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/opt/go/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18.10"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
.....