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

Build fails on OpenBSD/arm(6) #1257

Closed
1 of 5 tasks
adowair opened this issue Feb 24, 2022 · 2 comments
Closed
1 of 5 tasks

Build fails on OpenBSD/arm(6) #1257

adowair opened this issue Feb 24, 2022 · 2 comments

Comments

@adowair
Copy link

adowair commented Feb 24, 2022

Describe the bug
Cross-compiling the disk utility on openbsd/arm fails with the following error:

# github.com/shirou/gopsutil/disk
../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.11+incompatible/disk/disk_openbsd.go:81:39: undefined: sizeOfDiskstats
../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.11+incompatible/disk/disk_openbsd.go:85:14: undefined: sizeOfDiskstats
../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.11+incompatible/disk/disk_openbsd.go:111:34: undefined: Diskstats
../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.11+incompatible/disk/disk_openbsd.go:112:9: undefined: Diskstats

To Reproduce
Using Go v1.17.6, running:

GOOS=openbsd GOARCH=arm go build .

Expected behavior
The package should compile correctly =D

Environment (please complete the following information):

  • Windows: [paste the result of ver]
  • Linux: [paste contents of /etc/os-release and the result of uname -a]
  • Mac OS: [paste the result of sw_vers and uname -a
  • FreeBSD: [paste the result of freebsd-version -k -r -u and uname -a]
  • OpenBSD: [paste the result of uname -a]

Additional context
I am cross-compiling on macOS Monterey (v12.0.1), with the following env:

$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/ali.dowair/Library/Caches/go-build"
GOENV="/Users/ali.dowair/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/ali.dowair/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/ali.dowair/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.17.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.17.6/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.6"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/ali.dowair/dev/kopia/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/pz/vhp6gb9900x1hw1cmkcn74s40000gp/T/go-build2010082161=/tmp/go-build -gno-record-gcc-switches -fno-common"

I see that this issue has come up before (#912, #1082), and wonder if the fixes for these are unstable, or if I'm doing something wrong. Looking at the package in this current version, I can see disk/types_openbsd.go, but it is hidden by the build tag ignore. Why is that?

@shirou
Copy link
Owner

shirou commented Feb 24, 2022

We have arm64 definition but no arm. We would be very grateful if you could open a PR about the definition of arm.

@Lomanic
Copy link
Collaborator

Lomanic commented Apr 17, 2022

Fixed with #1286

@Lomanic Lomanic closed this as completed Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants