Problems while building Shortwave radio player for Aarch64 platform

Dear Rust specialists,
I Am visually impaired advanced user. My name is Janusz Chmiel and I have started to use Arch Linux for Android mobile phones which uses Termux, special Proot C app to execute Linux apps on Android. I have got in troubles while building Shortwave radio player available here.

Here is my reported issue which I have reported directly to The author of Short-wave.

App always stop configuring because libhandy-1 Git update error. .
I have done my best to compile Shortwave myself. I have build Gradio written in Vala successfully. Do you think, that there could be some patience expert, who would tell Me The reason of my troubles?
Or Does Cargo build only for X86 or X64 platforms? So it can not build target code for aarch64 so for ARM processors?
Sure, I also have a build log with The build process.
I have even tried to remove libhandy dependency from Cargo.toml file from Shortwave app, but It is not A solution. Rust compiler generate many errors, since Rust source code files calls some functions from Libhandy. it is important library, because it is responsible for GUI creation on mobile phones.

Any help will be very welcomed. I Am patient and I have done my best to build Shortwave myself. But unfortunately, I Am helpless. Gnome-builder do not run on Android variant of Arch Linux and I do not like sandboxes based on Flatpak. User must type package name ETC, I love standard approach, where binary apps are directly executed by The Linux libraryes or by CPU not by virtual sandboxes.
Thank you very much for yours help.
With The deepest appreciation and with The warmest regards.
Janusz Chmiel

Compiling for AArch64 should work just fine.

the given reference name 'refs/heads/.l2s.LICENSE.lock0001' is not valid; class=Reference (4)

I have no idea why it would be looking for a reference called .l2s.LICENSE.lock0001. Is there any program on your system that could have created something with that name inadvertently?

I Am very sad, since I even did not used Github on The installation to
download sources and to compile some apps, only Shortwave.
I have even tried to build Libhandy-1 or to install Libhandy older version
than 1 by using Pacman -S libhandy.
Still The same issue. I Am deeply sad because of it, because I have build
and compiled many apps including Gradio or other C++ apps.
There must be some hydden issue in The build script. Ideal would be if
script would simply call existing compiled library instead needing new from
source. But I know, it is The build routine. All other apps from Github are
downloaded correctly by this script. I AM so near to my goal, ShortWave
could even run on my ArchLinux by using Android, Termux and Proot.
Mr Haecker have given Me link to download one Libhandy library version but
it is package for X86 or X64 platforms.
Here is The link.

The question is, if it will help Me. Because when I have installed libhandy
by using Pacman it also did not help.
Libhandy is so excellent library which is capable to create effective GUI
for mobile apps. But why Shortwave build script have so big issue with it?

aWhen I want to buil some package from ArchLinux community repository, I
always use pkg file and if it is necessary, I modify this script so makepkg
can build it for Aarch64 if The package author have coded The script to
build only for Intel processors. I have even found The Shortwave pkg
package. It produces The same error related to Libhandy when building.
I can not use Debian or Ubuntu, because in many cases, only ArchLinux
contain The required up to date package versions. Shortwave allow live
streams recording.

The libhandy crate cargo tries to download is a just a rust binding to the libhandy that you installed with pacman.

I Am dreaming. What about cloning Libhandy source code to The right place
inside Shortwave source folder tree, compiling it manually and modify
specially The build script so it could finally work?
But I Am afraid, that It can not be done so smoothly and easily.
Really problem resides only in Libhandy fetching from Github, because Cargo
compiled many lines of Shortwave source code without errors. So I believe,
that build process could be finished successfully.

You could indeed try to clone manually and then replace libhandy = { git="", features = ["v1_0"] } with libhandy = { path = "./libhandy-rs", features=["v1_0"] } in the Cargo.toml of Shortwave assuming that you cloned to ./libhandy-rs.

1 Like

Oh thank you for yours professional experiences. I will try to clone and
change Carto.toml according to yours advice.

I have tried to build but I AM getting The following error.
I have used The following commands:

meson --prefix=/usr build
ninja -C build
ninja -C build
Produces The following error.

rustc 1.44.1


 Updating index

error: failed to get libhandy as a dependency of package shortwave v0.0.0 (/h ome/janusz/Shortwave)

Caused by:

failed to load source for dependency libhandy

Caused by:

Unable to update /home/janusz/Shortwave/libhandy-rs

Caused by:

found a virtual manifest at
/home/janusz/Shortwave/libhandy-rs/Cargo.toml in
stead of a package manifest

[3/4] Generating de.haeckerfelix.Short...sktop_data_merge with a custom
FAILED: src/shortwave

/home/janusz/Shortwave/build-aux/ /home/janusz/Shortwave/build
usz/Shortwave src/shortwave /usr/share/locale default

ninja: build stopped: subcommand failed.

