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

[bug] Cannot build or install on aarch64 #4174

Closed
jquesada2016 opened this issue May 19, 2022 · 23 comments
Closed

[bug] Cannot build or install on aarch64 #4174

jquesada2016 opened this issue May 19, 2022 · 23 comments
Assignees
Labels
platform: Linux scope: bundler The bundler used in our cli to make installers type: bug

Comments

@jquesada2016
Copy link

Describe the bug

When building any Tauri project on aarch64 platform, specifically, a Raspberry Pi 4, when targets = "all", the command fails to complete erroring on AppImage, because arch is erroneously set to x86_64. deb does build, but produces an uninstallable binary, though this is most likely my fault for not knowing how to properly install it.

The command I use to try and install the .deb is:

sudo dpkg -i path/to/file.deb

which produces the error:

(Reading database ... 96726 files and directories currently installed.)
Preparing to unpack app_0.1.0_aarch64.deb ...
Unpacking app:aarch64 (0.1.0) over (0.1.0) ...
dpkg: dependency problems prevent configuration of app:aarch64:
 app:aarch64 depends on libwebkit2gtk-4.0-37.
 app:aarch64 depends on libgtk-3-0.

dpkg: error processing package app:aarch64 (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.36.0-1) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
 app:aarch64

The error above mentions two packages, both of which I have installed.

This leaves an malinstalled application. If I attempt to run it, I get the following error from tauri:

Could not determine the accessibility bus address
Asset `index.html` not found; fallback to index.html.html

And then proceeds to open a browser window I can't read, but seems to be some form of a script.

Reproduction

  1. Create a blank tauri app on (presumably) any aarch64 platform
  2. run npx tauri build
  3. notice the error at the end from appimage
  4. run sudo dpkg -i path/to/file.deb
  5. what the behavior as described above

If you change targets = "deb" instead, the above still happens, except for appimage, as it should.

Expected behavior

I expect the app to successfully build and install on aarch64 platforms running Raspberry Pi OS 64 bit.

Platform and versions

Environment
  › OS: Debian 11 X64
  › Node.js: 16.15.0
  › npm: 8.5.5
  › pnpm: Not installed!
  › yarn: Not installed!
  › rustup: 1.24.3
  › rustc: 1.60.0
  › cargo: 1.60.0
  › Rust toolchain: stable-aarch64-unknown-linux-gnu 

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.11
  › @tauri-apps/api [NPM]: 1.0.0-rc.5
  › tauri [RUST]: 1.0.0-rc.10,
  › tauri-build [RUST]: 1.0.0-rc.8,
  › tao [RUST]: 0.8.4,
  › wry [RUST]: 0.16.2,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../build
  › devPath: http://localhost:3000/
  › framework: Svelte

App directory structure
  ├─ .vscode
  ├─ .git
  ├─ src
  ├─ static
  ├─ .svelte-kit
  ├─ server
  ├─ node_modules
  ├─ src-tauri
  └─ build

Stack trace

No response

Additional context

No response

@jquesada2016
Copy link
Author

I forgot to mention that npx tauri dev works fine. It's just the building process that does not.

@lucasfernog lucasfernog self-assigned this May 22, 2022
@lucasfernog
Copy link
Member

Needs linuxdeploy/linuxdeploy#175

@lucasfernog
Copy link
Member

I'll see if we can use a similar approach hdclark/DICOMautomaton@960f927

@lucasfernog
Copy link
Member

I guess not since we use linuxdeploy plugins. Maybe we should build it ourselves.

@amrbashir amrbashir added platform: Linux scope: bundler The bundler used in our cli to make installers labels May 22, 2022
@lucasfernog
Copy link
Member

Good news is the maintainer wants to implement it in the next few weeks.

@jquesada2016
Copy link
Author

Sorry, could you please add a bit more context? I am not following. Are you trying to say that the linuxdeploy project, which is what Tauri uses to bundle for Linux cannot currently target aarch64, but that the maintainer has stated interest in implementing this feature in the next few weeks?

