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

maker-flatpak: Building for arm64 is broken #3838

Closed
3 tasks done
pano9000 opened this issue Feb 6, 2025 · 0 comments · Fixed by #3839
Closed
3 tasks done

maker-flatpak: Building for arm64 is broken #3838

pano9000 opened this issue Feb 6, 2025 · 0 comments · Fixed by #3839

Comments

@pano9000
Copy link
Contributor

pano9000 commented Feb 6, 2025

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

7.6.1

Electron version

34.0.2

Operating system

Ubuntu 24.04

Last known working Electron Forge version

No response

Expected behavior

Running

$ npx electron-forge make --arch=arm64

should correctly build an arm64/aarch64 Flatpak

Actual behavior

Currently this will fail

❯ Making distributables
  ✖ Making a flatpak distributable for linux/arm64
    › flatpak failed with status code 1

Bit useless, but the trace is:

Error: flatpak failed with status code 1
at ChildProcess.<anonymous> (/home/pano/Programming/0_repos/TriliumNextNotes/node_modules/@malept/flatpak-bundler/index.js:73:16)
    at ChildProcess.emit (node:events:520:28)
    at ChildProcess.emit (node:domain:488:12)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

However if I enable the debugging messages, we can see it trying to use "arm64" as platform, which fails, because Flatpak does not use "arm64", but "aarch64" as identifier:

$ flatpak info --show-commit --user org.freedesktop.Platform/arm64/24.08
$ flatpak info --show-commit --system org.freedesktop.Platform/arm64/24.08
$ flatpak install --user --no-deps --arch arm64 --assumeyes runtime/org.freedesktop.Platform/arm64/24.08

if we manually call the last command, it shows why it fails:

$ flatpak install --user --no-deps --arch arm64 --assumeyes runtime/org.freedesktop.Platform/arm64/24.08
Error: No remote refs found for ‘runtime/org.freedesktop.Platform/arm64/24.08’

If we manually call the last command, but exchange arm64 with the correct arch identifier, it succeeds and starts downloading/installing

$ flatpak install --user --no-deps --arch aarch64 --assumeyes runtime/org.freedesktop.Platform/aarch64/24.08

Steps to reproduce

$ npx electron-forge make --arch=arm64

Additional information

Will open up a PR that fixes this in a second and link it back here.
It'll do the same thing, that is currently done for "x64" architecture, where Flatpak actually uses "x86_64" as their arch identifiert

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

Successfully merging a pull request may close this issue.

1 participant