go: x/sys/unix: relocation target golang.org/x/sys/unix.Syscall6 not defined for ABIInternal (but is defined for ABI0)
What version of Go are you using (go version)?
go version go1.12 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
GOARCH="amd64" GOBIN="" GOCACHE="/Users/mahmudulhaque/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/mahmudulhaque/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.12/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.12/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/3q/xcf0ldq11nn__8xv16hqhl6h0000gp/T/go-build887610377=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
$ vgo build
What did you expect to see?
Successful build.
What did you see instead?
golang.org/x/sys/unix.kevent: relocation target golang.org/x/sys/unix.Syscall6 not defined for ABIInternal (but is defined for ABI0) golang.org/x/sys/unix.Close: relocation target golang.org/x/sys/unix.Syscall not defined for ABIInternal (but is defined for ABI0) golang.org/x/sys/unix.Kqueue: relocation target golang.org/x/sys/unix.Syscall not defined for ABIInternal (but is defined for ABI0) golang.org/x/sys/unix.Open: relocation target golang.org/x/sys/unix.Syscall not defined for ABIInternal (but is defined for ABI0) golang.org/x/sys/unix.mmap: relocation target golang.org/x/sys/unix.Syscall6 not defined for ABIInternal (but is defined for ABI0) golang.org/x/sys/unix.munmap: relocation target golang.org/x/sys/unix.Syscall not defined for ABIInternal (but is defined for ABI0)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (7 by maintainers)
You need to update to a newer version of golang.org/x/sys/unix.
I managed to get around my issue after running:
Then did the
go get ....and all worked again no more errors.@devanshah2 In the Go 1.12 release all the features of vgo are available in the normal Go tool, if you set the environment variable GO111MODULE=on.
Tried to compile it with go 1.12 without using vgo
update sys/unix (just in case)
After these steps, all went fine. Without running
go get -u golang.org/x/sys/unixwhile GO111MODULE is on I was getting the error mentioned above.Upon further investigation it turned out that I already had package “golang.org/x/sys” pinned in go.mod, which was probably causing the issue with go 1.12 when using modules.
In the current golang.org/x/sys/unix sources,
keventon darwin/amd64 does not callSyscall6. I don’t see how you could get the errors you report with the current sources. Can you double check?