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 arm64 in linux error #3447

Open
veerdone opened this issue Apr 30, 2024 · 2 comments
Open

build arm64 in linux error #3447

veerdone opened this issue Apr 30, 2024 · 2 comments
Labels
Bug Something isn't working

Comments

@veerdone
Copy link

Description

Run wails build -platform=linux/arm64 then I got error

To Reproduce

  1. wails init -n myproject -t vue
  2. cd myproject
  3. wails build -platform=linux/arm64

Expected behaviour

Wails CLI v2.8.1


# Build Options

Platform(s)        | linux/arm64
Compiler           | /usr/local/go/bin/go
Skip Bindings      | false
Build Mode         | production
Devtools           | false
Frontend Directory | /home/ubuntu/myproject/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: Done.
  • Installing frontend dependencies: Done.
  • Compiling frontend: Done.
  • Compiling application: # runtime/cgo
gcc_arm64.S: Assembler messages:
gcc_arm64.S:28: Error: no such instruction: `stp x29,x30,[sp,'
gcc_arm64.S:32: Error: too many memory references for `mov'
gcc_arm64.S:34: Error: no such instruction: `stp x19,x20,[sp,'
gcc_arm64.S:37: Error: no such instruction: `stp x21,x22,[sp,'
gcc_arm64.S:40: Error: no such instruction: `stp x23,x24,[sp,'
gcc_arm64.S:43: Error: no such instruction: `stp x25,x26,[sp,'
gcc_arm64.S:46: Error: no such instruction: `stp x27,x28,[sp,'
gcc_arm64.S:50: Error: too many memory references for `mov'
gcc_arm64.S:51: Error: too many memory references for `mov'
gcc_arm64.S:52: Error: too many memory references for `mov'
gcc_arm64.S:54: Error: no such instruction: `blr x20'
gcc_arm64.S:55: Error: no such instruction: `blr x19'
gcc_arm64.S:57: Error: no such instruction: `ldp x27,x28,[sp,'
gcc_arm64.S:60: Error: no such instruction: `ldp x25,x26,[sp,'
gcc_arm64.S:63: Error: no such instruction: `ldp x23,x24,[sp,'
gcc_arm64.S:66: Error: no such instruction: `ldp x21,x22,[sp,'
gcc_arm64.S:69: Error: no such instruction: `ldp x19,x20,[sp,'
gcc_arm64.S:72: Error: no such instruction: `ldp x29,x30,[sp],'

Screenshots

No response

Attempted Fixes

No response

System Details

Wails Doctor



# Wails
Version         | v2.8.1
Package Manager | apt

# System
┌────────────────────────────────────────────────────┐
| OS           | Ubuntu                              |
| Version      | 22.04                               |
| ID           | ubuntu                              |
| Go Version   | go1.21.9                            |
| Platform     | linux                               |
| Architecture | amd64                               |
| CPU          | 12th Gen Intel(R) Core(TM) i3-12100 |
| Memory       | 2GB                                 |
└────────────────────────────────────────────────────┘

# Dependencies
┌──────────────────────────────────────────────────────────────────────────┐
| Dependency | Package Name          | Status    | Version                 |
| *docker    | docker.io             | Available | 24.0.5-0ubuntu1~22.04.1 |
| gcc        | build-essential       | Installed | 12.9ubuntu3             |
| libgtk-3   | libgtk-3-dev          | Installed | 3.24.33-1ubuntu2        |
| libwebkit  | libwebkit2gtk-4.0-dev | Installed | 2.44.0-0ubuntu0.22.04.1 |
| npm        | npm                   | Installed | 10.5.0                  |
| *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!

Additional context

No response

@veerdone veerdone added the Bug Something isn't working label Apr 30, 2024
@atterpac
Copy link
Contributor

Ensure you have a arm64 cross compiler installed and are setting your CC to that compiler
see golang/go#28966

@veerdone
Copy link
Author

Ensure you have a arm64 cross compiler installed and are setting your CC to that compiler see golang/go#28966

I try install gcc-arm-linux-gnueabi and set env CC=arm-linux-gnueabihf-gcc, then I run build got

# Building target: linux/arm64

  • Generating bindings:   ERROR
          # runtime/cgo
          arm-linux-gnueabihf-gcc: error: unrecognized command-line option '-m64'

          exit status 1

  ERROR
          # runtime/cgo
          arm-linux-gnueabihf-gcc: error: unrecognized command-line option '-m64'

          exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants