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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fangwentong
Copy link

@fangwentong fangwentong commented Mar 29, 2024

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

Signed-off-by: fangwentong <fangwentong2012@gmail.com>
@discordianfish
Copy link
Member

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

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

Successfully merging this pull request may close these issues.

None yet

2 participants