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: can't load package: build constraints exclude all Go files in #24433

Closed
pjebs opened this issue Mar 16, 2018 · 5 comments
Closed

cmd/go: can't load package: build constraints exclude all Go files in #24433

pjebs opened this issue Mar 16, 2018 · 5 comments

Comments

@pjebs
Copy link
Contributor

pjebs commented Mar 16, 2018

I attempted to cross-compile something on my darwin-amd64 machine.

It kept saying can't load package: package .: build constraints exclude all Go files in

I had no build constraints in any of my files or dependency packages.

This confused me for hours as I kept trying different things until I realised it was because I was using cgo.

I think the error message should be more explanatory in c-go cross compilation situations.

For future readers:
https://github.com/karalabe/xgo

@mvdan
Copy link
Member

mvdan commented Mar 17, 2018

Seems like a duplicate of #24068.

@ALTree ALTree changed the title can't load package: package .: build constraints exclude all Go files in cmd/go: can't load package: build constraints exclude all Go files in Mar 17, 2018
@ALTree
Copy link
Member

ALTree commented Mar 19, 2018

Yes, this is a dup of #24068. We can keep this as a search-able reference for that error on the issue tracker, but let's close it.

@simPod
Copy link

simPod commented Jan 8, 2019

How this error can be solved? Thanks.

@GoutamHub
Copy link

I am also facing the same issue. How this error can be solved?

@mvdan
Copy link
Member

mvdan commented Feb 3, 2019

This issue was closed as a duplicate of another; see #24068 and all the details there.

@golang golang locked as resolved and limited conversation to collaborators Feb 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants