goreleaser/goreleaser · error
invalid goriscv64: %s
Error message
invalid goriscv64: %s
What it means
GoReleaser validates every build target's GORISCV64 setting against the values the Go toolchain accepts: rva20u64, rva22u64, or rva23u64. If a target sets goriscv64 to anything else, listTargets aborts with this error.
Source
Thrown at internal/builders/golang/targets.go:136
return result, fmt.Errorf("invalid goarch: %s", target.Goarch)
}
if target.Goamd64 != "" && !slices.Contains(validGoamd64, target.Goamd64) {
return result, fmt.Errorf("invalid goamd64: %s", target.Goamd64)
}
if target.Go386 != "" && !slices.Contains(validGo386, target.Go386) {
return result, fmt.Errorf("invalid go386: %s", target.Go386)
}
if target.Goarm64 != "" && !validGoarm64.MatchString(target.Goarm64) {
return result, fmt.Errorf("invalid goarm64: %s", target.Goarm64)
}
if target.Gomips != "" && !slices.Contains(validGomips, target.Gomips) {
return result, fmt.Errorf("invalid gomips: %s", target.Gomips)
}
if target.Goppc64 != "" && !slices.Contains(validGoppc64, target.Goppc64) {
return result, fmt.Errorf("invalid goppc64: %s", target.Goppc64)
}
if target.Goriscv64 != "" && !slices.Contains(validGoriscv64, target.Goriscv64) {
return result, fmt.Errorf("invalid goriscv64: %s", target.Goriscv64)
}
if !valid(target) {
log.WithField("target", target).Debug("skipped invalid build")
continue
}
if ignored(build, target) {
log.WithField("target", target).Debug("skipped ignored build")
continue
}
warnUnstable(target)
targets = append(targets, target)
}
if err := checkGoarmConflict(targets); err != nil {
return result, err
}
for _, target := range targets {
result = append(result, target.String())
}View on GitHub (pinned to f5edd73956)
Solutions
- Set goriscv64 in the target to one of rva20u64, rva22u64, or rva23u64
- Remove the goriscv64 field entirely to use the Go toolchain default
- Verify your Go version supports the chosen profile (rva23u64 requires Go 1.25+)
Example fix
// before (.goreleaser.yaml) targets: - riscv64_rv64gc // after targets: - riscv64_rva20u64
Defensive patterns
Strategy: validation
Validate before calling
valid := []string{"rva20u64", "rva22u64", "rva23u64"}
if v, ok := target["goriscv64"]; ok && v != "" && !slices.Contains(valid, v) {
return fmt.Errorf("invalid goriscv64 %q; must be one of %v", v, valid)
} Type guard
func validGoriscv64(v string) bool {
return v == "" || slices.Contains([]string{"rva20u64", "rva22u64", "rva23u64"}, v)
} Prevention
- Use Go's RISC-V profile names (rva20u64 etc.), not gcc ISA strings like rv64gc
- Run 'goreleaser check' in CI
- Check your Go toolchain version supports the chosen profile
When it happens
Trigger: A build target with goarch riscv64 has a goriscv64 value not in {rva20u64, rva22u64, rva23u64}, e.g. 'rv64gc', 'generic', or a misspelling like 'rva20'.
Common situations: Using ISA names from other toolchains (e.g. 'rv64gc' from gcc) instead of Go's profiles, hand-editing .goreleaser.yaml with a typo, or adding riscv64 targets after reading outdated documentation (older Go only had rva20u64/rva22u64).
Related errors
- invalid goppc64: %s
- invalid goarm: %s
- couldn't guess project_name, please add it to your config
- goarm %s has conflicting ABIs (%q and %q) for %s: only one A
- invalid use: %s, valid options are %v
AI-assisted analysis of goreleaser/goreleaser@f5edd73956 (2026-09-05).
Data as JSON: /api/errors/b2560ad32480923e.
Report an issue: GitHub.