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

SF 1.10 does not work with Debian? #219

Closed
jaknz opened this issue Mar 26, 2023 · 4 comments
Closed

SF 1.10 does not work with Debian? #219

jaknz opened this issue Mar 26, 2023 · 4 comments
Labels

Comments

@jaknz
Copy link

jaknz commented Mar 26, 2023

Caveat that due to system security, I can't add the apt repo and install the normal way. I have downloaded the release binaries, but when I try to run them on latest Debian Bullseye, it complains that I'm missing GLIBC v2.32 and/or v2.34. Latest version available to me is 2.31-13+deb11u5. Has anyone else seen this, and am I just missing something obvious? SF v1.9 works fine, so maybe v1.10 is using too new of a library?
/usr/local/bin/sf: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.32' not found (required by /usr/local/bin/sf)
libc-bin/stable,stable-updates,now 2.31-13+deb11u5 amd64 [installed]

@ross-spencer
Copy link
Collaborator

There's some discussion here about disabling CGO: CGO_ENABLED=0 aws/aws-lambda-go#340 (comment). Also: https://stackoverflow.com/a/65919767/21120938.

It maybe that it needs to be disabled in the release pipeline?

@richardlehane
Copy link
Owner

richardlehane commented Mar 27, 2023

root cause of this seems to be go 1.20 no longer including pre-compiled packaged archives of the std library (https://go.dev/doc/go1.20#go-command).

As @ross-spencer notes, if CGO is disabled this isn't an issue.

I checked dependencies on CGO in siegfried and seems to be due to use of three std lib packages:

  • "net": is imported by cmd/fpr.go (this is a special socket-based API that doesn't see much use). It could be omitted with a build tag if it causes problems without CGO
  • "os/user" is imported by pkg/config/default.go. This can already be omitted by a build tag (e.g. -brew tag changes default home directory location to /usr/share/siegfried)
  • "runtime/cgo" used by pkg/lib. This package isn't used at the moment and is work in progress for a shared library build of sf. Can be omitted.

I've added new linux binaries to the releases page with CGO disabled.

I think these new linux binaries should work just as well as the normal builds but I'll do some testing before the next release to see if disabling CGO can be made part of the standard release process.

@jaknz
Copy link
Author

jaknz commented Mar 27, 2023

root cause of this seems to be go 1.20 no longer including pre-compiled packaged archives of the std library (https://go.dev/doc/go1.20#go-command).

As @ross-spencer notes, if CGO is disabled this isn't an issue.

I checked dependencies on CGO in siegfried and seems to be due to use of three std lib packages:

  • "net": is imported by cmd/fpr.go (this is a special socket-based API that doesn't see much use). It could be omitted with a build tag if it causes problems without CGO
  • "os/user" is imported by pkg/config/default.go. This can already be omitted by a build tag (e.g. -brew tag changes default home directory location to /usr/share/siegfried)
  • "runtime/cgo" used by pkg/lib. This package isn't used at the moment and is work in progress for a shared library build of sf. Can be omitted.

I've added new linux binaries to the releases page with CGO disabled.

I think these new linux binaries should work just as well as the normal builds but I'll do some testing before the next release to see if disabling CGO can be made part of the standard release process.

That seems to have fixed it, thanks so much for your help. Good luck disentangling the larger dependency!

@richardlehane
Copy link
Owner

just to note: for the v1.10.1 the linux binaries (in the deb package and the zip downloads) have all been built with CGO disabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants