go version
)?go version go1.12 darwin/amd64
Yes
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"
$ vgo build
Successful build.
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)
I have the same issue though I use just go
not vgo
.
You need to update to a newer version of golang.org/x/sys/unix.
I have the same issue though I use just
go
notvgo
.
From go doc vgo
:
Vgo is a prototype of what the go command might look like with integrated support for package versioning.
Download and install with:
go get -u golang.org/x/vgo
_Then run "vgo" instead of "go"._
You need to update to a newer version of golang.org/x/sys/unix.
Already did.
go get -u golang.org/x/sys/unix
In the current golang.org/x/sys/unix sources, kevent
on darwin/amd64 does not call Syscall6
. I don't see how you could get the errors you report with the current sources. Can you double check?
Facing this issue after upgrading to Go 1.12.
Strange! I can build a project from scratch.
@mmhyamin What is the git revision of your golang.org/x/sys/unix sources?
@mmhyamin What is the git revision of your golang.org/x/sys/unix sources?
c2f5717
I am facing the same issue as well.
There is some info on 1.12 compatibility
The compiler toolchain now uses different conventions to call Go functions and assembly functions. This should be invisible to users, except for calls that simultaneously cross between Go and assembly and cross a package boundary. If linking results in an error like "relocation target not defined for ABIInternal (but is defined for ABI0)", please refer to the compatibility section of the ABI design document.
And https://github.com/bazelbuild/rules_go/issues/1893 but so far I can't any useful info on how to fix it.
vgo version
go version go1.12 linux/amd64 vgo:devel +b0a1c5df98
Edit:
my errors:
vgo build wwserver.go
# command-line-arguments
golang.org/x/sys/unix.ioctl: relocation target golang.org/x/sys/unix.Syscall 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)
golang.org/x/sys/unix.mmap: relocation target golang.org/x/sys/unix.Syscall6 not defined for ABIInternal (but is defined for ABI0)
@alekc It sounds like you are building with Bazel? Bazel may need to be updated to support the new ABI support.
I don't know what the status of vgo
is.
Nope I am building with vgo, Bazel is not involved. Weird thing is that I
am able to compile it without any issue on windows with
go version go1.12 windows/amd64 vgo:devel +b0a1c5df98
but if fails during compilation on linux (Debian Jessie).
There might be some dll issue, but so far I couldn't find what it is. Since
the project is in development phase for now, I've switched to Go 1.11 for
linux compilation.
On Wed, 13 Mar 2019 at 02:34, Ian Lance Taylor notifications@github.com
wrote:
@alekc https://github.com/alekc It sounds like you are building with
Bazel? Bazel may need to be updated to support the new ABI support.I don't know what the status of vgo is.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/30427#issuecomment-472255631, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AASe15Up55DdAdWOvj59J5QbGAqZPengks5vWGO_gaJpZM4bTy62
.
Has vgo been kept up to date with Go 1.12? Why not use the normal go tool? I think that at this point everything in vgo has been moved to the the go tool.
I am also facing the same issue as reported here as well.
Go version: go version go1.12 darwin/amd64
vgo version: go version go1.12 darwin/amd64 vgo:devel +b0a1c5df98
Getting error:
# command-line-arguments
golang.org/x/sys/unix.libc_ioctl_trampoline·f: relocation target golang.org/x/sys/unix.libc_ioctl_trampoline not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.libc_mmap_trampoline·f: relocation target golang.org/x/sys/unix.libc_mmap_trampoline not defined for ABIInternal (but is defined for ABI0)
golang.org/x/sys/unix.libc_munmap_trampoline·f: relocation target golang.org/x/sys/unix.libc_munmap_trampoline not defined for ABIInternal (but is defined for ABI0)
@devanshah2 Why are you using vgo?
Has vgo been kept up to date with Go 1.12? Why not use the normal go tool? I think that at this point everything in vgo has been moved to the the go tool.
I guess it's just a habit. I have not been working on go releases for a while, but recent changes in the company made me switch to building process. I will have a look into compilation by using go + modules.
@devanshah2 Why are you using vgo?
Using it for dependency management instead of dep
.
@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.
@ianlancetaylor Cool. Thanks
I will re-try with a clean environment where it is only go installed and no more vgo.
Tried to compile it with go 1.12 without using vgo
# go version
go version go1.12 linux/amd64
update sys/unix (just in case)
# export GO111MODULE=on
# go get -u golang.org/x/sys/unix
go: finding golang.org/x/sys/unix latest
go: finding golang.org/x/sys latest
go: downloading golang.org/x/sys v0.0.0-20190318195719-6c81ef8f67ca
go: extracting golang.org/x/sys v0.0.0-20190318195719-6c81ef8f67ca
After these steps, all went fine. Without running go get -u golang.org/x/sys/unix
while 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.
I managed to get around my issue after running:
go clean -i -cache -x -r
Then did the go get ....
and all worked again no more errors.
Most helpful comment
I managed to get around my issue after running:
Then did the
go get ....
and all worked again no more errors.