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

Unable to Build on Windows ARM64 with Mingw Installed #57

Open
fengxu11 opened this issue Oct 24, 2024 · 0 comments
Open

Unable to Build on Windows ARM64 with Mingw Installed #57

fengxu11 opened this issue Oct 24, 2024 · 0 comments

Comments

@fengxu11
Copy link

fengxu11 commented Oct 24, 2024


Issue: Unable to Build on Windows ARM64 with Mingw Installed

Description

I encountered an error while trying to build my application using wails on Windows for the arm64 architecture. Despite having Mingw installed and configuring CGO, the build process fails with multiple assembly errors related to gcc_arm64.S. The error details are as follows:

Environment:

  • OS: Windows 10
  • Target Architecture: ARM64
  • Go Version: 1.22.5
  • Wails Version: 2.9.2
  • Mingw Installed: Yes

Command:

CGO_ENABLED=1 wails build -clean -platform windows/arm64 \
-webview2 embed \
--tags exp_gowebview2loader \
-ldflags "-s -w -X main.version=v0.0.6 -X main.gaMeasurementID= -X main.gaSecretKey="

Error Output:

# runtime/cgo
gcc_arm64.S: Assembler messages:
gcc_arm64.S:30: Error: no such instruction: `stp x29,x30,[sp,'
gcc_arm64.S:34: Error: too many memory references for `mov'
gcc_arm64.S:36: Error: no such instruction: `stp x19,x20,[sp,'
gcc_arm64.S:39: Error: no such instruction: `stp x21,x22,[sp,'
...
gcc_arm64.S:74: Error: no such instruction: `ldp x29,x30,[sp],'

Steps to Reproduce:

  1. Set up Go and Mingw on a Windows 10 machine.
  2. Run the wails build -clean -platform windows/arm64 command.
  3. Observe the build failure due to assembler errors.

Expected Behavior:

The application should successfully compile for the Windows ARM64 platform.

Actual Behavior:

The build fails due to unsupported ARM instructions in the assembly file gcc_arm64.S.

Additional Information:

  • The issue seems related to the use of ARM64-specific assembly instructions in the gohook library that may not be fully supported on the Windows platform.
  • I am using gohook for global keyboard event listening. If ARM64 support is not available for Windows, are there any workarounds or plans to support it in the future?

Any advice or guidance on how to resolve or bypass this issue would be greatly appreciated.


This template clearly outlines your environment, the command you're using, the error message, and provides a clear question for the maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant