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
Makefile build options do not generate static binaries #48
Milestone
Comments
atc0005
added this to TODO
in Update static binary generation in Go project Makefiles
via automation
Oct 3, 2020
atc0005
changed the title
Makefile build options does not generate static binaries
Makefile build options do not generate static binaries
Oct 3, 2020
$ file release_assets/*/*
release_assets/hayoh/hayoh-v0.1.2-20-ge097f3c-linux-386: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
release_assets/hayoh/hayoh-v0.1.2-20-ge097f3c-linux-amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped
release_assets/hayoh/hayoh-v0.1.2-20-ge097f3c-windows-386.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
release_assets/hayoh/hayoh-v0.1.2-20-ge097f3c-windows-amd64.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
release_assets/n2n/n2n-v0.1.2-20-ge097f3c-linux-386: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
release_assets/n2n/n2n-v0.1.2-20-ge097f3c-linux-amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped
release_assets/n2n/n2n-v0.1.2-20-ge097f3c-windows-386.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
release_assets/n2n/n2n-v0.1.2-20-ge097f3c-windows-amd64.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows Looks like the 32-bit Linux binaries are already static, but the 64-bit Linux binaries are dynamically linked. Will try applying build tags to prefer Go's user and net support. |
That did the trick: $ file release_assets/*/*
release_assets/hayoh/hayoh-v0.1.2-20-ge097f3c-dirty-linux-386: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
release_assets/hayoh/hayoh-v0.1.2-20-ge097f3c-dirty-linux-amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
release_assets/hayoh/hayoh-v0.1.2-20-ge097f3c-dirty-windows-386.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
release_assets/hayoh/hayoh-v0.1.2-20-ge097f3c-dirty-windows-amd64.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
release_assets/n2n/n2n-v0.1.2-20-ge097f3c-dirty-linux-386: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
release_assets/n2n/n2n-v0.1.2-20-ge097f3c-dirty-linux-amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
release_assets/n2n/n2n-v0.1.2-20-ge097f3c-dirty-windows-386.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
release_assets/n2n/n2n-v0.1.2-20-ge097f3c-dirty-windows-amd64.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows |
atc0005
added a commit
that referenced
this issue
Oct 9, 2020
By using these build tags we can generate native static binaries without dynamic linkage. refs GH-48
atc0005
added a commit
that referenced
this issue
Oct 9, 2020
By using these build tags we can generate native static binaries without dynamic linkage. refs GH-48
atc0005
added a commit
that referenced
this issue
Oct 9, 2020
By using these build tags we can generate native static binaries without dynamic linkage. By using `CGO_ENABLED=0` we try to prevent unintentional libc dependencies from slipping in if we pull in additional dependencies in the future. refs GH-48
atc0005
added a commit
that referenced
this issue
Oct 9, 2020
By using these build tags we can generate native static binaries without dynamic linkage. By using `CGO_ENABLED=0` we try to prevent unintentional libc dependencies from slipping in if we pull in additional dependencies in the future. refs GH-48
atc0005
added a commit
that referenced
this issue
Oct 9, 2020
By using these build tags we can generate native static binaries without dynamic linkage. By using `CGO_ENABLED=0` we try to prevent unintentional libc dependencies from slipping in if we pull in additional dependencies in the future. refs GH-48
Update static binary generation in Go project Makefiles
automation
moved this from TODO
to Done
Oct 9, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Same here as with atc0005/check-mail#94.
The text was updated successfully, but these errors were encountered: