Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a aarch64 build for flathub #715

Closed
1 task done
spazziale opened this issue Sep 12, 2023 · 35 comments · Fixed by #723
Closed
1 task done

Provide a aarch64 build for flathub #715

spazziale opened this issue Sep 12, 2023 · 35 comments · Fixed by #723
Labels
enhancement New feature or request

Comments

@spazziale
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Pain

I can't find a Spotify client for mobile linux as good as spotube ;)

Suggested solution

This would be cool for Linux phones

Useful resources

No response

Additional information

No response

@spazziale spazziale added the enhancement New feature or request label Sep 12, 2023
@KRTirtho
Copy link
Owner

Unfortunately I was never able to produce an arm build for Spotube
But meanwhile, if you've a arm machine, you can build from source

@KRTirtho
Copy link
Owner

Ok so I was playing with CircleCI's linux-arm64 machines & luckily I was able to successfully produce a build
I wasn't able to test it on device. So please use it at your own risk & let me know if it works
spotube-linux-3.1.1-aarch64.zip

@KRTirtho
Copy link
Owner

Make sure these dependencies are installed

@spazziale
Copy link
Author

spazziale commented Sep 14, 2023

I'm using postmarketos ( so musl instead of glibc)
i got this error:
./spotube: ./spotube: cannot execute binary file
Maybe we use a .flatpak to circumvent the problem

@KRTirtho
Copy link
Owner

It won't work in that case. Flutter depends on glibc

@KRTirtho
Copy link
Owner

So I testing arm version on flatpak. See if this works

flatpak install --user https://dl.flathub.org/build-repo/48466/com.github.KRTirtho.Spotube.flatpakref

@spazziale
Copy link
Author

spazziale commented Sep 14, 2023

See if this works

spotube: error while loading shared libraries: libcatcher_plugin.so: cannot open shared object file: No such file or directory

@KRTirtho
Copy link
Owner

Please do the following:

$ flatpak run --devel --command=sh com.github.KRTirtho.Spotube
$ cd /app/spotube/
$ ldd spotube

Then provide the output of the last command

@KRTirtho KRTirtho linked a pull request Sep 15, 2023 that will close this issue
@spazziale
Copy link
Author

ldd spotube
        linux-vdso.so.1 (0x0000ffff8b1f6000)
	libcatcher_plugin.so => not found
	libfile_selector_linux_plugin.so => not found
	libflutter_secure_storage_linux_plugin.so => not found
	liblocal_notifier_plugin.so => not found
	libmedia_kit_libs_linux_plugin.so => not found
	libscreen_retriever_plugin.so => not found
	libsystem_theme_plugin.so => not found
	libsystem_tray_plugin.so => not found
	liburl_launcher_linux_plugin.so => not found
	libwindow_manager_plugin.so => not found
	libwindow_size_plugin.so => not found
	libflutter_linux_gtk.so => not found
	libgtk-3.so.0 => /usr/lib/aarch64-linux-gnu/libgtk-3.so.0 (0x0000ffff8a960000)
	libgdk-3.so.0 => /usr/lib/aarch64-linux-gnu/libgdk-3.so.0 (0x0000ffff8a840000)
	libpangocairo-1.0.so.0 => /usr/lib/aarch64-linux-gnu/libpangocairo-1.0.so.0 (0x0000ffff8a820000)
	libpango-1.0.so.0 => /usr/lib/aarch64-linux-gnu/libpango-1.0.so.0 (0x0000ffff8a7a0000)
	libharfbuzz.so.0 => /usr/lib/aarch64-linux-gnu/libharfbuzz.so.0 (0x0000ffff8a690000)
	libatk-1.0.so.0 => /usr/lib/aarch64-linux-gnu/libatk-1.0.so.0 (0x0000ffff8a650000)
	libcairo-gobject.so.2 => /usr/lib/aarch64-linux-gnu/libcairo-gobject.so.2 (0x0000ffff8a630000)
	libcairo.so.2 => /usr/lib/aarch64-linux-gnu/libcairo.so.2 (0x0000ffff8a500000)
	libgdk_pixbuf-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x0000ffff8a4c0000)
	libgio-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgio-2.0.so.0 (0x0000ffff8a2a0000)
	libgobject-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0 (0x0000ffff8a220000)
	libglib-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0 (0x0000ffff8a0b0000)
	libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffff89e60000)
	libm.so.6 => /usr/lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff89dc0000)
	libgcc_s.so.1 => /usr/lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffff89d90000)
	libc.so.6 => /usr/lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff89be0000)
	libgmodule-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libgmodule-2.0.so.0 (0x0000ffff89bc0000)
	libpangoft2-1.0.so.0 => /usr/lib/aarch64-linux-gnu/libpangoft2-1.0.so.0 (0x0000ffff89b90000)
	libfontconfig.so.1 => /usr/lib/aarch64-linux-gnu/libfontconfig.so.1 (0x0000ffff89b30000)
	libfribidi.so.0 => /app/lib/libfribidi.so.0 (0x0000ffff89b00000)
	libepoxy.so.0 => /usr/lib/aarch64-linux-gnu/libepoxy.so.0 (0x0000ffff899a0000)
	libXi.so.6 => /usr/lib/aarch64-linux-gnu/libXi.so.6 (0x0000ffff89970000)
	libX11.so.6 => /usr/lib/aarch64-linux-gnu/libX11.so.6 (0x0000ffff89820000)
	libatk-bridge-2.0.so.0 => /usr/lib/aarch64-linux-gnu/libatk-bridge-2.0.so.0 (0x0000ffff897d0000)
	libtracker-sparql-3.0.so.0 => /usr/lib/aarch64-linux-gnu/libtracker-sparql-3.0.so.0 (0x0000ffff896e0000)
	libXfixes.so.3 => /usr/lib/aarch64-linux-gnu/libXfixes.so.3 (0x0000ffff896c0000)
	/lib/ld-linux-aarch64.so.1 (0x0000ffff8b1be000)
	libxkbcommon.so.0 => /usr/lib/aarch64-linux-gnu/libxkbcommon.so.0 (0x0000ffff89660000)
	libwayland-client.so.0 => /usr/lib/aarch64-linux-gnu/libwayland-client.so.0 (0x0000ffff89630000)
	libwayland-cursor.so.0 => /usr/lib/aarch64-linux-gnu/libwayland-cursor.so.0 (0x0000ffff89610000)
	libwayland-egl.so.1 => /usr/lib/aarch64-linux-gnu/libwayland-egl.so.1 (0x0000ffff895f0000)
	libXext.so.6 => /usr/lib/aarch64-linux-gnu/libXext.so.6 (0x0000ffff895c0000)
	libXcursor.so.1 => /usr/lib/aarch64-linux-gnu/libXcursor.so.1 (0x0000ffff895a0000)
	libXdamage.so.1 => /usr/lib/aarch64-linux-gnu/libXdamage.so.1 (0x0000ffff89580000)
	libXcomposite.so.1 => /usr/lib/aarch64-linux-gnu/libXcomposite.so.1 (0x0000ffff89560000)
	libXrandr.so.2 => /usr/lib/aarch64-linux-gnu/libXrandr.so.2 (0x0000ffff89540000)
	libXinerama.so.1 => /usr/lib/aarch64-linux-gnu/libXinerama.so.1 (0x0000ffff89520000)
	libfreetype.so.6 => /usr/lib/aarch64-linux-gnu/libfreetype.so.6 (0x0000ffff89450000)
	libgraphite2.so.3 => /usr/lib/aarch64-linux-gnu/libgraphite2.so.3 (0x0000ffff89420000)
	libpixman-1.so.0 => /usr/lib/aarch64-linux-gnu/libpixman-1.so.0 (0x0000ffff89370000)
	libpng16.so.16 => /usr/lib/aarch64-linux-gnu/libpng16.so.16 (0x0000ffff89320000)
	libxcb-shm.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-shm.so.0 (0x0000ffff89300000)
	libxcb-render.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-render.so.0 (0x0000ffff892e0000)
	libxcb.so.1 => /usr/lib/aarch64-linux-gnu/libxcb.so.1 (0x0000ffff892a0000)
	libXrender.so.1 => /usr/lib/aarch64-linux-gnu/libXrender.so.1 (0x0000ffff89280000)
	libz.so.1 => /usr/lib/aarch64-linux-gnu/libz.so.1 (0x0000ffff89250000)
	libjpeg.so.62 => /usr/lib/aarch64-linux-gnu/libjpeg.so.62 (0x0000ffff891d0000)
	libmount.so.1 => /usr/lib/aarch64-linux-gnu/libmount.so.1 (0x0000ffff89150000)
	libffi.so.8 => /usr/lib/aarch64-linux-gnu/libffi.so.8 (0x0000ffff89120000)
	libpcre2-8.so.0 => /usr/lib/aarch64-linux-gnu/libpcre2-8.so.0 (0x0000ffff89080000)
	libexpat.so.1 => /usr/lib/aarch64-linux-gnu/libexpat.so.1 (0x0000ffff89040000)
	libatspi.so.0 => /usr/lib/aarch64-linux-gnu/libatspi.so.0 (0x0000ffff88ff0000)
	libdbus-1.so.3 => /usr/lib/aarch64-linux-gnu/libdbus-1.so.3 (0x0000ffff88f80000)
	libjson-glib-1.0.so.0 => /usr/lib/aarch64-linux-gnu/libjson-glib-1.0.so.0 (0x0000ffff88f40000)
	libxml2.so.2 => /usr/lib/aarch64-linux-gnu/libxml2.so.2 (0x0000ffff88dc0000)
	libsqlite3.so.0 => /usr/lib/aarch64-linux-gnu/libsqlite3.so.0 (0x0000ffff88c70000)
	libbz2.so.1 => /usr/lib/aarch64-linux-gnu/libbz2.so.1 (0x0000ffff88c40000)
	libbrotlidec.so.1 => /usr/lib/aarch64-linux-gnu/libbrotlidec.so.1 (0x0000ffff88c20000)
	libXau.so.6 => /usr/lib/aarch64-linux-gnu/libXau.so.6 (0x0000ffff88c00000)
	libblkid.so.1 => /usr/lib/aarch64-linux-gnu/libblkid.so.1 (0x0000ffff88b90000)
	libsystemd.so.0 => /usr/lib/aarch64-linux-gnu/libsystemd.so.0 (0x0000ffff88aa0000)
	liblzma.so.5 => /usr/lib/aarch64-linux-gnu/liblzma.so.5 (0x0000ffff88a60000)
	libicui18n.so.71 => /usr/lib/aarch64-linux-gnu/libicui18n.so.71 (0x0000ffff88720000)
	libicuuc.so.71 => /usr/lib/aarch64-linux-gnu/libicuuc.so.71 (0x0000ffff88510000)
	libicudata.so.71 => /usr/lib/aarch64-linux-gnu/libicudata.so.71 (0x0000ffff867f0000)
	libbrotlicommon.so.1 => /usr/lib/aarch64-linux-gnu/libbrotlicommon.so.1 (0x0000ffff867b0000)
	libcap.so.2 => /usr/lib/aarch64-linux-gnu/libcap.so.2 (0x0000ffff86790000)
	libgcrypt.so.20 => /usr/lib/aarch64-linux-gnu/libgcrypt.so.20 (0x0000ffff86690000)
	libzstd.so.1 => /usr/lib/aarch64-linux-gnu/libzstd.so.1 (0x0000ffff865d0000)
	liblz4.so.1 => /usr/lib/aarch64-linux-gnu/liblz4.so.1 (0x0000ffff86590000)
	libgpg-error.so.0 => /usr/lib/aarch64-linux-gnu/libgpg-error.so.0 (0x0000ffff86550000)

@KRTirtho
Copy link
Owner

Please check is there /app/spotube/lib is available or not
If it's there try with

$ cd /app/spotube
$ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/app/spotube/lib" ./spotube

@spazziale
Copy link
Author

spazziale commented Sep 15, 2023

Please check is there /app/spotube/lib is available or not If it's there try with

The lib dir does not exist.

ls:
com.github.KRTirtho.Spotube.appdata.xml flutter_assets icudtl.dat libapp.so libcatcher_plugin.so libfile_selector_linux_plugin.so libflutter_linux_gtk.so libflutter_secure_storage_linux_plugin.so liblocal_notifier_plugin.so libmedia_kit_libs_linux_plugin.so libmedia_kit_native_event_loop.so libmetadata_god.so libscreen_retriever_plugin.so libsystem_theme_plugin.so libsystem_tray_plugin.so liburl_launcher_linux_plugin.so libwindow_manager_plugin.so libwindow_size_plugin.so spotube spotube-logo.png spotube.desktop

@KRTirtho
Copy link
Owner

Ok so the Zip messed up the folders

@KRTirtho
Copy link
Owner

This time it should work. Using the tar.xz for installation

$ flatpak install --user https://dl.flathub.org/build-repo/48962/com.github.KRTirtho.Spotube.flatpakref

