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

Static Build for #11728 isn't static #12198

Closed
gliptak opened this issue Nov 7, 2021 · 8 comments · Fixed by #12235
Closed

Static Build for #11728 isn't static #12198

gliptak opened this issue Nov 7, 2021 · 8 comments · Fixed by #12235
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

@gliptak
Copy link
Contributor

gliptak commented Nov 7, 2021

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Downloaded Static Build for #11728 isn't static

ldd podman
./podman: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./podman)
./podman: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./podman)
	linux-vdso.so.1 (0x00007ffc47492000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc78e5cd000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc78e5c7000)
	libgpgme.so.11 => /lib/x86_64-linux-gnu/libgpgme.so.11 (0x00007fc78e576000)
	libassuan.so.0 => /lib/x86_64-linux-gnu/libassuan.so.0 (0x00007fc78e561000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fc78e53e000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc78e533000)
	libseccomp.so.2 => /lib/x86_64-linux-gnu/libseccomp.so.2 (0x00007fc78e50f000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc78e31d000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fc78e60b000)
ldd podman-remote 
./podman-remote: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./podman-remote)
./podman-remote: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./podman-remote)
	linux-vdso.so.1 (0x00007fff29bdb000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f52e5230000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f52e522a000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f52e5038000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f52e526e000)

Steps to reproduce the issue:

  1. Download (current) Static Build

  2. Validate with ldd

Describe the results you received:

Describe the results you expected:

ldd podman
	not a dynamic executable

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

N/A

#10656
#10679
#8943

Additional environment details (AWS, VirtualBox, physical, etc.):

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 7, 2021
@gliptak gliptak changed the title Staic Build for #11728 isn't static Static Build for #11728 isn't static Nov 7, 2021
@mheon
Copy link
Member

mheon commented Nov 8, 2021

What do you mean by "Downloaded static build" for that issue? It's not a release so no build is associated with it? Are you trying to download a specific static build for a specific release? Please be more specific.

@rhatdan
Copy link
Member

rhatdan commented Nov 8, 2021

We don't support static builds. If users want static builds they should attempt to do them on their own.

@rhatdan rhatdan closed this as completed Nov 8, 2021
@gliptak
Copy link
Contributor Author

gliptak commented Nov 8, 2021

@mheon I'm referring to Staic Build section on https://cirrus-ci.com/build/6564084112949248 (sorry Cirrus isn't very linking friendly)

image

@rhatdan the main README specifically highlights static build for testing purposes https://github.com/containers/podman/blob/main/README.md#static-binary-builds

#12197

@mheon
Copy link
Member

mheon commented Nov 8, 2021

@cevich PTAL

@mheon mheon reopened this Nov 8, 2021
@cevich
Copy link
Member

cevich commented Nov 8, 2021

Hmm, indeed it doesn't appear to be working properly. I wonder if this warning message gives any clue as to why. In any case, I didn't write the static-build task nor do I fully understand the underlying build system 😕 We'll need to tap the person who set this up, and I can't remember who that is off-hand, we'll need to go digging through git history...

@cevich
Copy link
Member

cevich commented Nov 8, 2021

@hswong3i or @saschagrunert either of you can tell what might be going wrong here? I will add that we do pre-build non-static ./bin/podman and ./bin/podman-remote, so maybe those are getting in the way somehow?

@hswong3i
Copy link
Collaborator

hswong3i commented Nov 9, 2021

Sorry that I may no longer contribute for static build maintenance, since I had shift my focus to per-OS native deb/rpm packaging: https://build.opensuse.org/project/show/home:alvistack

e.g. When https://github.com/containers/podman/releases/tag/v3.4.1 released, I could taking care its packaging within 30mins for both Ubuntu/Debian/CentOS/Fedora/openSUSE recent releases as below:

Also some limitation for static build:

  • Some platform native compile flag need to build with dynamic for better support, e.g. libsystemd-dev, libseccomp-dev, libapparmor-dev, selinux, etc
  • Maintain static build support with Nix's upstream changes is extremely time consuming
  • A single static build binary usually not enough for production installation, e.g. missing systemd service files, config file, etc. If we handle that with Makefile or .tar.gz archive then we are most likely redoing what deb/rpm packaging system duty
  • Single static binary also didn't handle package dependency, e.g. podman depends on crun, conmon, containers-common, etc. With deb/rpm packaging again this is super simple
  • It is difficult for system admin to handle static binary upgrade and inventory auditing (with deb/rpm we could simply use apt-get upgrade and dpkg-query -l to handle it)
  • About build and distribute: with static binary I need to build it locally and upload to GitHub release manually, where with https://build.opensuse.org + https://build.opensuse.org/package/show/openSUSE:Tools/osc I could quickly do a mockup build with my local Ubuntu 21.10, then push with osc and all being automated.

Please kindly forgive me for no longer contributing static binary build; but switching to OBS + osc is super easy and greatly reduce my daily workload.

P.S. kubic toolchain for podman/cri-o always conflict with kubernetes official https://apt.kubernetes.io/ or https://packages.cloud.google.com/; in order to making them all working well together I am now maintenance 300+ OBS-based packages, with daily update ;-)

saschagrunert added a commit to saschagrunert/podman that referenced this issue Nov 9, 2021
We now do not copy the `bin` directory to the target nix sources to
avoid skipping the build because "everything is up to date".

Fixes containers#12198

Signed-off-by: Sascha Grunert <[email protected]>
@saschagrunert
Copy link
Member

saschagrunert commented Nov 9, 2021

The issue seems to be in those lines: https://cirrus-ci.com/task/5724808781496320?logs=main#L421-L423

We copy the bin directory to the target sources and therefore the Makefile thinks everything is already up to date.

Fix is incoming in #12235

mheon pushed a commit to mheon/libpod that referenced this issue Nov 12, 2021
We now do not copy the `bin` directory to the target nix sources to
avoid skipping the build because "everything is up to date".

Fixes containers#12198

Signed-off-by: Sascha Grunert <[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.

6 participants