pingcap / tidb-tools

tidb-tools are some useful tool collections for TiDB.
Apache License 2.0
286 stars 190 forks source link

sync_diff_inspector: use statically build #785

Closed CharlesCheung96 closed 2 months ago

CharlesCheung96 commented 3 months ago

What problem does this PR solve?

Issue Number: ref #782

What is changed and how it works?

Check List

Tests

Code changes

Side effects

Related changes

CharlesCheung96 commented 3 months ago

/retest

CharlesCheung96 commented 3 months ago

/integration-test

CharlesCheung96 commented 3 months ago

/run-integration-test

ti-chi-bot[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dveeden

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/pingcap/tidb-tools/blob/master/OWNERS)~~ [dveeden] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ti-chi-bot[bot] commented 2 months ago

[LGTM Timeline notifier]

Timeline:

wuhuizuo commented 2 months ago

broken in buildings for mac targets.

dveeden commented 2 months ago

I assume this is the issue?

$ GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 make sync_diff_inspector 
GO111MODULE=on go build -ldflags '-X "github.com/pingcap/tidb-tools/pkg/utils.Version=v8.1.0-8-g2c9fecb" -X "github.com/pingcap/tidb-tools/pkg/utils.BuildTS=2024-06-12 05:56:32" -X "github.com/pingcap/tidb-tools/pkg/utils.GitHash=2c9fecb17c2f014b469bd1f0e36393dae1842773" -X "github.com/pingcap/tidb-tools/pkg/utils.GitBranch=master"' -o bin/sync_diff_inspector ./sync_diff_inspector
# github.com/cloudfoundry/gosigar
../../../go/pkg/mod/github.com/cloudfoundry/gosigar@v1.3.6/concrete_sigar.go:20:12: cpuUsage.Get undefined (type Cpu has no field or method Get)
../../../go/pkg/mod/github.com/cloudfoundry/gosigar@v1.3.6/concrete_sigar.go:30:14: cpuUsage.Get undefined (type Cpu has no field or method Get)
../../../go/pkg/mod/github.com/cloudfoundry/gosigar@v1.3.6/concrete_sigar.go:49:11: l.Get undefined (type LoadAverage has no field or method Get)
../../../go/pkg/mod/github.com/cloudfoundry/gosigar@v1.3.6/concrete_sigar.go:55:11: m.Get undefined (type Mem has no field or method Get)
../../../go/pkg/mod/github.com/cloudfoundry/gosigar@v1.3.6/concrete_sigar.go:61:11: m.GetIgnoringCGroups undefined (type Mem has no field or method GetIgnoringCGroups)
../../../go/pkg/mod/github.com/cloudfoundry/gosigar@v1.3.6/concrete_sigar.go:67:11: s.Get undefined (type Swap has no field or method Get)
../../../go/pkg/mod/github.com/cloudfoundry/gosigar@v1.3.6/sigar_shared.go:12:21: procTime.Get undefined (type *ProcTime has no field or method Get)
make: *** [Makefile:60: sync_diff_inspector] Error 1
wuhuizuo commented 2 months ago

../../../go/pkg/mod/github.com/cloudfoundry/gosigar@v1.3.6/concrete_sigar.go:20:12: cpuUsage.Get undefined (type Cpu has no field or method Get)

Yes

dveeden commented 2 months ago

https://github.com/cloudfoundry/gosigar/blob/master/sigar_darwin.go heavily relies on C so that explains that.