If this is the case, is there any documentation, or any guidance that can be provided for manually building the project for aarch64 in the meantime?

@lucasfernog
Copy link
Member

Yeah we use linuxdeploy and they do not ship aarch64 builds yet. The maintainer stated that he finish the pending PR in the next few weeks, see linuxdeploy/linuxdeploy#175 (comment).
I don't think there's a way to do this manually yet, unless you want to take a look at that PR.

@jquesada2016
Copy link
Author

Cool, thank you.

I don't think there's a way to do this manually yet, unless you want to take a look at that PR.

What I really mean by building it manually is that when you run cargo build, it generates an executable. However, if I try running that executable, the program doesn't work. What do I need to do, or what files do I need to place relative to the binary in order for the app to function normally, unbundled?

If you can point me in the right direction, I would greatly appreciate it._

@lucasfernog
Copy link
Member

I never tried to build on aarch64 yet, but I know some folks had success with it, try checking the arm-platform channel on our Discord: https://discord.com/channels/616186924390023171/837614826900946954

@GentleGhostCoder
Copy link

Are there already any updates?

Yeah we use linuxdeploy and they do not ship aarch64 builds yet. The maintainer stated that he finish the pending PR in the next few weeks, see linuxdeploy/linuxdeploy#175 (comment). I don't think there's a way to do this manually yet, unless you want to take a look at that PR.

As far as I can see it's not finished.
Does anyone know if it's being worked on?

@FabianLars
Copy link
Member

doesn't look like it. And we currently don't have the capacity to help them out either.

@GentleGhostCoder
Copy link

Ok understandable 🫤, thanks for the update anyway.

@shifubrams
Copy link

hi everyone,

any updates on this ?

@qwe104
Copy link

qwe104 commented Jun 6, 2023

We now need aarch64 as well. I wonder if it will be updated?

@qwe104
Copy link

qwe104 commented Jun 7, 2023

我将看看我们是否可以使用类似的方法hdclark/DICOMautomaton@960f927

Are there any other solutions? tauri-updater in Linux-ARM64 environment Because linux system needs appimage, the application cannot be updated

@MSSPL-KamalenduGarai
Copy link

Is there any update on this cause many people like me are starving to get it done and can not find any solution.

@pkh1979
Copy link

pkh1979 commented Sep 5, 2023

Hi any updates on this? autoupdater for aarch64 seems to be in a limbo because of this.

Also, has there been any workaround to get this working?

@retropele
Copy link

Just FYI, it seems like linux deploy has fixed this issue, so hopefully this will be working soon: linuxdeploy/linuxdeploy#175 (comment)

@hvpavan
Copy link

hvpavan commented Jan 2, 2024

Now that linuxdeploy has fixed this issue, is there a timeline for a patch to support AppImage for arm64 devices?

@FabianLars
Copy link
Member

I uploaded the linuxdeploy binaries to our mirror. Building on arm devices should work now without needing changes in the cli or bundler.

I can't check cross compiling (from x86_64 to arm), which isn't really well supported anyway, until probably next week.

@FabianLars
Copy link
Member

Building and running appimages on arm now works.

Cross compiling from x86_64 to arm however does not and is tracked here linuxdeploy/linuxdeploy#258. For now you'll have to build on arm devices or inside something like a qemu vm (qemu can emulate different architectures).

@hvpavan
Copy link

hvpavan commented Jan 21, 2024

@FabianLars Thank you very much for your update. I am kind of confused on what should we do to get a appimage for arm64 device. Do you have any rough cut steps written down on how to get this working?

@FabianLars
Copy link
Member

@hvpavan As said above, you'll need an arm device you can build the app on.* If you have that set up, you can follow tauri's usual Linux instructions here https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-linux and then use the default tauri build command without any args. All of these instructions use the currently running arch as default.

* i mentioned (qemu) vms that can emulate the processor architecture too, but i do not know how to set them up. Google etc should hopefully help though since this part is not tauri specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Linux scope: bundler The bundler used in our cli to make installers type: bug
Projects
Status: 📬Proposal
Development

No branches or pull requests