Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: unable to cross-compile package with GO111MODULE=on #26975

Closed
jason-riddle opened this issue Aug 13, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@jason-riddle
Copy link

commented Aug 13, 2018

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

go version devel +f1c7faacf0 Sun Aug 12 19:56:28 2018 +0000 darwin/amd64

Does this issue reproduce with the latest release?

Currently using the go1.11beta3 release.

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/me/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/me/.go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/HEAD-f1c7faa/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/HEAD-f1c7faa/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/me/Workspaces/Play/alert-on-topic/go.mod"
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/r9/kkbp02d93mv2d74b9zc0zj9d16_9fr/T/go-build000803729=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

GO111MODULE=on GOARCH=amd64 GOOS=linux go build -o bin/debugger/dlv github.com/derekparker/delve/cmd/dlv

# github.com/derekparker/delve/pkg/proc
../../../.go/pkg/mod/github.com/derekparker/delve@v1.0.0/pkg/proc/disasm_amd64.go:46:26: not enough arguments in call to x86asm.GNUSyntax
	have (x86asm.Inst)
	want (x86asm.Inst, uint64, x86asm.SymLookup)
../../../.go/pkg/mod/github.com/derekparker/delve@v1.0.0/pkg/proc/disasm_amd64.go:50:28: not enough arguments in call to x86asm.IntelSyntax
	have (x86asm.Inst)
	want (x86asm.Inst, uint64, x86asm.SymLookup)

What did you expect to see?

It should cross-compile successfully as it does with GO111MODULE=off.

GO111MODULE=off GOARCH=amd64 GOOS=linux go build -o bin/debugger/dlv github.com/derekparker/delve/cmd/dlv

What did you see instead?

The build panics and exits.

@jason-riddle

This comment has been minimized.

Copy link
Author

commented Aug 13, 2018

Closing. This is not an issue with Go, but with delve instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.