Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 12.0 deprecated bug #1196

Closed
koeichen opened this issue Dec 7, 2021 · 1 comment
Closed

macOS 12.0 deprecated bug #1196

koeichen opened this issue Dec 7, 2021 · 1 comment

Comments

@koeichen
Copy link

koeichen commented Dec 7, 2021

Describe the bug
There is a warning or error during building under macOS 12.0

To Reproduce

package main

import (
	"fmt"

	_ "github.com/shirou/gopsutil/disk"
)

func main() {
	fmt.Printf("123")
}

Expected behavior

github.com/shirou/gopsutil/internal/common
github.com/shirou/gopsutil/disk
# 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

Environment
ProductName: macOS
ProductVersion: 12.0.1
BuildVersion: 21A559
Darwin C02DH08NMD6R 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64

Additional context
some go env var have been deleted for personal reason.
go env
GO111MODULE="on"
GOARCH="amd64"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOOS="darwin"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.16.11"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/p0/kb961x5d6wd79gfp2h6t_8500000gn/T/go-build2551005911=/tmp/go-build -gno-record-gcc-switches -fno-common"

@sodul
Copy link

sodul commented Dec 8, 2021

Seems to be addressed in PR #1191

@shirou shirou closed this as completed Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants