On Ubuntu 20.10, I use the following steps to build the go binary:
It seems that it needs some distribution relevant dependencies for working correctly. Thus, I want to know whether I can build a totally static go binary so that it can run under other Linux distributions.
Regards,
HY
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/d496885c-63ad-4efe-901c-fb4b198bdf84n%40googlegroups.com.
I just tried building usingmero@hix ~/go/src$ CGO_ENABLED=0 ./make.bashmero@hix ~/go/src$ file ../bin/go../bin/go: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=vuwQ_gWzFYzm9u1fSb6J/teB52WVS50es5tAa1xez/9HCuFMUtERd7wPEheIgP/i3RObo0pxXnfqkowogAH, not strippedI'm honestly quite surprised this works.