hotspot icon indicating copy to clipboard operation
hotspot copied to clipboard

build appimage with static runtime

Open lievenhey opened this issue 1 year ago • 9 comments

This allows the user to run the appimage on non fuse2 systems (all moderns systems use fuse3). This is achieved by using the static appimage runtime. Since linuxdeploy doesn't support changing the runtime I only use it to create the appdir directory. Then I use the original appimagetool to package the appimage using the static runtime.

This should also make it possible to run the appimage on a non glibc system but I don't have access to one so I can't test it.

fixes: #485

lievenhey avatar Jan 23 '24 10:01 lievenhey

@GitMensch since you seem to have access to a non glibc system (unlike me) can you test if the appimage works there? I can confirm it works on ~ubuntu:23.04~ ubuntu:23.10 which uses fuse3.

lievenhey avatar Jan 23 '24 10:01 lievenhey

@milianw I applied your changes. I will push an update once I build the docker container.

lievenhey avatar Jan 23 '24 10:01 lievenhey

Rechecked old appimage on Alpine:

Alpine:~$ ./hotspot-v1.4.1-294-g7474981-x86_64.AppImage
-ash: ./hotspot-v1.4.1-294-g7474981-x86_64.AppImage: not found
Alpine:~$ ldd ./hotspot-v1.4.1-294-g7474981-x86_64.AppImage
        /lib64/ld-linux-x86-64.so.2 (0x7fdddd997000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7fdddd997000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fdddd997000)
        libz.so.1 => /lib/libz.so.1 (0x7fdddd97d000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fdddd997000)
Error relocating ./hotspot-v1.4.1-294-g7474981-x86_64.AppImage: gnu_dev_makedev: symbol not found

new one:

Alpine:~$ ./hotspot-v1.4.1-295-gcd4518d-x86_64.AppImage
fuse: failed to exec fusermount: Permission denied

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage
if you run it with the --appimage-extract option.
See https://github.com/AppImage/AppImageKit/wiki/FUSE
for more information
open dir error: No such file or directory

Note: I do get the same error message on Debian, while the old one worked :-( Seems like the first thing is to get the appimage to run again on Debian, before we check back on Alpine.

Alpine:~$ file ./hotspot-*
./hotspot-v1.4.1-295-gcd4518d-x86_64.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
./hotspot-v1.4.1-294-g7474981-x86_64.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=30e06184968532b6a9aa36f44ada39e4af0bda56, for GNU/Linux 2.6.32, stripped

One of the nice things: the new one is around 12% smaller than the old one.

GitMensch avatar Jan 23 '24 11:01 GitMensch

note: the Debian one has libfuse2 installed, the Alpine environment no libfuse, seems the static part of this is missing.

GitMensch avatar Jan 23 '24 13:01 GitMensch

Test results so far: Arch Linux: works Debian 11: works Debian 12: works Ubuntu 22.10: works Ubuntu 23.10: works CentOS 7: works Alpine 3.19: no, missing symbols

all cleans installs (except Arch Linux CentOS 7 and Alpine where I installed kde)

lievenhey avatar Jan 23 '24 14:01 lievenhey

Do you have any idea why the previous appimage works fine on my Debian 11.8, but the one from this one fails with a fuse error (and my Alpine experiencing the exact same thing)?

GitMensch avatar Jan 23 '24 14:01 GitMensch

Alpine has lots of unresolved symbols, debian no idea

lievenhey avatar Jan 23 '24 14:01 lievenhey

Until we find out why that appimage does not run on environments it previously did, I suggest to mark this PR as draft.

GitMensch avatar Feb 28 '24 15:02 GitMensch

Rechecked this PRs appimage on updated Debian 11.9: still getting

/tmp/hotspot-v1.4.1-295-g2a27d2a-x86_64.AppImage
fuse: failed to exec fusermount: Permission denied

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage
if you run it with the --appimage-extract option.
See https://github.com/AppImage/AppImageKit/wiki/FUSE
for more information
open dir error: No such file or directory

while the appimage outside of this PR works fine.

I really like to have the appimage be more portable, including to non-glibc Linux environments, but until this is solved we likely should mark it as draft.

GitMensch avatar Apr 15 '24 07:04 GitMensch