jmshrv / finamp

A Jellyfin music client for mobile
Mozilla Public License 2.0
2k stars 130 forks source link

Aarch64/Arm64 Linux build #766

Open baarkerlounger opened 5 months ago

baarkerlounger commented 5 months ago

It would be great if it was possible to build Finamp on Arm64 based Linux devices as well. Might be blocked by https://github.com/isar/isar/issues/876 but perhaps there's a way around it.

Chaphasilor commented 5 months ago

Hmm. From reading the issue it seems like it would be possible. You could play around with it by forking Isar, building it (either cross-compiling or right on an ARM machine), and then using that as a Finamp dependency. Maybe try replacing the x64 lib with the arm64 one at first, and if that works try keeping both somehow?

If we can get a working Finamp build with such a setup, I feel like it would be pretty likely that a PR to Isar would be accepted. And then we add official support for it :)

I currently don't have the time to look into this myself.

onny commented 3 months ago

I compiled finamp on an ubuntu arm64 v-server:

git checkout flatpak github repo
git checkout version 3.19.X
checkout finamp sources
checkout 0.9.9-beta
add build dependencies with apt
build

binary tarball: https://project-insanity.org/wp-content/uploads/2024/08/finamp-linux-release.tar.gz

added this tarball to the flatpak and produced https://project-insanity.org/wp-content/uploads/2024/08/finamp.flatpak

on my smartphone i get (alpinelinux arm64):

flatpak run com.unicornsonlsd.finamp
finamp: symbol lookup error: finamp: undefined symbol: g_once_init_enter_pointer
Chaphasilor commented 3 months ago

That sounds like some great progress already! What happens if you just compile Finamp without the Flatpak environment, does it launch on your arm64 server?
If it does, next step would be to try and build a flatpak of any Flutter demo app, or perhaps even the just_audio example app.
If that also works, try stripping away external packages within Finamp until you can get it to run, and then we can pin-point what's causing the issue!

onny commented 3 months ago

thank you @Chaphasilor for the feedback!

this is the error i get on the headless ubuntu arm64 server when trying to run the flutter build only

image

jmshrv commented 3 months ago

That is likely Finamp failing to load Isar, as linked in the original comment. Isar is a native library, so it has to be built for ARM64.