systray icon indicating copy to clipboard operation
systray copied to clipboard

compilation error for linux_386

Open Yakiyo opened this issue 11 months ago • 3 comments

I'm trying to cross compile a systray app using goreleaser via github workflows in ci. But it fails during compilation with the following error: image

Yakiyo avatar Mar 05 '24 17:03 Yakiyo

I don't know why but your command triggered the arm64 C compiler instead of x86. There isn't enough context here to suggest why.

andydotxyz avatar Mar 06 '24 09:03 andydotxyz

well, if it helps, the goreleaser config file i used was

# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
project_name: gorp

before:
  hooks:
    # You may remove this if you don't use go modules.
    - go mod tidy
    # you may remove this if you don't need go generate
    - go generate ./...
builds:
  - env:
      - CGO_ENABLED=1
    goos:
      - linux
      - windows
      - darwin
    ldflags:
      - >- 
        {{- if eq .Os "windows" }}-H=windowsgui{{- end }}
    #ignore:
     # - goos: "linux"
      #  goarch: "386"
      #- goos: "linux"
      #  goarch: "amd64"
      #- goos: "windows"
      #  goarch: "arm64"

archives:
  - format: tar.gz
    # this name template makes the OS and Arch compatible with the results of uname.
    name_template: >-
      {{ .ProjectName }}_
      {{- title .Os }}_
      {{- if eq .Arch "amd64" }}x86_64
      {{- else if eq .Arch "386" }}i386
      {{- else }}{{ .Arch }}{{ end }}
      {{- if .Arm }}v{{ .Arm }}{{ end }}
    # use zip for windows archives
    format_overrides:
    - goos: windows
      format: zip
checksum:
  name_template: 'checksums.txt'
snapshot:
  name_template: "{{ incpatch .Version }}-next"
changelog:
  sort: asc
  filters:
    exclude:
      - '^docs:'
      - '^test:'

scoops:
  - folder: "share/scoop"
    commit_author:
      name: goreleaserbot
      email: [email protected]
    commit_msg_template: "Update scoop manifest to {{ .ProjectName }} version {{ .Tag }}"
    homepage: "https://github.com/Yakiyo/gorp"
    license: "MIT"
    description: "{{ .ProjectName }} version {{ .Tag }}"
    repository:
      owner: "Yakiyo"
      name: "{{ .ProjectName }}"
      branch: "main"

brews:
  - name: "{{ .ProjectName }}"
    # available in goreleaser pro
    # alternative_names:
    #   - "{{ .ProjectName }}@{{ .Version }}"
    #   - "{{ .ProjectName }}@{{ .Major }}"
    commit_author:
      name: goreleaserbot
      email: [email protected]
    commit_msg_template: "Update brew formula to {{ .ProjectName }} version {{ .Tag }}"
    folder: "share/brew"
    homepage: "https://github.com/Yakiyo/gorp"
    license: "MIT"
    repository:
      owner: "Yakiyo"
      name: "{{ .ProjectName }}"
      branch: "main"

Yakiyo avatar Mar 06 '24 12:03 Yakiyo

I've no familiarity with that and it doesn't seem that the script is setting i386.

I'd consider asking the goreleaser community as there isn't much we can do if your scripts are calling arm64 gcc for 32bit intel target...

andydotxyz avatar Mar 06 '24 21:03 andydotxyz