xxxserxxx / gotop

A terminal based graphical activity monitor inspired by gtop and vtop
Other
2.69k stars 138 forks source link

Build error on Mac #259

Open ersonp opened 1 month ago

ersonp commented 1 month ago
gotop version:

3e50a670474909c72892d05f5715c2c28680005d

OS/Arch:

ProductName: macOS ProductVersion: 14.4.1 BuildVersion: 23E224

Terminal emulator:

iTerm2

Any relevant hardware info:

Apple M2 Pro

Build error on Mac because of deprecated variables in anatol/smart.go and shirou/gopsutil dependencies.

# 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/MacOSX14.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:143:1: note: 'IOMasterPort' has been explicitly marked deprecated here
# github.com/anatol/smart.go
nvme_darwin.cpp:35:54: 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:133:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
nvme_darwin.cpp:36:50: 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:133:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
# github.com/shirou/gopsutil/cpu
../../../go/pkg/mod/github.com/shirou/gopsutil@v3.20.12+incompatible/cpu/cpu_darwin_cgo.go:13:5: error: 'TARGET_OS_MAC' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
   13 | #if TARGET_OS_MAC
      |     ^
1 error generated.