procfs icon indicating copy to clipboard operation
procfs copied to clipboard

Update build constraints for loong64 and s390x, Compatible with lower versions of go compiler

Open fangwentong opened this issue 1 year ago • 2 comments

go1.16 cannot recognize the loong64 instruction set architecture, and an error will occur during compilation. This MR explicitly specifies the instruction set build constraints in the source file.

When running on linux/amd64, got the following error

❯ gvm use go1.16
Now using version go1.16
❯ go build -o main main.go
# github.com/prometheus/procfs
vendor/github.com/prometheus/procfs/cpuinfo_x86.go:20:5: parseCPUInfo redeclared in this block
	previous declaration at vendor/github.com/prometheus/procfs/cpuinfo_loong64.go:19:5

fangwentong avatar Mar 29 '24 05:03 fangwentong

Not sure we want/need to support go 1.16. Why do you need to compile it with that old version? @SuperQ wdyt?

discordianfish avatar Apr 10 '24 11:04 discordianfish

As of today this library requires Go 1.20 and newer.

SuperQ avatar Jun 03 '24 13:06 SuperQ