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

net: program cross-compiled for darwin/arm64 from linux/amd64 is SIGKILLed since CL 446178 #56599

Closed
danp opened this issue Nov 5, 2022 · 3 comments

Comments

@danp
Copy link
Contributor

danp commented Nov 5, 2022

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

$ go version
go version devel go1.20-a3559f3301 Tue Nov 1 14:05:39 2022 +0000 linux/amd64

Does this issue reproduce with the latest release?

No

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

go env Output from linux/amd64 system
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/danp/.cache/go-build"
GOENV="/home/danp/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/danp/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/danp/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/danp/tmp/go-src"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/danp/tmp/go-src/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel go1.20-a3559f3301 Tue Nov 1 14:05:39 2022 +0000"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build501119918=/tmp/go-build -gno-record-gcc-switches"
go env Output from darwin/arm64 system
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/dan/Library/Caches/go-build"
GOENV="/Users/dan/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/dan/Library/Caches/go-mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/dan/src"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/dan/src/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/dan/src/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="devel go1.20-a343f4017b Fri Nov 4 23:20:35 2022 +0000"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/dan/src/go/src/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/cp/3cmnrnds4j72mrgplhz2wr0w0000gn/T/go-build4108380886=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Using go tip at a3559f3 or later, I cross-compiled this program on my linux/amd64 system for my darwin/arm64 system with:

GOOS=darwin GOARCH=arm64 go build

And then tried running it on my darwin/arm64 system.

What did you expect to see?

A list of addresses or a panic.

What did you see instead?

fish: Job 1, './example' terminated by signal SIGKILL (Forced quit)
@seankhliao
Copy link
Member

cc @rsc

@danp
Copy link
Contributor Author

danp commented Nov 5, 2022

Thought I also tested a commit before a3559f3 but maybe not, doing that now. Perhaps I missed a step to bless the binary somehow. Using Go 1.19 downloaded from https://go.dev/dl works, at least.

@danp
Copy link
Contributor Author

danp commented Nov 5, 2022

Argh, it does seem to be a signing/blessing issue. Forgot about all that as I don't usually cross-compile this direction. Will close this, sorry for the noise.

@danp danp closed this as completed Nov 5, 2022
@golang golang locked and limited conversation to collaborators Nov 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants