Application deployment lazarus / 21-General ---------------------------------------------------------------------- HB9FIH · 2022-07-19 11:27 I made an application within Linux Mate 20.3 For checking on another system I copied the directory to Ubuntu 2(2?).1 LTS (the latest version. On Ubuntu also runs sqlite3 and the dbBrowser. But my app is missing eg libsqlite3.so I assumed I could see anywhere what I need to copy to another system. (like on Win with Delphi) - all needed resources are in the app directory) What I am thinking wrong ? How is the way to solve such issues ? Tnx from Erich (a newcomer on Linux, Lazarus and SQLite) . ---------------------------------------------------------------------- af0815 · 2022-07-19 11:52 On Linux always install the needed packages with the systemtools and sometimes you need the *-dev (Development) packages too. ---------------------------------------------------------------------- MarkMLl · 2022-07-19 12:22 I don't believe this is an application-level problem, other than its being the application developer's responsibility to fail gracefully if a library is missing or cannot be located (see below for the distinction). It's really a system and system management issue: a system which is to be used for a specific purpose should already have prerequisite libraries installed. Regrettably, Debian derivatives don't have any provision for a manifest listing application prerequisites, and even if they did you'd have the standard problem of a user application being installed into ~ or possibly /usr/local (accessible to e.g. the staff group) but prerequisite libraries needing to be installed by root. There's two further issues. The first is that an app might need to support multiple API versions, this is particularly the case with MySQL etc. The second is that distinct from API versions, the majority of libraries are contained in files where the filename includes the library version number: there is usually a chain of symlinks to get to the binary library but this might only be set up when- as af0815 notes- the distro's -dev package is installed. Please note that I'm not saying that any of the above is painless or desirable. But the state of play is that if the major distreaux did settle on a manifest format it would probably be impenetrable XML: or even worse, it would be designed and imposed on the community by Lennart Poettering... far better to have accurate and intelligible documentation :-) MarkMLl ---------------------------------------------------------------------- HB9FIH · 2022-07-20 05:59 Thanks for the answers. I recognize it's not so easy - i'ts a fundamental condition. Further there are maybe different prerequisites for the kind's of Desktops also: GNOME,  KDE, Cinnamon,  MATE, Unity,  Xfce, LXQt, Pantheon. On the development PC is Mate, on the test PC is GNOME. I will further study abt this and try to find a solution. (in Delphi I check the necessary libs by the start of the program before this are used. Eg dll for Database, third part modules.  etc, because the user - or a anti virus system - is able to delete them) ---------------------------------------------------------------------- PascalDragon · 2022-07-20 06:45 Quote from: HB9FIH on July 20, 2022, 07:59:42 amFurther there are maybe different prerequisites for the kind's of Desktops also: GNOME,  KDE, Cinnamon,  MATE, Unity,  Xfce, LXQt, Pantheon. The desktop environment is more often then not less of a problem. But you need the libraries for the correct widgetset installed (GTK2 vs. Qt4 vs. Qt5); these libraries are in turn also used by the desktop environment and e.g. GNOME uses GTK while KDE uses Qt so if your application uses the other widgetset then you need to make sure that these libraries are installed. Quote from: HB9FIH on July 20, 2022, 07:59:42 am(in Delphi I check the necessary libs by the start of the program before this are used. Eg dll for Database, third part modules.  etc, because the user - or a anti virus system - is able to delete them) On Linux such dependencies are usually considered part of the system, after all they're installed with the system's package manager. You just need to make sure that the user knows what to install if they install manually (instead of retrieving your application from their package management system as well). ---------------------------------------------------------------------- MarkMLl · 2022-07-20 07:31 Quote from: PascalDragon on July 20, 2022, 08:45:52 amThe desktop environment is more often then not less of a problem. But you need the libraries for the correct widgetset installed (GTK2 vs. Qt4 vs. Qt5); these libraries are in turn also used by the desktop environment and e.g. GNOME uses GTK while KDE uses Qt so if your application uses the other widgetset then you need to make sure that these libraries are installed. Agreed. Gtk2 is- for the moment- fairly universal, although I've seen situations where an app and the distro-provided libraries are incompatible versions. Qt might need a shim file. MarkMLl ---------------------------------------------------------------------- HB9FIH · 2022-07-20 07:56 OK desktop seems not really a problem. For sqlite I tryed following: 1. copied the symlink libsqlite3.so and the libsqlite3.so.0.8.6 (its the real lib) to the app directory and changed the path in libsqlite3.so to them --> no success then 2. copied the libsqlite3.so.0.8.6 as libsqlite3.so --> no success (both set executable and the owner) I'll try more - eg make the same directory as on Mint - just checked , its the same the original installed: btw on Mint and Ubuntu are same versions - libsqlite3.so.0.8.6 - only in another directory. ---------------------------------------------------------------------- MarkMLl · 2022-07-20 09:08 I would very strongly recommend against copying system-level stuff around manually. You will do nothing but create problems for yourself. If you really do want a completely unprivileged solution, then either build libraries from scratch and link statically or investigate some sort of containerisation: Docker's a reasonable start, but even there there's potential issues. MarkMLl ---------------------------------------------------------------------- PascalDragon · 2022-07-20 11:34 Quote from: HB9FIH on July 20, 2022, 09:56:51 amFor sqlite I tryed following: 1. copied the symlink libsqlite3.so and the libsqlite3.so.0.8.6 (its the real lib) to the app directory and changed the path in libsqlite3.so to them --> no success then 2. copied the libsqlite3.so.0.8.6 as libsqlite3.so --> no success (both set executable and the owner) On Linux libraries are not loaded from the location of the executable. Just install SQLite in your Linux and be done with it. And as MarkMLI said, if you want something without privileged access then use some kind of container or AppImage or whatever.