Skip to content
Latchkey

Go "gccgo not supported" - Fix in CI

gccgo is an alternate Go frontend in GCC that lags the gc toolchain and lacks some features and flags. A build that depends on gc-only behavior fails when GCCGO or a gccgo toolchain is in play.

What this error means

A build fails referencing gccgo, or a gc-only flag is rejected because the runner resolved go to gccgo. The standard gc toolchain was not the one invoked.

go
go build: gccgo does not support "-buildmode=plugin"

Common causes

gccgo on PATH instead of gc go

The runner resolved go to a gccgo-based toolchain that lacks gc-only features.

GCCGO/compiler env forcing gccgo

An environment setting selected the gccgo compiler for the build.

How to fix it

Use the official gc toolchain

  1. Install Go via setup-go so the gc go binary is first on PATH.
.github/workflows/ci.yml
- uses: actions/setup-go@v5
  with:
    go-version: '1.22'

Confirm which toolchain is active

  1. Print the version to confirm gc, not gccgo, is selected.
shell
go version   # expect: go version go1.22.x ...

How to prevent it

  • Install Go via setup-go so the gc toolchain wins on PATH.
  • Avoid relying on a system gccgo for builds.
  • Verify go version at the top of the job.

Frequently asked questions

What causes ""gccgo not supported""?
The runner resolved go to a gccgo-based toolchain that lacks gc-only features.
How do I fix "gccgo not supported"?
Use the official gc toolchain

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card