Closed
Description
Enhancement
make server
would output warnings on macOS 12:
CGO_ENABLED=1 GO111MODULE=on go build -tags codes -ldflags '-X "github.com/pingcap/tidb/parser/mysql.TiDBReleaseVersion=v5.4.0-alpha-377-g08f799cb2-dirty" -X "github.com/pingcap/tidb/util/versioninfo.TiDBBuildTS=2022-01-12 07:04:03" -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitHash=08f799cb2c982d4d04a14007d0196261def6c190" -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitBranch=hack-verify-effectiveness" -X "github.com/pingcap/tidb/util/versioninfo.TiDBEdition=Community" ' -o bin/tidb-server tidb-server/main.go
# github.com/shirou/gopsutil/cpu
../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.2+incompatible/cpu/cpu_darwin_cgo.go:13:5: warning: 'TARGET_OS_MAC' is not defined, evaluates to 0 [-Wundef-prefix=TARGET_OS_]
# github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:132:1: note: 'IOMasterPort' has been explicitly marked deprecated here
# github.com/shirou/gopsutil/host
smc_darwin.c:75:41: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
shirou/gopsutil#1191 has fixed this. We can bump gopsutil to fix the issue.