Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Linux amd64 binary static #9

Open
AnimMouse opened this issue Oct 9, 2023 · 1 comment
Open

Make Linux amd64 binary static #9

AnimMouse opened this issue Oct 9, 2023 · 1 comment

Comments

@AnimMouse
Copy link

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
Copy link

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

sudo apt install musl-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants