tauri: [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 appon (presumably) anyaarch64platform - 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
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 23 (10 by maintainers)
Commits related to this issue
- fix(bundler): use binary arch on appimage bundle script, closes #4174 — committed to tauri-apps/tauri by lucasfernog 2 years ago
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).
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
hi everyone,
any updates on this ?
We now need aarch64 as well. I wonder if it will be updated?
I’ll see if we can use a similar approach https://github.com/hdclark/DICOMautomaton/commit/960f92759e6b599f3168fdec56b938808154d3c2