Installation of Trunk on Endeavour Arm os

i have been trying to install trunk using cargo byt everything when the installation is about to complete installation my system crashes and i tried it on both KDE plasma and Budgie. is there any fix?

I have never heard of trunk before now.

I did a little research, and it looks like trunk is a VS Code extension ?

I am guessing that trunk is a binary, or has a binary as part of it’s installation. If it is a binary, and complied for a x86_64 machine, it will not work with ARM.

For it to work with ARM trunk would need to be compiled for aarch64

Just a guess on my part so far.

Pudge

EDIT:

Since you mentioned cargo, I assume trunk is written in Rust?
There is a Rust aarch64 package in the ArchLinux ARM “extra” repository.

aarch64	extra  rust   1:1.67.1-1  Systems programming language focused on safety, speed and concurrency

EDIT 2:
Which ARM device are you trying to install this on. Raspberry Pi 4b ?

Hi

Rust packages usually build across all supported architectures, unless there’s a bug.

I suspect the system crash is because of a low memory situation. Rust compiler eats up a lot of RAM.

Are you doing parallel build? Try running cargo build -j1 and see if it succeeds. This will force using only single thread, and using less memory, compared to multi thread builds.

1 Like

I am trying it on Raaspberry pi 400
Just a correction trunk is a tool used to serve Yew applications

1 Like

trunk installation works on my chromebook but not on PI both are of 4GB ram what might be the issue then?

Where are you getting trunk from ?
trunk is available in the ArchLinux AUR. So you might want to use makepkg to compile this from the AUR.

trunk  0.16.0-1  5  0.01 	Build, bundle & ship your Rust WASM application to the web.

Here is a snippet of trunk’s PKGBUILD

pkgname=trunk
pkgver=0.16.0
pkgrel=1
pkgdesc='Build, bundle & ship your Rust WASM application to the web.'
arch=('x86_64')
url="https://github.com/thedodd/$pkgname/"
license=('APACHE' 'MIT')
depends=()

You would have to edit the line arch=( ‘x86_64’ ) to arch=( ‘x86_64’ ‘aarch64’ )
This would include the additional architecture of aarch64. Then run makepkg.
For this to compile, you might need some additional dependencies such as rust itself.

If you need instructions for makepkg let me know.

Pudge

Ok I am getting an error
error: could not compile trunk
process didn’t exit successfully: rustc --crate-name trunk --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=73 --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto=fat -C codegen-units=1 -C metadata=17a375d289a89a33 -C extra-filename=-17a375d289a89a33 --out-dir '/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps' -L 'dependency=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps' --extern 'ansi_term=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libansi_term-2fefa6a2e8d1ee3d.rlib' --extern 'anyhow=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libanyhow-b671facc858f8fa6.rlib' --extern 'axum=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libaxum-edaf84a9683a853c.rlib' --extern 'bytes=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libbytes-7b537b79a358c70c.rlib' --extern 'cargo_lock=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libcargo_lock-72ed7b977d15c88f.rlib' --extern 'cargo_metadata=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libcargo_metadata-5b05f503124f83bb.rlib' --extern 'clap=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libclap-e3163290752f2e23.rlib' --extern 'console=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libconsole-cde95d0c40943aad.rlib' --extern 'directories=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libdirectories-0c9e980343403b44.rlib' --extern 'dunce=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libdunce-c3b003e8bc6d6e03.rlib' --extern 'envy=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libenvy-23245a1090069557.rlib' --extern 'flate2=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libflate2-91a99abc676d50fb.rlib' --extern 'fs_extra=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libfs_extra-e065a2443535c759.rlib' --extern 'futures_util=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libfutures_util-2d1c3e063d4787bb.rlib' --extern 'nipper=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libnipper-7919fe364275f6d9.rlib' --extern 'notify=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libnotify-c40e828bc7a7a3f6.rlib' --extern 'once_cell=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libonce_cell-a37880475d04d1fd.rlib' --extern 'open=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libopen-503c5151aa61e252.rlib' --extern 'remove_dir_all=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libremove_dir_all-6a60332e34f4c9ad.rlib' --extern 'reqwest=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libreqwest-044ea0aa2b07c4d0.rlib' --extern 'seahash=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libseahash-d4c15307789de40d.rlib' --extern 'serde=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libserde-6468727f6206958c.rlib' --extern 'tar=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libtar-8cba2e05aff79807.rlib' --extern 'tokio=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libtokio-07ef5662fba91499.rlib' --extern 'tokio_stream=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libtokio_stream-4970d82031253aee.rlib' --extern 'tokio_tungstenite=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libtokio_tungstenite-ad11431f094f9c84.rlib' --extern 'toml=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libtoml-5b7fa56fdab17edd.rlib' --extern 'tower_http=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libtower_http-45f2e45dcc6c0b99.rlib' --extern 'tracing=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libtracing-519425c90974b873.rlib' --extern 'tracing_subscriber=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libtracing_subscriber-0bad64f11e4faa50.rlib' --extern 'which=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libwhich-b681715fa8776e1f.rlib' --extern 'zip=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/deps/libzip-abe7d452f82c3678.rlib' -L 'native=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/build/ring-85213271dae66be7/out' -L native=/usr/lib -L 'native=/home/loser34/rust-pro/trunk pkg/trunk/src/trunk-0.16.0/target/release/build/zstd-sys-91c4cca45a3117ca/out' (signal: 9, SIGKILL: kill)
==> ERROR: A failure occurred in build().
Aborting…

