Skip to content

x/sys/unix: syscall_dragonfly.go broken #20055

@stuartnelson3

Description

@stuartnelson3

What version of Go are you using (go version)?

go version go1.8 dragonfly/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="dragonfly"
GOOS="dragonfly"
GOPATH="/home/stuartnelson"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/dragonfly_amd64"
CC="cc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build485800045=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

What did you do?

Try to compile any project importing golang.org/x/sys after this commit: golang/sys@9a7256c

What did you expect to see?

My program to successfully compile.

What did you see instead?

# github.com/prometheus/alertmanager/vendor/golang.org/x/sys/unix
vendor/golang.org/x/sys/unix/syscall_dragonfly.go:60: Dirent literal.Ino undefined (type Dirent has no field or method Ino)
vendor/golang.org/x/sys/unix/syscall_dragonfly.go:60: invalid expression unsafe.Sizeof(Dirent literal.Ino)
vendor/golang.org/x/sys/unix/syscall_dragonfly.go:68: constant -8 overflows uint64
!! command failed: build -o amtool -ldflags -X github.com/prometheus/alertmanager/vendor/github.com/prometheus/common/version.Version=0.5.1 -X github.com/prometheus/alertmanager/vendor/github.com/prometheus/common/version.Revision=68e1cbe024b327dba9eb6d9241282c3e68469968 -X github.com/prometheus/alertmanager/vendor/github.com/prometheus/common/version.Branch=master -X github.com/prometheus/alertmanager/vendor/github.com/prometheus/common/version.BuildUser=stuartnelson@stuart.local -X github.com/prometheus/alertmanager/vendor/github.com/prometheus/common/version.BuildDate=20170420-17:49:51  -extldflags '-static' -a -tags netgo github.com/prometheus/alertmanager/cmd/amtool: exit status 2

The first error on syscall_dragonfly.go:60 is easy to fix, just change change Ino to Fileno. The other issue on line 68 I have no context for, however.

Let me know if I can provide any additional information.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions