First of, I've found this similar question How to make a portable Linux app? but it doesn't really address my questions, it's more about how to compile to make the application portable which I already know how to do (at least I think I do) and not about deployment as I will explain below.
This is my situation. We've been hired to solve a certain problem for a client, so we'll be developing a closed source application which we intend to sell to them. However, we have not been given any specifics about where it should be able to run, with that I mean what distribution, kernel version or anything really. The task is fairly simple and doesn't depend on any low level drivers or anything that would complicate making it portable. We do however depend on a couple of 3rd party libraries, the following is a simple scheme of the dependencies:
app --+-- libA | +-- lib1 +-- libB --+-- lib2 +-- lib3
Where libA,B and lib1,2,3 are all open-source projects with suitable licenses (LGPL, ASL and BSDs). Once compiled, the shared dependencies of our program become libA, libB, lib1, lib2, lib3 and a bunch of system libraries such as libc, libm, libz, libstdc++, libpthread, etc. Everything is linked dynamically.
Now, since we don't have a target distribution we want to keep this independent of any packaging system like .deb or the like. The direct dependencies (libA and libB) are not very common, so the obvious choice is to deliver them altogether with our application. lib1,2,3 are actually more common (ie one of them is libpng) although still not certain they'll be installed in the target system. We've decided to include all 5 of them in the final software package.
What we have no idea what to do with is the system libraries. How should we handle this? Do we just assume they'll have the correct libraries and pray for the best? In such case, what would happen in a year or two when one of those libraries changes and our application stops working?
Should we distribute all of them (libstdc++, glibc, etc) with our software? This doesn't feel right and I think it might be going against the licensing terms in them. I know I've used some programs in the past which actually carried their own copy of [at least] some of those libraries, it actually caught my attention because it was an older version than the one in my system and interchanging them made everything stop working (which I found out by accident).
How is this usually handled?