Make temporal-sql-tool fails with error

Hi, I have been trying to create the temporal-sql-tool binary from package version v1.20.0 via

make temporal-sql-tool

I was running into various issues of the type :

is provided by exactly one module; to add:`
`        go get ` `github.com/prometheus/client_golang/prometheus@v1.14.0`
`common/metrics/config.go:34:2: missing go.sum entry needed to verify package ` `github.com/uber-go/tally/v4` ` (imported by ` `go.temporal.io/server/common/metrics` `) is provided by exactly one module; to add:`
`        go get ` `go.temporal.io/server/common/metrics`
`common/metrics/config.go:35:2: missing go.sum entry needed to verify package ` `github.com/uber-go/tally/v4/m3` ` (imported by ` `go.temporal.io/server/common/metrics` `) is provided by exactly one module; to add:`

Thereby I ran go mod tidy
I have also tried go get -t . and GOFLAGS=-mod=mod go generate ./...

However, then I started getting the below error

make temporal-sql-tool Build temporal-sql-tool with CGO_ENABLED=0 for darwin/amd64… CGO_ENABLED=0 go build -o temporal-sql-tool ./cmd/tools/sql common/constants.go:31:2: //go:build comment without // +build comment make: *** [temporal-sql-tool] Error 1

I checked line 31 in the constants file it is import for "go.temporal.io/server/common/debug"

I have also tried make in the root directory but that fails too:

make
Install/update goimports...
# golang.org/x/tools/cmd/goimports
ld: warning: -no_pie is deprecated when targeting new OS versions
ld: warning: non-standard -pagezero_size is deprecated when targeting macOS 13.0 or later
/usr/local/go/pkg/tool/darwin_amd64/link: /usr/local/go/pkg/tool/darwin_amd64/link: combining dwarf failed: unknown load command 0x80000033 (2147483699)
make: *** [update-goimports] Error 2

Looks like i can download the jars directly without having to build it too.
Will try using temporal_1.20.0_darwin_amd64.tar.gz

Hi, yes the tar.gz files linked in release contain temporal-sql-tool.
Are you able to build it from source?

git checkout https://github.com/temporalio/temporal.git
cd temporal 
make temporal-sql-tool

Also admin-tools image contains it too.

No, I could not build it from the source. Ran into the errors I posted above. I am just trying to use the ones in the tar.gz atm

Ok, whats Go version? I am able to generate when using

go version  
go version go1.19.2 darwin/arm64

go version
go version go1.16 darwin/amd64