@spazziale
Copy link
Author

Now it works but it has a strange layout (uses pc layout instead of android layout). how can i fix it?

@KRTirtho
Copy link
Owner

That's super easy barely an inconvenience
Just go to "Settings" > "Layout Mode" & select "Compact"
Btw you can turn on the "Settings" > "Use system title bar" to get rid of the window buttons

Also can you share some screenshot, I want to see it so much 😄

@spazziale
Copy link
Author

spazziale commented Sep 22, 2023

sorry for responding so late, I've been busy

everything works as planned. I can't send screenshots since I'm using gnome-shell-mobile which is alpha quality. Thank you very much! Two suggestions:

1- automatic updates should be disabled, as flatpak should handle them
2 - layout mode should be adaptive by default

As soon as you publish the arm version on flatpak ( or you start a new build with the bot ) I will send you some screenshots 😁

@Potomiho
Copy link

Potomiho commented Sep 23, 2023

I saw this and couldn't resist to test that on Librem 5.

So first of all the link you provided with the build is already gone, so I built the flatpak locally on the phone with this patch basing on this.

Now to run it there were some issues with GTK3/GDK3 already partially fixed on upstream (this issue specifically) but required additional backport from GTK4. Again compiled manually and required to install all dev dependencies (GTK3 Meson submodule based build is known to not work there)

I also needed to modify flatpak Gnome SDK/Platform and copy over all files. Finally I froze them, so no modifications would go in there with unwanted updates.

If anyone would like to go the same path I can share the more detailed steps.

Anyway few screens from L5:
Screenshot from 2023-09-23 12-49-15 Screenshot from 2023-09-23 12-18-28 Screenshot from 2023-09-23 12-14-11

From issues - scrolling is quite painful (requires to 'grab' the scroll on the edge of screen - no gestures).
From good sides - playback works like a charm as probably most of other stuff.
I didn't had much time to test yet though - I just completed my journey and wanted to share it.

Anyway 10/10 would do that again.

@KRTirtho Thanks for all your work! I can finally play music in my car without doing some convoluted setups!

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 23, 2023

Glad that it worked & congrats on getting it working 🎉
And WOW, those screenshots are looking beautiful ✨

So first of all the link you provided with the build is already gone, so I built the flatpak locally on the phone with this patch basing on this.
Now to run it there were some issues with GTK3/GDK3 already partially fixed on upstream (this issue specifically) but required additional backport from GTK4. Again compiled manually and required to install all dev dependencies (GTK3 Meson submodule based build is known to not work there)
I also needed to modify flatpak Gnome SDK/Platform and copy over all files. Finally, I froze them, so no modifications would go in there with unwanted updates.

Not sure why this much configuration was needed. Btw, there's spotube-linux-nightly-aarch64.tar.xz which should work out of the box if all required runtime packages are installed

@KRTirtho KRTirtho moved this to In progress in Spotube Board Sep 27, 2023
@KRTirtho
Copy link
Owner

KRTirtho commented Sep 27, 2023

Steps to build the flatpak locally:

  1. Git clone
    $ git clone https://github.com/KRTirtho/com.github.KRTirtho.Spotube --recursive --shallow-submodules --depth=1 --single-branch
  2. Build the flatpak
    $ flatpak-builder --user --install --force-clean build com.github.KRTirtho.Spotube.yml

@PhilDevProg
Copy link

Steps to build the flatpak locally:

  1. Git clone
    $ $ git clone https://github.com/KRTirtho/com.github.KRTirtho.Spotube --recursive --shallow-submodules --depth=1 --single-branch
  2. Build the flatpak
    $ flatpak-builder --user --install --force-clean build com.github.KRTirtho.Spotube.yml

I tried building it but got this error:

Applying patch intltool-perl5.26-regex-fixes.patch
Error: module intltool: Failed to execute child process ?patch? (No such file or directory)

