himalaya icon indicating copy to clipboard operation
himalaya copied to clipboard

version `GLIBC_2.29' not found (required by himalaya)

Open CompuRoot opened this issue 4 years ago • 1 comments

Still officially supported Debian versions 9, 10 won't run recent himalaya due to dependency on GLIBC_2.29.

Is it possible to compile himalaya against musl to make it truly portable or at least lower requirement to avoid be dependent on most recent GLIBC ?

CompuRoot avatar Apr 06 '22 14:04 CompuRoot

It is a very good question, I need to dig. Any help is welcomed!

soywod avatar Jul 13 '22 18:07 soywod

Is it possible to compile himalaya against musl to make it truly portable or at least lower requirement to avoid be dependent on most recent GLIBC ?

Have a look at the Rust doc, it looks like there is MUSL options out there. Let me know if it helps you.

soywod avatar Oct 11 '22 07:10 soywod

Tested it, one needs to jump a few hoops but it's doable:

  • Install musl and musl-gcc (on debian-ish, that's musl and musl-tools)

  • Install the musl target: rustup target install x86_64-unknown-linux-musl

  • Set these to make OpenSSL compile:

    xport PKG_CONFIG_ALLOW_CROSS=1
    xport OPENSSL_STATIC=true
    

    (this is where a rustls feature could be helpful)

  • Build it: cargo build --release --target x86_64-unknown-linux-musl

MCOfficer avatar Oct 12 '22 21:10 MCOfficer

I tried but it does not compile :disappointed: DSO missing from command line

soywod avatar Oct 13 '22 16:10 soywod

The only way I know to make truly portable across platform a program on amd64/linux is to spin out in virtual machine (or docker) with AlpineLinux (that natively using musl instead of glib ) and compile it there

CompuRoot avatar Oct 13 '22 16:10 CompuRoot

Yeah, that's probably easier. You don't even need a linux, here's me on Windows 10, with a little WSL to confirm it worked:

❯ docker run -v "${PWD}:/volume" --rm -t clux/muslrust:stable cargo build --release
 # magic is happening
❯ ubuntu2004 run ldd target/x86_64-unknown-linux-musl/release/himalaya 
        statically linked
❯ ubuntu2004 run ./target/x86_64-unknown-linux-musl/release/himalaya -V
himalaya 0.6.1

See https://github.com/clux/muslrust

MCOfficer avatar Oct 13 '22 16:10 MCOfficer

So technically I can add a musl build to the release via GitHub Actions? I will give a shot and let you know!

soywod avatar Oct 13 '22 17:10 soywod

So technically I can add a musl build to the release via GitHub Actions? I will give a shot and let you know!

Thank you! Unfortunately rust isn't my language where I can contribute :(

CompuRoot avatar Oct 14 '22 06:10 CompuRoot