←First impressions: VSCode, WSL, Git ...
Pellworm 2020 - Animals→
Go requires GCC
Tags: English Dev Golang

While moving my development environments to WSL2 I stumbled over a strange but obviously known bug: Although the go compiler go build itself does not depend on GCC, under Linux go test may abort for not finding GCC in $PATH. As far as I saw in the issues

this behaviour was introduced shortly after Go 1.11 and it is obviously still not fixed in Go 1.15. The comments at Github advice to change the environment variables CGO_ENABLED and/or GO111MODULE. Since I did not have luck with that I resorted to the cheapest workaround: simply install GCC. Sometime it may have additional use beside fixing go test.