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: confusing "build constraints exclude all Go files" error when trying to import a package that uses CGO #73133

Closed
bifee opened this issue Apr 2, 2025 · 2 comments
Labels
BugReport Issues describing a possible bug in the Go implementation.

Comments

@bifee
Copy link

bifee commented Apr 2, 2025

Go version

go version go1.23.4 linux/amd64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/bif/.cache/go-build'
GOENV='/home/bif/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/bif/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/bif/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/bif/Codes/go-std-1-23-4'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/bif/Codes/go-std-1-23-4/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.4'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/bif/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/bif/Codes/go-std-1-23-4/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 -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build646550582=/tmp/go-build -gno-record-gcc-switches'

What did you do?

i execute the command:
./make.bash

What did you see happen?

it return the following error:
imports github.com/open-quantum-safe/liboqs-go/oqs: build constraints exclude all Go files in /home/bif/Codes/go-std-1-23-4/src/vendor/github.com/open-quantum-safe/liboqs-go/oqs

What did you expect to see?

Building without errors.

Context:
I create a package crypto/hybrid that uses liboqs and cgo. the problem is ocurring when i import that package to the x509 package.

I alrealdy tried CGO_ENABLE = 1 but didn't work

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Apr 2, 2025
@seankhliao
Copy link
Member

As this is not part of a supported release:
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.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation.
Projects
None yet
Development

No branches or pull requests

3 participants