I can be only quite that this issue is even non easy for experts. I will try
to clone Shortwave to a root directory of arch file system, may be, that
there is AN hydden Proot issue, which prevent to use longer paths names.
As A last chance, I will have to buy Rasberry Pi board with AArch64 Cpu. And
I will have to try it on a Regular ArchLinux.
To be honest. I have also tried to use official Gnome-builder on Fedora X64
OS. It was non chroot based distro, normal Linux installation. I have build
Shortwave but it did not create start icon or similar.
So I have used Flatpak to install it. But Flatpak will never run on A
chroot. It require regular Linux kernel parts to be available, it must
connect to The system Bus. Some required SDKs can not be installed on
Android by using Termux, Proot and Arch Linux Aarch64.
This is The reason why I Am so intensively fighting with normal build
But Libhandy module is The obstacle which can not be overcomed, very
strange. But thank all of you for yours time. If somebody of us would have
some other idea how to build Shortwave, please let Me know.

This should have been libhandy = { path = "./libhandy-rs/libhandy", features=["v1_0"] }. Didn't notice the necessary crate wasn't in the root of the repo.

I Am cloning The library from Github to The Short-wave root folder. Is it

Yes, it is just that the path key needs to refer to the libhandy directory inside the libhandy-rs repo.

Thank you very very much. I have been able to build Shortwave successfully
thanks to yours advice. Unfortunately, I Am still far away from having
Shortwave functioning.
ninja -C build
command do not work.
So I have tried to simply type
meson install
But when I have tried to run shortwave
I Am getting The following error.

(shortwave:18994): Gtk-ERROR **: 14:00:04.646: failed to add UI: .:3:984
object type 'HdyColumn
Do you think, that app have been partially configured or builded, or does
this error mean something else?
Build have been completed with only one non remarkable error related to
Shortwave source code related to some notification creation.
I Am very very near to my goal thanks to yours kind access to my plea.
May be that I should type other commands to complete Shortwave installation
or build.

Oh I think, that I know, why Shortwave can not run.
Aarch64 ArchLinux repo which I AM using do not contain

library. And I do not have it installed. SO I will have to try to build The
library myself thanks to Aur repository. I only hope, that there will not be
some issues related to aarch64 target build.
Thank you very much for yours understanding and patience. DO not be afraid,
I will do my best to finish this procedure as soon as possible.

Dear July 7,
Complex patch download whole GTK3 very probably, because Git download
something which have above 500 MB. It will be exciting adventure till The
late night before I build so bild C project on Android device which uses
Proot for files manipulation and kernel syscalls must be changed at The fly,
Proot even monitors CPU registers.

Have you considered publishing your PKGBUILD files to the AUR? I am trying to program something for the Pinephone which also has an aarch64 architecture and could not find the aarch64 packages in the AUR so I followed this thread's solution and manually copied the libraries -,-
I don't really have a clue how to change the PKGBUILDs to cross-compile them so I kinda stopped after trying with one package. If you know how to package them, the publishing to AUR is really easy. For that I followed this guide:

Yes, I have also thought about this task. I have found out, that AUR repo
contain many X86/x64 pkgg build scripts. Unfortunately not every script can
be simple modified by only changing target architecture to AArch64.
In some cased, deep knowledge of C or C++ or Vala or Rust is needed to
overcome some compilation errors.
I Am using ArchLinux which have been installed by using The following series
of Bash script from MR Rausty and others.

My pain is, that Android kernel which I Am running has issues with Pokedata
sys call and its file system is partially case file insensitive. So files
operations are slow and flash chip is getting a little hot some times.

I would like to buy some other AARCH64 device than phone, but unfortunately,
I do not know about secure alternative.
Rasbi pi must use strong Transformator and good cable to transfer more than
2,A electric stream.

Phone is very secure device. I can not make a qualified assumption which
phone manufacturer will contain Android kernel which will have Pokedata and
other sys calls and file system intacted and perfectly functioning so I can
use Proot and Linux distro fast.

After Android 8 upgrade, files operations speed is much more better but
partial casefile system insensitivity makes files transferrs still slower.
Lenovo uses build in encryption which can not be turned off. Which making
processes with Proot also slower.
Blackview may be have A good kernel for Proot operations, but I only know
Android 6.0 kernel. I do not know, if ANdroid 8 or 9 is much more better or
if has some issues.

Oh, I misunderstood you then. I thought you wanted to cross-compile it. That's an interesting setup you have there. Shouldn't the PKGBUILDs from Arch Linux ARM work for you out of the box then?

PS: On the Pinephone you can run Arch Linux or any other distribution you want without termux or anything like that. Since you seem to be looking for an alternative that could be something you like. Its for devs and tinkerer only because it still has its quirks but you don't seem to be the type that would mind. Its only 150 dollars :wink:

aaI do not know, if The main reason why compiled Shortwave do not work is
not caused by Libhandy wrapper, which is not compatible with Aarch64 target.
But I think, that there should not be differences inside source codes if
some pprogrammer build for X64 or for Aarch64 platform.
But may be, that I Am wrong.
Libhandy want to create some GUI which GTk do not know. To be sure about The
right cause of error, I would had to try to build on normal X86 X64 Intel
compatible system while having ArchLinux installed.
If Shortwave will run after compilation, it is A exact evidence, that there
is hydden issue related to Aarch64 target or because VNC server Xvnc has
some code which is incompatible with GTK3 in some conditions.
Very strange but may be, that I will finde The right cause of The problem.