sts10 / phraze

Generate random passphrases
https://sts10.github.io/2023/10/24/phraze-passphrase-generator.html
Mozilla Public License 2.0
24 stars 3 forks source link

Create statically linked musl binaries? #28

Closed yedayak closed 2 days ago

yedayak commented 3 days ago

Currently you can't run the released binaries on debian 10, rhel 8 or ubuntu 18.04, since they have GLIBC versions below 2.29. The unknown-linux-gnu binary in the release requires GLIBC 2.29:

$ objdump -T phraze  | grep 'GLIBC_2\.2[^.]'
0000000000000000  w   DF *UND*  0000000000000000 (GLIBC_2.25) getrandom
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.29) log2
0000000000000000  w   DF *UND*  0000000000000000 (GLIBC_2.28) statx

I think a good solution to this will be to create statically linked musl binaries, which should be able to run on any linux, regardless of glibc version.

sts10 commented 3 days ago

Hello! Thank you so much for submitting this issue.

I admit I don't know much about musl and building binaries in general -- I've been using cargo-dist to handle that for Phraze. I do know that cargo-dist has an option for building a musl binary that I hadn't been using for Phraze. I just enabled that and created a fresh release. Hopefully that satisfies your needs?

yedayak commented 2 days ago

Yes that seems to work, thank you very much! :)