danielewood / vanityssh-go

vanityssh-go allows you to generate ED25519 private keys with vanity public keys
MIT License
38 stars 10 forks source link

Make Linux amd64 binary static #9

Open AnimMouse opened 1 year ago

AnimMouse commented 1 year ago

Current Linux amd64 binary is dynamic, hindering portability. Compiling the binaries with CGO_ENABLED=0 makes it static and portable.

$ ./vanityssh-go
bash: ./vanityssh-go: No such file or directory

$ ldd vanityssh-go
linux-vdso.so.1 (0x00007ffc599d5000)
libc.musl-x86_64.so.1 => not found

$ file vanityssh-go
vanityssh-go: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, Go BuildID=DiMN-g1SUN0PxhASWWWY/GxVvsHDIje60s51eyo7_/-7hLh4XLjsltgOBUg0_1/UAd0-UReNj_EhMP_hYhU, with debug_info, not stripped
gene1wood commented 10 months ago

Looks like until this is done the workaround is to install it's dynamic loader with a command like

sudo apt install musl-dev