taskell
taskell copied to clipboard
Compile with musl to avoid GLIBC issues
I downloaded the binary and it gave this error:
╰─❯ ./taskell
./taskell: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by ./taskell)
My system info:
╰─❯ uname -a
Linux szafarlinux.gurg-off.tower-research.com 4.15.0-128-generic #131~16.04.1-Ubuntu SMP Wed Dec 9 17:33:47 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
╰─❯ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.7 LTS"
I've noticed that static binaries of other languages (written in Go / Rust) work well when they're compiled with musl instead of glibc.
I have no experience with haskell but found this: https://github.com/utdemir/ghc-musl
I'll have a look into this
Looks like the Stackage Docker images aren't up to date at the moment, which means I can't build for Linux using that, so this might solve both problems!
@dufferzafar I've tried building a version of 1.11.0 using musl. Could you give it a go and let me know if it works for you?
Had a play around with this some more today and after a couple of hours of trying stuff I didn't get anywhere.
Is there any strong reason to not just install glibc?
@dufferzafar I've tried building a version of 1.11.0 using
musl. Could you give it a go and let me know if it works for you?
Hi, just to update you on this, I am on Alpine Linux using musl as well. Couldn't use the linux binary from Releases but the one in this tar worked fine!
So if it's not a problem, whatever process you used to generate it, it could be used to have a linux_musl tar in subsequent releases if it's not a bother :)
Unfortunately I didn't document how I did it the first time and I couldn't get it to work on a more recent build.
But I'll try again at some point.