goglide-golanggolang-migrate

Why "undefined: StackGuardMultiplierDefault" error?


describe

When I clone GoAdminGroup/go-admin projectin github and run the project by the steps of README.MD file , I get this error

TEST-MBP:example TEST$ GO111MODULE=on go run main.go
go: downloading github.com/mattn/go-sqlite3 v1.11.0
go: extracting github.com/mattn/go-sqlite3 v1.11.0
go: finding github.com/mattn/go-sqlite3 v1.11.0
# runtime/internal/sys
/Users/TEST/go/src/runtime/internal/sys/stubs.go:16:30: undefined: StackGuardMultiplierDefault

Actually my /Users/TEST/go/src folder was cloned from https://github.com/golang/go/tree/release-branch.go1.13/src

Why StackGuardMultiplierDefault was undefined in /src/runtime/internal/sys/stubs.go


Solution

  • As per my understanding you cloned the Go source code from it's github and expecting it to work. It will not work.

    You need to to follow Go guide Installing Go from source if you want to install it from the (github) source. Only cloning the repository is not enough, there are some required steps to be done after that.

    Otherwise I suggest to install by using the available binary distributions installer.

    Detailed explanation: the const StackGuardMultiplierDefault is not found because the file where the const declared does not exists (the zversion.go file). This particular file is only generated when àll.bash is executed (part of steps on installling Go from source).