app icon indicating copy to clipboard operation
app copied to clipboard

linux: support use with older GLIBC?

Open vamega opened this issue 2 years ago • 4 comments

Running this on an Amazon Linux 2 machine, I immediately see it fail.

> sourcegraph --help
sourcegraph: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by sourcegraph)

I'm using the single binary download for linux here. Would it be possible to build this targeting an older GLIBC version? I'm not sure what the the go toolchain you're using requires.

vamega avatar Apr 07 '23 16:04 vamega

Thanks for reporting this.

The solution here is a bit tricky due to many build processes being involved, so I cannot make any guarantees about timeline for fixing this, but we will definitely keep this in mind as we iterate on build system improvements and will keep you posted.

emidoots avatar Apr 12 '23 22:04 emidoots

I got it working today by using nix to patch the binary. I’ll share the nix derivation for the binary in the morning for anyone else who might want to do this.

Thanks for making the app. Having a single binary made me think it was worth trying to set up, and I doubt I would have done it without this.

Was looking through the source code and saw that this involves an embedding of Postgres into the binary 🤯.

vamega avatar Apr 13 '23 02:04 vamega

Here's a gist of the derivation I had in my own nix config that I was able to use to get the app running on the system that comes with an older Glibc.

https://gist.github.com/vamega/cb52091f24bdc8d4c6a3a120c8787816

vamega avatar Apr 18 '23 00:04 vamega

I packaged it up into a nix flake, so on a flake enabled nix system, running this can be as simple as

nix run github:vamega/nix-sourcegraph-app

I'll try to add this to nixpkgs so this can be even simpler for nix users, for now this should be a solution for some subset of users who ran into this issue.

vamega avatar Apr 18 '23 03:04 vamega