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

linux/mips64: build error #48

Open
florianl opened this issue Aug 2, 2022 · 4 comments
Open

linux/mips64: build error #48

florianl opened this issue Aug 2, 2022 · 4 comments
Assignees
Labels
bug Something isn't working Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@florianl
Copy link
Member

florianl commented Aug 2, 2022

When building this package for linux/mips64 it fails with the following error:

metric/system/cgroup/cgv2/io_helper_linux.go:54:9: cannot use infoT.Rdev (type uint32) as type uint64 in assignment

This is expected as syscall.Stat_t for linux/mips64 defines Rdev as uint32 in https://cs.opensource.google/go/go/+/refs/tags/go1.18.5:src/syscall/ztypes_linux_mips64.go;l=107.

Reproduce with:

$ GOOS=linux GOARCH=mips64 go build ./...
metric/system/cgroup/cgv2/io_helper_linux.go:54:11: cannot use infoT.Rdev (variable of type uint32) as type uint64 in assignment
@florianl florianl added the bug Something isn't working label Aug 2, 2022
@belimawr belimawr added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Aug 2, 2022
@fearful-symmetry fearful-symmetry self-assigned this Aug 2, 2022
@fearful-symmetry
Copy link
Contributor

@florianl Curious what this is being built on. Do we actually need cgroups support on a MIPS system, or can I just change the build rules so MIPS doesn't support getIOStats?

@rlwinter
Copy link

I'm getting this error as well when attempting to build filebeats alone on Ubuntu 20.04.02 running on windows 10 in WSL. Hope that answers your question about what is this being built on...
Sorry, I have no idea what cgroups support means. I would like to build metricbeat as well which means getIOStats will probably be useful. I will be deploying this to some network gear built around a mips64 chip running some flavor of embedded linux.

# build command:
~/golang/beats/filebeat$ GOOS=linux GOARCH=mips64 go build -o filebeat.mips64
$ go version
go version go1.18.5 linux/amd64

@rlwinter
Copy link

FYI I get the exact same error message building for 32 bit mips with the following build command: $ GOOS=linux GOARCH=mips go build -o filebeat.mips32

@rlwinter
Copy link

FYI this is a regression between origin/7.14 and current main af1bcf15dab. $ GOOS=linux GOARCH=mips go build -o filebeat.mips32 succeeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

No branches or pull requests

4 participants