-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: cgo-enabled binary built with Ubuntu 22.04 is incompatible with Ubuntu 20.04 #57328
Comments
Is this a regression from a previous release? (Did it ever work?) |
Previously releases have been build on Ubuntu 20.04 on Github Actions (we are using the |
@golang/compiler |
I think
We can bust the cache in other ways, too (such as by setting
|
And in Go 1.20, you will see the newer symbols on all builds because we're not shipping precompiled archives at all (#47257). 😅 |
The workarounds I can see for your use-case are:
|
But, I am left a little bit puzzled about one thing: I don't expect I'll file a separate issue to look into that. |
I've filed #57346 for the cache-invalidation behavior. Otherwise, I don't think there is anything we can feasibly do for this on the |
Yeah, we will go with that. Since we control most execution environments, this is doable and easiest. I mainly reported this since this was surprising to me and non-obvious from the Thanks for looking into this so quickly! |
Due to recent changes, the plugin image build has failed. The following changes has been added: 1. Fixing the command name in the DaemonSet spec 2. Pin golang to 1.20 3. Running the go build command with the right arguments 4. changing CGO_ENABLED=0 - The binary failed to execute and complains about GLIBC_2.32 not found. Running with CGO_ENABLED=0 build a binary that doesn't depend on glibc: golang/go#57328 (comment) Signed-off-by: Talor Itzhak <titzhak@redhat.com>
Due to recent changes, the plugin image build has failed. The following changes has been added: 1. Fixing the command name in the DaemonSet spec 2. Pin golang to 1.20 3. Running the go build command with the right arguments 4. changing CGO_ENABLED=0 - The binary failed to execute and complains about GLIBC_2.32 not found. Running with CGO_ENABLED=0 build a binary that doesn't depend on glibc: golang/go#57328 (comment) Signed-off-by: Talor Itzhak <titzhak@redhat.com>
1.19.10 includes a change on linked libraries that's messing up our manager binary see golang/go#47257 and golang/go#57328 (issues are closed, but the error is the same)
Due to golang/go#57328, binaries built on Github's "ubuntu-latest" don't run on Ubuntu 20.04. Setting CGO_ENABLED=0 at build fixes this. Since we don't rely on CGO in this repo, this seems like the easiest fix.
By default we are relying on cgo for DNS resolution, which causes binaries built on ubuntu 22.04 to break on ubuntu 20.04 due to some changes in glibc. See golang/go#57328 This changes us to not rely on that, which causes builds to succeed.
By default we are relying on cgo for DNS resolution, which causes binaries built on ubuntu 22.04 to break on ubuntu 20.04 due to some changes in glibc. See golang/go#57328 This changes us to not rely on that, which causes builds to succeed.
The CircleCI go build images' toolchain depends on a version of GLIBC that is higher than the version that ships on Ubuntu 20.04. This means users trying to install the released binaries on Ubuntu 20.04 will see: ``` $ gptcli gptcli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by gptcli) gptcli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by gptcli) ``` This commit attempts to mitigate the problem by building w/ CGO_ENABLED=0 as suggested by: golang/go#57328
The CircleCI go build images' toolchain depends on a version of GLIBC that is higher than the version that ships on Ubuntu 20.04. This means users trying to install the released binaries on Ubuntu 20.04 will see: ``` $ bashgpt bashgpt: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bashgpt) bashgpt: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by bashgpt) ``` This commit attempts to mitigate the problem by building w/ CGO_ENABLED=0 as suggested by: golang/go#57328
The CircleCI go build images' toolchain depends on a version of GLIBC that is higher than the version that ships on Ubuntu 20.04. This means users trying to install the released binaries on Ubuntu 20.04 will see: ``` $ spotsh spotsh: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by spotsh) spotsh: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by spotsh) ``` This commit attempts to mitigate the problem by building w/ CGO_ENABLED=0 as suggested by: golang/go#57328
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
This is the latest stable release from the website.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Building a minimal binary (using
net/http
code) with-trimpath
on Ubuntu 22.04 makes it incompatible with Ubuntu 20.04:Copying the resulting binary to an Ubuntu 20.04 machine yields the following error:
Dropping
-trimpath
from thego build
call and the binary works.What did you expect to see?
Invoking
main-jammy
on an Ubuntu 20.04 machine should yieldHello World
and start a webserver.What did you see instead?
Context
Github Actions is currently rolling out Ubuntu 22.04 for its
ubuntu-latest
tag and as a result some of our releases are becoming invalid with Ubuntu 20.0.The text was updated successfully, but these errors were encountered: