linux OS distributions and linux apps compatibility

Started by RemiD, May 01, 2024, 08:37:00

Previous topic - Next topic

RemiD

hi  :)

i am not very familiar with linux OS, i have only tested 'ubuntu', just by curiosity.

as i understand there are different 'distributions' (different OS based on linux).

i am wondering if when an app has a linux 'version', does it mean that it is compatible with all different linux OSs 'distributions' ? i guess that yes, in theory, but in practice ?

can you suggest the most functional / stable linux OS 'distribution' ? my guess would be 'ubuntu' ?

i just want to be able to run some linux apps, a text editor, a web browser, connect to wifi...

thanks,

Derron

Quote from: RemiD on May 01, 2024, 08:37:00i am wondering if when an app has a linux 'version', does it mean that it is compatible with all different linux OSs 'distributions' ? i guess that yes, in theory, but in practice ?

No, absolutely a NO.


Each "app" can have dependencies. Eg a lot of graphical applications require an X-Server. It comes with stuff like "xinput" and also emits kind of "system events". For example BlitzMax' brl-modules rely on the existence of these x...tools and builds the "mouse/keyboard input handling" on it. It also uses it to create the "window" and all this stuff.

So "headless linux installs" won't be able to run these kind of applications (having this dependency). Next to x11 there is also "wayland" (in dev for some years) and of course tools to make "non wayland but x11 using" programs compatible with wayland (so a "layer" inbetween).

Next to the x-Server stuff applications can have dependencies like "qt" (of a specific version) or "gtk" or ...  you need to install libraries then which provide the required functionality for you.
On Windows the application would most probably be shipped with some DLL ... which is not what all Linux users "like". Not all are fancy to use "portable apps" (means they ship with everything they need).

Yet there exist users who do not care as long as things just "run". Which is why stuff like "snap" (Ubuntu only...) or "appimage" (the others) were "invented". They bunde specific library versions, your program, ... into one file and when "executing it" these things are used instead of potentially incompatible library versions on your system.


versions ... there is sometimes a version required which your system maintainers do not offer (yet, or "anymore" :D). So you might run into conflicts when trying to update libraries - because other libraries might not yet be ready to work with newers (especially when the "major version" changes - as these can break things).

Most important (imo) is "glibc". Each Linux distribution comes with a specific version of "glibc" (it is almost a core library ... albeit there exist "alternatives" - which is not used by all the major distributions for obvious reasons like "compatibility").

The issue with "glibc" is: it is "backwards compatible" but not "future compatible".
Means if you compile your programme on a distribution using "glibc 2.35" then it will NOT run on distributions having a glibc < 2.35.
But they run on systems using 2.36 and so on.

ronny@RonnyPC ~ $ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.6) 2.35

In a "Windows" world this would mean: You compile a program on Windows 10 and you can only run it on Windows 10 or newer (Windows 11 etc).


Some people want to use "bleeding edge" libraries and these sometimes require certain glibc versions (as minimum). So eg the "Cura" developers (3d printer software from ultimaker) wanted some new QT6 stuff (I think it was QT) and thus even their "appimage" (which tries to make things "portable") required newer glibc versions than the "oldest still supported/updates-providing ubuntu" had (same for Linux Mint, which is what I use).


This is why there are kind of "industry standard" library versions one needs to use to compile linux binaries so they run on "most" distributions
eg this one here:
https://vfxplatform.com/


As "simple users/developers" this means you will try to find the "oldest ubuntu" still compiling your stuff, and compile it there. For BlitzMax this will be Ubuntu 16.04 (which was released in 2016) but we also had it build (with adjustments) on an old CentOS 7 (for native 32bit builds using some very ancient GCC, released in 2014).
Chances are really high that the binaries will run on a majority of (graphical) linux installations (so Ubuntu, Mint, possibly Manjaro, Suse, ...).

But be aware that most distros are 64bit now - but some are still 32bit. I would say you can ignore the 32bit users as they most often just are "annoying" ("I do not update because i do not see any need, my computer of 2005 still plays 4k youtube videos!"). I bet > 95% of your potential linux users will run a 64bit distro.

Installing 32bit libraries on 64bit systems can come with a hassle - avoid this for your users.



bye
Ron

RemiD

wow ! thanks for all these infos :o

i don't want to code / compile stuff on linux OS, i just want to run some linux apps.

so i will have to check if these apps are compatible with which linux distributions. ok...