fyne-io / systray

a cross platfrom Go library to place an icon and menu in the notification area
Apache License 2.0
223 stars 41 forks source link

compilation error for linux_386 #76

Open Yakiyo opened 5 months ago

Yakiyo commented 5 months ago

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

andydotxyz commented 5 months ago

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.

Yakiyo commented 5 months ago

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: bot@goreleaser.com
    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: bot@goreleaser.com
    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"
andydotxyz commented 5 months ago

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...