You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=
set GOARCH=386
set GOBIN=
set GOCACHE=C:\Users\basse\AppData\Local\go-build
set GOENV=C:\Users\basse\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\basse\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\basse\go;C:\Users\basse\source\repos\xhptdc8_babel\go\info\src-cgo;
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.16.2
set GCCGO=gccgo
set GO386=sse2
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=C:\Users\basse\source\repos\xhptdc8_babel\go\info\hello\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m32 -fmessage-length=0 -fdebug-prefix-map=C:\Users\basse\AppData\Local\Temp\go-build4135007010=/tmp/go-build -gno-record-gcc-switches
What did you do?
I'm using CGO package to import C code, and I want to build an x86 (386) windows version of it. I found out this should be done by setting GOARCH=386.
While it builds properly on my default environment settings (GOARCH=amd64), when I set the environment variable to "386", I get error: build constraints exclude all Go files inmy file.
With // +build windows,386 or // +build windows,386,!cgo before package main I still get the same error
What did you expect to see?
No Error
What did you see instead?
C:\Users\basse\source\repos\xhptdc8_babel\go\info\hello>go build
package hello: build constraints exclude all Go files in C:\Users\basse\source\repos\xhptdc8_babel\go\info\hello
The text was updated successfully, but these errors were encountered:
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm using CGO package to import C code, and I want to build an x86 (386) windows version of it. I found out this should be done by setting GOARCH=386.
While it builds properly on my default environment settings (GOARCH=amd64), when I set the environment variable to "386", I get error:
build constraints exclude all Go files in
my file.go.mod
I do
Trials:
import "C"
, I get no error.// +build windows,386
or// +build windows,386,!cgo
before package main I still get the same errorWhat did you expect to see?
No Error
What did you see instead?
C:\Users\basse\source\repos\xhptdc8_babel\go\info\hello>go build package hello: build constraints exclude all Go files in C:\Users\basse\source\repos\xhptdc8_babel\go\info\hello
The text was updated successfully, but these errors were encountered: