tauri
tauri copied to clipboard
[bug] Cannot build or install on `aarch64`
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
- Create a blank
tauri app
on (presumably) anyaarch64
platform - run
npx tauri build
- notice the error at the end from
appimage
- run
sudo dpkg -i path/to/file.deb
- 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
I forgot to mention that npx tauri dev
works fine. It's just the building process that does not.
Needs https://github.com/linuxdeploy/linuxdeploy/issues/175
I'll see if we can use a similar approach https://github.com/hdclark/DICOMautomaton/commit/960f92759e6b599f3168fdec56b938808154d3c2
I guess not since we use linuxdeploy plugins. Maybe we should build it ourselves.
Good news is the maintainer wants to implement it in the next few weeks.
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?
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 https://github.com/linuxdeploy/linuxdeploy/issues/175#issuecomment-1134650044. I don't think there's a way to do this manually yet, unless you want to take a look at that PR.
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._
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
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?
doesn't look like it. And we currently don't have the capacity to help them out either.
Ok understandable 🫤, thanks for the update anyway.
hi everyone,
any updates on this ?
We now need aarch64 as well. I wonder if it will be updated?
我将看看我们是否可以使用类似的方法hdclark/DICOMautomaton@960f927
Are there any other solutions? tauri-updater in Linux-ARM64 environment Because linux system needs appimage, the application cannot be updated
Is there any update on this cause many people like me are starving to get it done and can not find any solution.
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?
Just FYI, it seems like linux deploy has fixed this issue, so hopefully this will be working soon: https://github.com/linuxdeploy/linuxdeploy/issues/175#issuecomment-1841948736
Now that linuxdeploy has fixed this issue, is there a timeline for a patch to support AppImage for arm64 devices?
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.
Building and running appimages on arm now works.
Cross compiling from x86_64 to arm however does not and is tracked here https://github.com/linuxdeploy/linuxdeploy/issues/258. For now you'll have to build on arm devices or inside something like a qemu vm (qemu can emulate different architectures).
@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?
@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.