-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
FrozenDueToAgeGoCommandcmd/gocmd/goNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
What version of Go are you using (go version)?
$ go version go version go1.16.4 linux/amd64
Does this issue reproduce with the latest release?
Yes.
It also reproduces with go1.17 devel.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="on" GOARCH="amd64" GOBIN="/home/manlio/.local/bin" GOCACHE="/home/manlio/.cache/go-build" GOENV="/home/manlio/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="*.local" GOMODCACHE="/home/manlio/.local/lib/go/pkg/mod" GONOPROXY="" GONOSUMDB="*.local" GOOS="linux" GOPATH="/home/manlio/.local/lib/go:/home/manlio/src/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/lib/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.16.4" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" 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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2831720649=/tmp/go-build -gno-record-gcc-switches" GOROOT/bin/go version: go version go1.16.4 linux/amd64 GOROOT/bin/go tool compile -V: compile version go1.16.4 uname -sr: Linux 5.12.5-arch1-1 /usr/lib/libc.so.6: GNU C Library (GNU libc) release release version 2.33. gdb --version: GNU gdb (GDB) 10.2
What did you do?
Using https://play.golang.org/p/LqHgq34kmVq:
$ CGO_ENABLED=0 GOOS=android GOARCH=386 go buildWhat I'm doing is to check if my package is buildable for the specified platform.
What did you expect to see?
An error, reporting that cgo is required for the platform but explicitly disabled by the user. The program should exit, instead of continuing.
What did you see instead?
loadinternal: cannot find runtime/cgo
/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: cannot find libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
collect2: error: ld returned 1 exit status
-
android/armreports:loadinternal: cannot find runtime/cgo /usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 gcc: error: unrecognized command-line option ‘-marm’; did you mean ‘-mabm’? -
android/amd64andandroid/arm64works -
ios/amd64andios/arm64reports:loadinternal: cannot find runtime/cgo /usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: cannot find 1144: No such file or directory /tmp/go-link-897956511/go.o: file not recognized: file format not recognized collect2: error: ld returned 1 exit status
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeGoCommandcmd/gocmd/goNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.