wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.18k stars 1.21k forks source link

linux/arm64 platform run:wails build ,error #3521

Open qaq-qwq-qvq opened 5 months ago

qaq-qwq-qvq commented 5 months ago

Description

wails build Wails CLI v2.8.2

Build Options

Platform(s) | linux/arm64
Compiler | /usr/lib/go-1.22/bin/go
Skip Bindings | false
Build Mode | production
Devtools | false
Frontend Directory | /home/qykw/go/src/name/frontend Obfuscated | false
Skip Frontend | false
Compress | false
Package | true
Clean Bin Dir | false
LDFlags |
Tags | []
Race Detector | false

Building target: linux/arm64

• Generating bindings: ERROR

name

      /usr/lib/go-1.22/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
      /tmp/go-link-4204186703/000000.o: file not recognized: file format not recognized
      collect2: error: ld returned 1 exit status

      exit status 1

ERROR

name

      /usr/lib/go-1.22/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
      /tmp/go-link-4204186703/000000.o: file not recognized: file format not recognized
      collect2: error: ld returned 1 exit status

      exit status 1

♥ If Wails is useful to you or your company, please consider sponsoring the project: https://github.com/sponsors/leaanthony

To Reproduce

wails build

Expected behaviour

ERROR:

name

      /usr/lib/go-1.22/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
      /tmp/go-link-4204186703/000000.o: file not recognized: file format not recognized
      collect2: error: ld returned 1 exit status

Screenshots

No response

Attempted Fixes

No response

System Details

wails doctor

          Wails Doctor          

# Wails
Version         | v2.8.2
Package Manager | apt   

# System
┌──────────────────────────────────────────────────┐
| OS           | Ubuntu                            |
| Version      | 22.04                             |
| ID           | ubuntu                            |
| Go Version   | go1.22.3                          |
| Platform     | linux                             |
| Architecture | arm64                             |
| CPU          |                                   |
| GPU          | unknown (VMware) - Driver: vmwgfx |
| Memory       | 4GB                               |
└──────────────────────────────────────────────────┘

# Dependencies
┌──────────────────────────────────────────────────────────────────────────┐
| Dependency | Package Name          | Status    | Version                 |
| *docker    | docker.io             | Available | 24.0.5-0ubuntu1~22.04.1 |
| gcc        | build-essential       | Installed | 11.4.0                  |
| libgtk-3   | libgtk-3-dev          | Installed | 3.24.33-1ubuntu2.1      |
| libwebkit  | libwebkit2gtk-4.0-dev | Installed | 2.44.2-0ubuntu0.22.04.1 |
| npm        | npm                   | Installed | 8.19.4                  |
| *nsis      | nsis                  | Available | 3.08-2                  |
| pkg-config | pkg-config            | Installed | 0.29.2                  |
└──────────────────────── * - Optional Dependency ─────────────────────────┘

# Diagnosis
Optional package(s) installation details: 
  - docker: sudo apt install docker.io
  - nsis: sudo apt install nsis

 SUCCESS  Your system is ready for Wails development!

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

Additional context

computer:cpu M1 mac mini in VMware middle

Is it because in the virtual machine of m1 mac? Other Ubuntu packages of arm64 and amd64 are ok.

atterpac commented 5 months ago

Double check that you are compiling with an arm64 verison of gcc gcc -dumpmachine

qaq-qwq-qvq commented 5 months ago

Double check that you are compiling with an arm64 verison of gcc gcc -dumpmachine

yes,arm64 verison of gcc 1717469708935

liyuan1206010227 commented 3 months ago

Have you solved this problem? I also encountered this problem and couldn't handle it