I then installed intltool via sudo apt install intltool but now I get this error:

Applying patch intltool-perl5.26-regex-fixes.patch
patching file intltool-update.in
error: Unknown option -g
Error: module intltool: Child process exited with code 1

@KRTirtho KRTirtho mentioned this issue Nov 26, 2023
1 task
@kero990
Copy link

kero990 commented Dec 7, 2023

I tried to compile the arm64 version on the latest source code, but encountered an error and couldn't find libdiscord rpc.so. After checking, it was found that the file exists, but it is x86 library. I found the referenced project and found that the file does not have the source code. The Discord rpc project itself only provides x86 version libraries.

So what should we do? Can't we compile the arm64 version in the future

@KRTirtho
Copy link
Owner

KRTirtho commented Dec 8, 2023

Just remove dart_discord_rpc dependency and these lines from main.dart

  1. import 'package:dart_discord_rpc/dart_discord_rpc.dart';
  2. spotube/lib/main.dart

    Lines 67 to 69 in e4eb0e2

    if (DesktopTools.platform.isWindows || DesktopTools.platform.isLinux) {
    DiscordRPC.initialize();
    }

@Kabouik
Copy link

Kabouik commented Jan 11, 2024

If anyone would like to go the same path I can share the more detailed steps.

@Potomiho I would be very interested in installing it on Droidian, which should be pretty similar to Purism. Could you please share more details on what I should do as of today (I have no knowledge with flatpak building)?

Alternatively, @KRTirtho could you put the arm64 versions back on Flathub? I saw there were links to them in the above posts, but they're now gone, which is why @Potomiho had to build the flatpak locally. But if there were builds working on your side, that'd be even better (less work for arm64 users).

@Kabouik
Copy link

Kabouik commented Jan 11, 2024

Oh wait, I missed the following. I'll try that first.

Not sure why this much configuration was needed. Btw, there's spotube-linux-nightly-aarch64.tar.xz which should work out of the box if all required runtime packages are installed

@Kabouik
Copy link

Kabouik commented Jan 11, 2024

Sorry for the spam, but I assume it is best to send notifications rather than making edits that no one may ever read if they already read the previous message version in their email.

So I realized there actually are aarch64 builds now in nightly builds, which is great news! However, I think there's an error as the aarch64 package is actually build as an amd64 package:

sudo dpkg -i Spotube-linux-aarch64.deb
dpkg: error processing archive Spotube-linux-aarch64.deb (--install):
 package architecture (amd64) does not match system (arm64)
Errors were encountered while processing:
 Spotube-linux-aarch64.deb

I haven't had success from the AppImage or tar.xz files either yet (need to figure out how to install Flutter SDK on aarch64; I found this but didn't manage to make anything useful out of it, I hope I can find instructions elsewhere).

@theofficialgman
Copy link

Hi are there any holdups here? Would love to have aarch64 officially supported on flatpak.

@Peperehobbits01
Copy link

This issues as been fixed, could you please close this issues to help reading trhow the issues for developers and let them not have to verify if a issues as already been fixed please. 😉

@theofficialgman
Copy link

This issue is not fixed. There is no aarch64 flathub release currently https://github.com/flathub/com.github.KRTirtho.Spotube/blob/master/flathub.json

@Peperehobbits01
Copy link

This issue is not fixed. There is no aarch64 flathub release currently https://github.com/flathub/com.github.KRTirtho.Spotube/blob/master/flathub.json

Oh shit I send it in the wrong issues sorry.

@Kabouik
Copy link

Kabouik commented Aug 13, 2024

Thanks a lot, works like a charm on Droidian:

mpv-shot0001

@KRTirtho
Copy link
Owner

The pure joy of seeing my app running on platforms I've never used is just out of this world
image

@Peperehobbits01
Copy link

Thanks a lot, works like a charm on Droidian:

mpv-shot0001

Droi what?

@RokeJulianLockhart
Copy link

#715 (comment)

@Peperehobbits01, presumably https://droidian.org/.

@Kabouik
Copy link

Kabouik commented Aug 13, 2024

Yes, that's that OS, and that is why I was also very interested in an aarch64 Linux build instead of the Android apk (although I can run it in Waydroid, I prefer not depending on Waydroid when I can).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Deployed
Development

Successfully merging a pull request may close this issue.

9 participants