You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GOOS="$goos" GOARCH="$goarch" go build -trimpath -ldflags="-s -w" -o "dist/${p}${ext}"
builds without setting it, so (as far as I know) cgo is disabled for cross-compilation, but enabled when building for the target architecture of the runner.
As a result, if I use an ubuntu-22.04 runner, but then install the extension on an older Ubuntu such as 20.04, I get glibc.so mismatches like this:
/home/benjamin/.local/share/gh/extensions/gh-myextension/gh-myextension: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/benjamin/.local/share/gh/extensions/gh-myextension/gh-myextension)
/home/benjamin/.local/share/gh/extensions/gh-myextension/gh-myextension: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/benjamin/.local/share/gh/extensions/gh-myextension/gh-myextension)
When running this on an Ubuntu runner, the binaries for linux-amd64 use
CGO_ENABLED=1
:gh-extension-precompile/build_and_release.sh
Line 49 in ea409c0
builds without setting it, so (as far as I know) cgo is disabled for cross-compilation, but enabled when building for the target architecture of the runner.
As a result, if I use an
ubuntu-22.04
runner, but then install the extension on an older Ubuntu such as 20.04, I get glibc.so mismatches like this:This can be fixed by explicitly disabling cgo:
Maybe this should be the default, or at least documented in the README?
The text was updated successfully, but these errors were encountered: