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

GO111MODULE=off go build failure #10009

Closed
lsm5 opened this issue Apr 13, 2021 · 2 comments · Fixed by #10010
Closed

GO111MODULE=off go build failure #10009

lsm5 opened this issue Apr 13, 2021 · 2 comments · Fixed by #10010
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@lsm5
Copy link
Member

lsm5 commented Apr 13, 2021

package types // import "github.com/docker/docker/api/types"

This works just fine in the regular case, but fails whenever GO111MODULE=off is used, like rpm and deb package cases.

$ GO111MODULE=off CGO_ENABLED=1 go build -o bin/podman ./cmd/podman
pkg/domain/entities/system.go:8:2: code in directory /home/lsm5/go/src/github.com/containers/podman/pkg/domain/entities/types expects import "github.com/docker/docker/api/types"

@rhatdan @vrothberg @baude @mheon PTAL.

@cevich Going forward, we should also include a CI job for GO111MODULE=off go build. I can look at doing a PR for that.

@lsm5
Copy link
Member Author

lsm5 commented Apr 13, 2021

So, if you remove // import "github.com/docker/docker/api/types from pkg/domain/entities/types/{auth.go,types.go}` the build works fine with GO111MODULE=off. Just wanna confirm if that's the right fix or if it breaks something else.

@lsm5
Copy link
Member Author

lsm5 commented Apr 13, 2021

sends PR..

lsm5 added a commit to lsm5/podman that referenced this issue Apr 15, 2021
Distro builds on Fedora and Kubic projects use GO111MODULE=off
by default which are currently failing. This commit fixes it and
going forward, podman CI will also indicate failures in rpm builds.

The additional LDFLAGS have been removed  from the spec file
which is not ideal. But, currently we only use the spec file
to check if the rpm builds fine. We can fix the LDFLAGS in a
later commit when we're working on packit integration.

conmon build has also been removed from podman.spec.in because the COPR
for which it was provided has been discontinued.

[NO TESTS NEEDED]

Fixes: containers#10009

Signed-off-by: Lokesh Mandvekar <[email protected]>
mheon pushed a commit to mheon/libpod that referenced this issue Apr 16, 2021
Distro builds on Fedora and Kubic projects use GO111MODULE=off
by default which are currently failing. This commit fixes it and
going forward, podman CI will also indicate failures in rpm builds.

The additional LDFLAGS have been removed  from the spec file
which is not ideal. But, currently we only use the spec file
to check if the rpm builds fine. We can fix the LDFLAGS in a
later commit when we're working on packit integration.

conmon build has also been removed from podman.spec.in because the COPR
for which it was provided has been discontinued.

[NO TESTS NEEDED]

Fixes: containers#10009

Signed-off-by: Lokesh Mandvekar <[email protected]>
jmguzik pushed a commit to jmguzik/podman that referenced this issue Apr 26, 2021
Distro builds on Fedora and Kubic projects use GO111MODULE=off
by default which are currently failing. This commit fixes it and
going forward, podman CI will also indicate failures in rpm builds.

The additional LDFLAGS have been removed  from the spec file
which is not ideal. But, currently we only use the spec file
to check if the rpm builds fine. We can fix the LDFLAGS in a
later commit when we're working on packit integration.

conmon build has also been removed from podman.spec.in because the COPR
for which it was provided has been discontinued.

[NO TESTS NEEDED]

Fixes: containers#10009

Signed-off-by: Lokesh Mandvekar <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant