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

Make appimage be able to work on any linux system (and some refactor of the script). #324

Merged
merged 2 commits into from
Nov 3, 2024

Conversation

Samueru-sama
Copy link
Contributor

@Samueru-sama Samueru-sama commented Nov 1, 2024

These changes make the appimage be able to work on any linux system, be it 15 years old or even musl distros. this is done by bundling all the libraries the nvtop binary needs + the ld-linux.so.

These changes are similar what the deploy everything mode of go-appimage does but I find it far easier to do it manually instead of fighting with the go-appimage parameters though.

Tested on Artix, Alpine (musl) and Ubuntu 20.04 (old Glibc).

The only downside is that this makes the appimage 2.4 MiB.

Also updated the readme to use 24.04 instead of 18.04, because with older versions you had to do stuff like using pip to install a newer cmake, none of this is needed anymore by building the appimage this way.

Edit: I'm linking an artifact if you want to test it, remove the .txt from the end.

nvtop-3.1.0-x86_64.AppImage.txt

@Syllo
Copy link
Owner

Syllo commented Nov 3, 2024

Hello,

Thank you for the patch.

Right, this bundles all the libraries and the dynamic linker in the Appimage.
I can't seem to find if it's recommended or anything online but I guess it's better for distro using an older glibc or no glibc

I can probably try a build on a distro with musl and link everything statically to reduce the size.

@Samueru-sama
Copy link
Contributor Author

Samueru-sama commented Nov 3, 2024

Hello,

Thank you for the patch.

Right, this bundles all the libraries and the dynamic linker in the Appimage. I can't seem to find if it's recommended or anything online but I guess it's better for distro using an older glibc or no glibc

It is fairly new practice done in go-appimage

Some examples here

I can probably try a build on a distro with musl and link everything statically to reduce the size.

If you can build nvtop statically then yeah all of this can be avoided.

Edit: even if it is not possible to build nvtop fully static, making it partially static is still ideal since that will likely still reduce the final size considerably.

For example this mpv appimage that I deploy with go-appimage, it gets built with a statically linked ffmpeg, which makes it 25 MiB, if that's not done and all the ffmpeg libs are bundled the final size ends up being ~80 MiB instead.

@Syllo Syllo merged commit 6e91c74 into Syllo:master Nov 3, 2024
@Syllo
Copy link
Owner

Syllo commented Nov 3, 2024

Sounds good, cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants