linux/arm64 platform run:wails build ,error
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.
Double check that you are compiling with an arm64 verison of gcc
gcc -dumpmachine
Double check that you are compiling with an arm64 verison of gcc
gcc -dumpmachine
yes,arm64 verison of gcc
Have you solved this problem? I also encountered this problem and couldn't handle it