electron / electron/forge

Building with --arch="arm64" on Ubuntu 22.04 x64 machine doesn't produce arm64 ELF file for native deps

Open
#3,529 0 comments 0 reactions 0 assignees View on GitHub
bug native-modules package platform/linux
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 1h
Merged PRs (30d)
30

Description

### Pre-flight checklist

- [X] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

### Electron Forge version

6.4.2

### Electron version

v27.0.3

### Operating system

Ubuntu 22.04 x64

### Last known working Electron Forge version

_No response_

### Expected behavior

Electron forge will build native dependencies for the correct architecture that's specified when using the --arch flag

### Actual behavior

Instead of an arm64, A x64 ELF binary for the native dep is produced for the arch specified by "npm run make -- --arch=arm64" when executed on Ubuntu 22.04 x64 machine

### Steps to reproduce

arm64 flag is correctly being passsed:
image

File type is x64_86 when it should be arm64:
image

### Additional information

This same issue does not persist on OSX x64. For instance, using the "--arch=arm64" flag, it correctly produces the arm64 version of the "pty.node" native dependency.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.