GoogleCloudPlatform / spanner-migration-tool

Spanner migration tool helps you migrate from your existing database/dump files to Spanner
https://googlecloudplatform.github.io/spanner-migration-tool/
Apache License 2.0
113 stars 57 forks source link

Issue installing with golang 1.17 #231

Closed dtest closed 2 years ago

dtest commented 2 years ago

Expected Behavior

This should work:

git clone https://github.com/cloudspannerecosystem/harbourbridge
cd harbourbridge
go run github.com/cloudspannerecosystem/harbourbridge help

Actual Behavior

Errors out on tidb:

go run github.com/cloudspannerecosystem/harbourbridge help
*snip*
go: downloading google.golang.org/api v0.57.0
go: downloading github.com/hengfengli/go-genproto v0.0.0-20210914051132-d2ab1d87ef40
go: downloading github.com/gorilla/handlers v1.5.0
go: downloading github.com/gorilla/mux v1.7.3
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/googleapis/gax-go/v2 v2.1.0
go: downloading google.golang.org/grpc v1.29.1
go: downloading google.golang.org/protobuf v1.27.1
go: downloading go.opencensus.io v0.23.0
go: downloading github.com/pingcap/parser v0.0.0-20200422082501-7329d80eaf2c
go: downloading github.com/pingcap/tidb v1.1.0-beta.0.20200423105559-af376db3dc46
go: downloading github.com/pganalyze/pg_query_go/v2 v2.0.5
go: downloading golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365
go: downloading golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
go: downloading github.com/felixge/httpsnoop v1.0.1
go: downloading golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d
go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: downloading github.com/jmespath/go-jmespath v0.3.0
go: downloading github.com/pingcap/errors v0.11.5-0.20190809092503-95897b64e011
go: downloading github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548
go: downloading github.com/pingcap/log v0.0.0-20200117041106-d28c14d3b1cd
go: downloading go.uber.org/zap v1.14.1
go: downloading github.com/google/go-cmp v0.5.6
go: downloading golang.org/x/text v0.3.6
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/opentracing/opentracing-go v1.0.2
go: downloading github.com/sirupsen/logrus v1.5.0
go: downloading go.uber.org/atomic v1.6.0
go: downloading go.uber.org/multierr v1.5.0
go: downloading github.com/pingcap/tipb v0.0.0-20200417094153-7316d94df1ee
go: downloading github.com/shirou/gopsutil v2.19.10+incompatible
# runtime/internal/sys
/usr/local/go/src/runtime/internal/sys/stubs.go:9:7: PtrSize redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch.go:24:38: previous declaration
/usr/local/go/src/runtime/internal/sys/stubs.go:10:24: undefined: Uintreg
/usr/local/go/src/runtime/internal/sys/stubs.go:16:7: StackGuardMultiplier redeclared in this block
        /usr/local/go/src/runtime/internal/sys/arch.go:27:74: previous declaration

Steps to Reproduce the Problem

  1. Install golang 1.17
  2. Clone repo and run go run

Specifications

Deep1998 commented 2 years ago

Hey Derek, thanks for reaching out. I tried running this on a debian 10 with go 1.17 and it seems to work for me. Do you have multiple installations of go? Can you try cleaning up all older versions and re-installing go? Deleting /usr/local/go should be enough to clean up go.

dtest commented 2 years ago

Thank you for the quick check @Deep1998

Yes, I created a fresh debian 10 VM and focused on only installing harbourbridge, and it worked fine. The previous install had an old version of golang installed.

Closing!