Description
Hi, I found that after this commit I cannot build package github.com/moby/moby/pkg/archive on MacOS. On line
|
hdr.Devmajor = int64(major(s.Rdev)) |
was removed type conversion of
s.Rdev to
uint64. It works great on Linux because
s.Rdev is
uint64 on it, but on MacOS
s.Rdev has type
int32. See
https://golang.org/src/syscall/ztypes_darwin_arm64.go#72
Steps to reproduce the issue:
- Go to
pkg/archive
- Run
go build
Describe the results you received:
./archive_unix.go:53:32: cannot use s.Rdev (type int32) as type uint64 in argument to major
./archive_unix.go:54:32: cannot use s.Rdev (type int32) as type uint64 in argument to minor
My environment
uname -a
Darwin Andrews-MacBook-Air.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/ndrewnee/Projects/go"
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0g/wm4dp9t56wl8x87qv51k0xnr0000gn/T/go-build843481590=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
Description
Hi, I found that after this commit I cannot build package
github.com/moby/moby/pkg/archiveon MacOS. On linemoby/pkg/archive/archive_unix.go
Line 53 in 9b4a616
s.Rdevtouint64. It works great on Linux becauses.Rdevisuint64on it, but on MacOSs.Rdevhas typeint32. See https://golang.org/src/syscall/ztypes_darwin_arm64.go#72Steps to reproduce the issue:
pkg/archivego buildDescribe the results you received:
My environment