Description
-
What version of Go are you using (
go version
)?
go1.7.rc2 -
What operating system and processor architecture are you using (
go env
)?
[root@localhost ~]# go env
GOARCH="mips64le"
GOBIN=""
GOEXE=""
GOHOSTARCH="mips64le"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_mips64le"
CC="gcc"
GOGCCFLAGS="-fPIC -mabi=64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build685506292=/tmp/go-build"
CXX="g++"
CGO_ENABLED="1" -
What did you do?
My PC is a mips64le pc. When I compile the docker, I encountered a problem:this is the error message:
docker/pkg/system/stat_linux.go:13: cannot use s.Rdev (type uint32) as type uint64 in field value
3.1 In go/src/syscall/syscall_linux_mips64x.go, I see that
type stat_t struct {
Dev uint32
3.2 On my pc RUN: man 2 stat, I see that
struct stat {
dev_t st_dev;
3.3 Then I wrote a test program.
#include <stdio.h>
#include <sys/types.h>
int main()
{
printf("sizeof(dev_t) = %d\n", sizeof(dev_t));
return 0;
}
---------------------------
sizeof(dev_t) = 8