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

podman 3.2 fails to build from source (FTBFS) on all architectures that are not amd64, arm64 #10625

Closed
siretart opened this issue Jun 9, 2021 · 3 comments · Fixed by #10634
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@siretart
Copy link
Contributor

siretart commented Jun 9, 2021

/kind bug

Please consider the buildlogs at https://buildd.debian.org/status/package.php?p=libpod&suite=experimental

Right now, amd64 and arm64 are the only architectures that podman can build on. On all other architectures, the build fails with:

# github.com/containers/podman/pkg/machine
src/github.com/containers/podman/pkg/machine/fcos.go:26:15: undefined: getFCOSDownload

The reason is that the function getFCOSDownload is implemented only for these two archs at:

Please provide either a buildflag to disable this library/functionality or a generic implementation that allows compilation on other architectures.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 9, 2021
@mheon
Copy link
Member

mheon commented Jun 10, 2021

We'll need a fix for this landed before we release 3.2.1 tomorrow. @baude is on PTO, so I guess I'll take a look (unless @ashley-cui has time?)

@Luap99
Copy link
Member

Luap99 commented Jun 10, 2021

This compiles just fine. The package pkg/machine is never called on non supported architectures so it should not be pulled in.

I can see in the linked build logs that go install is called for every single package in the repository and thus go install pkg/machine is failing. I do not know why this is done but I guess we should add the same buildtags from cmd/podman to this package.

Luap99 added a commit to Luap99/libpod that referenced this issue Jun 10, 2021
Podman machine is only intended for amd64 and arm64 architectures, set
the correct buildtags so that the `pkg/machine`, `pkg/machine/qemu` and
`pkg/machine/libvirt` packages compile correctly.

[NO TESTS NEEDED]

Fixes containers#10625

Signed-off-by: Paul Holzinger <[email protected]>
@siretart
Copy link
Contributor Author

thank you for the very quick turnaround!

@Luap99 -- I didn't invent the golang debhelper that drives the compilation of golang applications in Debian package builds. I guess this, let's call it "interesting" design decision, was made to allow to "unvendor" sources easily. The debian package build would first identify all sources, copy them to a temporary directory, create symlink farms to /usr/share/gocode/src/... and then start with go build, go install, etc.. As a package maintainer, I do have influence over the targets that it builds, in fact, I had to exclude a number of targets that don't need to be built (cf. https://salsa.debian.org/debian/libpod/-/blob/d99bceebd6aca473dca9b5537b9c1018894aa4c2/debian/rules#L16). I could add pkg/machine to that list on !arm64, !amd64, but your suggestion with the build tags seems much much cleaner to me. So thanks again!

mheon pushed a commit to mheon/libpod that referenced this issue Jun 11, 2021
Podman machine is only intended for amd64 and arm64 architectures, set
the correct buildtags so that the `pkg/machine`, `pkg/machine/qemu` and
`pkg/machine/libvirt` packages compile correctly.

[NO TESTS NEEDED]

Fixes containers#10625

Signed-off-by: Paul Holzinger <[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 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. 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.

4 participants