1 Like

I also tried to run makepkg for trunk.

At one point in the process I got this

Building [=========> ] 334/335: trunk(bin)

This indicates to me that the makepkg is making a binary file for installation, and it would be aarch64.

After 45 miniutes It did everything OK no errors, no warnings, until the very end. Then i got these errors.

running 9 tests
test config::models_test::err_bad_trunk_toml_build_target ... ok
test config::models_test::err_bad_trunk_toml_watch_ignore ... ok
test config::models_test::err_bad_trunk_toml_watch_path ... ok
test tools::tests::sass_pre_compiled ... ok
test tools::tests::wasm_bindgen_pre_compiled ... ok
test tools::tests::wasm_bindgen_from_source ... ok
test tools::tests::wasm_opt_from_source ... ok
test tools::tests::wasm_opt_pre_compiled ... ok
test tools::tests::download_and_install_binaries ... FAILED

failures:

---- tools::tests::download_and_install_binaries stdout ----
Error: error downloading app

Caused by:
    error downloading archive file: 404
    https://github.com/WebAssembly/binaryen/releases/download/version_105/binaryen-version_105-aarch64-linux.tar.gz


failures:
    tools::tests::download_and_install_binaries

test result: FAILED. 8 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.48s

error: test failed, to rerun pass `--bin trunk`
==> ERROR: A failure occurred in check().
    Aborting...
[don@RPi-test trunk]$ 

So I am guessing that

Caused by:
    error downloading archive file: 404
    https://github.com/WebAssembly/binaryen/releases/download/version_105/binaryen-version_105-aarch64-linux.tar.gz

perhaps github had some problems giving the error 404, or maybe some of the binaries that test 9 tried to download and install were x86_64 binaries ?

test tools::tests::download_and_install_binaries ... FAILED

Well it’s off to bed for me.

Pudge

2 Likes

Is the chromebook x86_64 or ARM ?

Pudge

x86_64

It works with x86_64 and doesn’t work with aarch64. Kind of proves it is an architecture problem. I suspect that aarch64 compatibility is not high on the to do list for the rust developers.

https://github.com/WebAssembly/binaryen/releases/download/version_105/binaryen-version_105-aarch64-linux.tar.gz

The above file that bombed out my makepkg attempt is a binaryen-version and it is probably a x86_64 binary. So one would have to get the source code for

binaryen-version_105-aarch64-linux.tar.gz

and compile it on an aarch64 device. Of course, it is possible that this binary might have binary dependencies for it also.

Pudge

2 Likes