add CGO_ENABLED=0 in go install command

because users may run this on their local machine, then copy the binary the
their server. there is a good chance that binary won't start on linux/amd64 when
compiled with cgo due to missing glibc symbols.
This commit is contained in:
Mechiel Lukkien 2023-02-27 14:05:10 +01:00
parent 259729e03d
commit 0639c396b9
No known key found for this signature in database

View file

@ -44,7 +44,7 @@ You can easily (cross) compile mox if you have a recent Go toolchain installed
(see "go version", it must be >= 1.19; otherwise, see https://go.dev/dl/ or
https://go.dev/doc/manage-install and $HOME/go/bin):
GOBIN=$PWD go install github.com/mjl-/mox@latest
GOBIN=$PWD CGO_ENABLED=0 go install github.com/mjl-/mox@latest
Or you can download a binary built with the latest Go toolchain from
https://beta.gobuilds.org/github.com/mjl-/mox, and symlink or rename it to