Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed for ubuntu 20.04.5 with exit status 2 #10

Closed
just-hms opened this issue Nov 8, 2022 · 3 comments · May be fixed by #11
Closed

Build failed for ubuntu 20.04.5 with exit status 2 #10

just-hms opened this issue Nov 8, 2022 · 3 comments · May be fixed by #11

Comments

@just-hms
Copy link

just-hms commented Nov 8, 2022

The project used to build correctly previously on github actions and correctly build locally (using both windows and wsl).
Unfortunately now it doesn't build anymore.

this is my go.mod

module jim

go 1.19

require gorm.io/gorm v1.22.5

require (
	github.com/jinzhu/inflection v1.0.0 // indirect
	github.com/jinzhu/now v1.1.4 // indirect
	github.com/mattn/go-colorable v0.1.9 // indirect
	github.com/mattn/go-isatty v0.0.14 // indirect
	github.com/mattn/go-sqlite3 v1.14.5 // indirect
)

require (
	github.com/fatih/color v1.13.0
	golang.org/x/sys v0.1.0 // indirect
	gorm.io/driver/sqlite v1.1.4
)

this is the github yaml

name: release

on:
  release:
    types:
      - created

jobs:

  generate:
    name: Generate cross-platform builds
    runs-on: ubuntu-latest
    steps:

      - name: Checkout the repository
        uses: actions/checkout@v3

      - name: Generate build files
        uses: thatisuday/go-build-action@v1.0.2
        with:
          platforms: "windows/amd64, linux/amd64, darwin/amd64"
          package: ""
          name: "jim"
          compress: "true"
          dest: "dist"
          ldflags: "\"-X 'jim/utils.Version=${{ github.ref_name }}'\""

      - name: Copy build-artifacts
        uses: skx/github-action-publish-binaries@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          args: "./dist/*.tar.gz"

this is the action's output

image

thanks in advance.

@just-hms just-hms changed the title Build failed for ubuntu 20.04.5 Build failed for ubuntu 20.04.5 with exit status 2 Nov 8, 2022
@fireinrain
Copy link

The same issue. failed to build

@evskorobogatij
Copy link

How to fix this?

@psethwick
Copy link

can't speak for the 'me too's, but your go version > the go version in tag v1.0.2.

I notice a few version bump PRs hanging around unmerged, but they are also now old.

There's a fork here with go 1.21 (on alpine instead of debian, but I don't think that matters):

https://github.com/psethwick/go-cross-build
uses: psethwick/go-cross-build@1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants