On 2018-08-21, Grant Edwards wrote: > There are a handful of 3rd party, closed-source apps that I run on my > Gentoo systems. Often they're available for RedHat or Ubuntu, > sometimes for "generic" Linux. > > The apps for "generic" Linux usually run without too much trouble, > since they tend to include most of the libraries they need bundled > with the package or linked statically with the executable. > > Apps packaged for RedHat or Ubuntu tend to rely on the host for far > more libraries (e.g. Qt or Gtk and underlying X11 stuff). Sometimes I > have to copy some libraries from a RedHat or Ubuntu system and set > LD_LIBRARY_PATH to point to that set of "private" libraries to get > these apps running. Manually figuring out which libraries are > required is a time-consuming and error-prone process. One of the ones > I use regularly is going to stop working one of these days because it > depends on qtwebkit-4.8, which has been EOL'ed on Gentoo. [So I'll > have to grab one more library from an Ubuntu system.] > > I've been thinking about trying to automate this by installing the app > on an Ubuntu or RedHat system and then running a bash script that uses > ldd et alia to find and bundle up the set of required library files. > (How deep to recurse in the tree of library dependencies will be a big > question.) > > If I understand what containers are (never used them), it occurs to me > that if I bundle up everything all the way down to libc and libgcc, I > might as well be using a container, right? > > Is this a good use case for containers, or is there some other way to > do this?
This is something I would like to do as well (grabbing all the required libraries for a given binary). Unfortunately, so far I didn't have enough time to look into it. But here's a link from my bookmarks, which might (or not...) be useful to you: http://www.ucc.asn.au/~dagobah/~dagobah/things/make-static.html -- Nuno Silva