taskell icon indicating copy to clipboard operation
taskell copied to clipboard

Compile with musl to avoid GLIBC issues

Open dufferzafar opened this issue 4 years ago • 6 comments

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

dufferzafar avatar Mar 19 '21 07:03 dufferzafar

I'll have a look into this

smallhadroncollider avatar Mar 30 '21 10:03 smallhadroncollider

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!

smallhadroncollider avatar Mar 31 '21 07:03 smallhadroncollider

@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?

taskell-1.11.0_x86-64-linux.tar.gz

smallhadroncollider avatar Mar 31 '21 08:03 smallhadroncollider

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?

smallhadroncollider avatar Jul 14 '21 10:07 smallhadroncollider

@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?

taskell-1.11.0_x86-64-linux.tar.gz

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 :)

tadeaspaule avatar Aug 19 '21 06:08 tadeaspaule

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.

smallhadroncollider avatar Aug 19 '21 19:08 smallhadroncollider