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

generate host_linux_loongarch64.go #1080

Closed
wants to merge 1 commit into from
Closed

generate host_linux_loongarch64.go #1080

wants to merge 1 commit into from

Conversation

zunley
Copy link

@zunley zunley commented May 31, 2021

I run mktypes.sh && make build_test. The test result are as follows.

I open this PR because calicoctl needs.Currently golang of loongarch64 is waiting for the community to receive, so run ci with other platforms will fail.

root@merore-larch:~/go/src/github.com/shirou/gopsutil# make build_test
# Supported operating systems
GOOS=linux GOARCH=amd64 go test ./... | grep -v "exec format error" | grep "build failed" && exit 1 || exit 0
GOOS=linux GOARCH=386 go test ./... | grep -v "exec format error" | grep "build failed" && exit 1 || exit 0
GOOS=linux GOARCH=arm go test ./... | grep -v "exec format error" | grep "build failed" && exit 1 || exit 0
GOOS=linux GOARCH=arm64 go test ./... | grep -v "exec format error" | grep "build failed" && exit 1 || exit 0
GOOS=linux GOARCH=riscv64 go test ./... | grep -v "exec format error" | grep "build failed" && exit 1 || exit 0
GOOS=linux GOARCH=loongarch64 go test ./... | grep -v "exec format error" | grep "build failed" && exit 1 || exit 0
GOOS=freebsd go test ./... | grep -v "exec format error" | grep "build failed" && exit 1 || exit 0
cmd/go: unsupported GOOS/GOARCH pair freebsd/loongarch64
GOOS=freebsd GOARCH=arm go test ./... | grep -v "exec format error" | grep "build failed" && exit 1 || exit 0
# github.com/shirou/gopsutil/host [github.com/shirou/gopsutil/host.test]
host/host_bsd.go:20:13: undefined: unix.SysctlTimeval
# github.com/shirou/gopsutil/disk [github.com/shirou/gopsutil/disk.test]
disk/disk_freebsd.go:84:52: cannot use stat.Mntfromname[:] (type []int8) as type []byte in argument to common.ByteToString
disk/disk_freebsd.go:85:50: cannot use stat.Mntonname[:] (type []int8) as type []byte in argument to common.ByteToString
disk/disk_freebsd.go:86:51: cannot use stat.Fstypename[:] (type []int8) as type []byte in argument to common.ByteToString
disk/disk_freebsd.go:161:44: cannot use stat.Fstypename[:] (type []int8) as type []byte in argument to common.ByteToString
# github.com/shirou/gopsutil/v3/disk [github.com/shirou/gopsutil/v3/disk.test]
v3/disk/disk_freebsd.go:84:52: cannot use stat.Mntfromname[:] (type []int8) as type []byte in argument to common.ByteToString
v3/disk/disk_freebsd.go:85:50: cannot use stat.Mntonname[:] (type []int8) as type []byte in argument to common.ByteToString
v3/disk/disk_freebsd.go:86:51: cannot use stat.Fstypename[:] (type []int8) as type []byte in argument to common.ByteToString
v3/disk/disk_freebsd.go:161:44: cannot use stat.Fstypename[:] (type []int8) as type []byte in argument to common.ByteToString
# github.com/shirou/gopsutil/v3/host [github.com/shirou/gopsutil/v3/host.test]
v3/host/host_bsd.go:20:13: undefined: unix.SysctlTimeval
FAIL	github.com/shirou/gopsutil/disk [build failed]
FAIL	github.com/shirou/gopsutil/host [build failed]
FAIL	github.com/shirou/gopsutil/v3/disk [build failed]
FAIL	github.com/shirou/gopsutil/v3/host [build failed]
make: *** [Makefile:23: build_test] Error 1

root@merore-larch:~/go/src/github.com/shirou/gopsutil# lscpu
Architecture:        loongarch64
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Model name:          Loongson-3A5000LL
CPU max MHz:         2300.0000
CPU min MHz:         225.0000
BogoMIPS:            4592.64
L1d cache:           64K
L1i cache:           64K
L2 cache:            256K
L3 cache:            16384K
NUMA node0 CPU(s):   0-3

@zunley
Copy link
Author

zunley commented May 31, 2021

go-sysconf is a depiences of this porject, i have submitted the corresponding support.

Currently, loongarch64 support linux only.

@xen0n
Copy link

xen0n commented Jun 9, 2021

The exact GOARCH value is not decided yet; see golang/go#46229. This should wait until the LoongArch support is properly upstreamed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants