Skip to content

Error: android/amd64 requires external (cgo) linking, but cgo is not enabled #50

@nicokosi

Description

@nicokosi

Hello,

I cannot release nicokosi/gh-collab-scanner, cf. this GitHub Actions' job:

Run cli/gh-extension-precompile@v1
  with:
    go_version: 1.22
Run actions/setup-go@v3
Setup go version spec 1.22
Found in cache @ /opt/hostedtoolcache/go/1.22.0/x64
Added go to the path
Successfully set up Go version 1.22
go version go1.22.0 linux/amd64

go env
Run if [ -n "$INPUT_TOKEN" ]; then
Run if [ -n "$INPUT_TAG" ]; then
Run if [ -n "$INPUT_TITLE" ]; then
Run ${GITHUB_ACTION_PATH//\\//}/build_and_release.sh
go: downloading github.com/cli/go-gh/v2 v2.5.0
✂️...✂️
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/rivo/uniseg v0.4.4
android/amd64 requires external (cgo) linking, but cgo is not enabled
Error: Process completed with exit code 1.

The last release that succeeded, v1.5.3:

  • was using Go 1.20 instead of 1.22 ;
  • had module github.com/cli/go-gh which has not been updated to v2 yet ;
  • probably run on a previous version of the Ubuntu image.

I tried several changes: enable CGO (not sure it is correct), use a Windows runner etc. but I could not make the release succeed (see the GitHub Actions build history).

Do you have any advice/tip? Thank you!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions