The people who really know the answer to this question are those who develop for programs or libraries which are included in Linux distributions, and which depend on other libraries which are included in Linux distributions. Them just telling me what they do in terms of the development environment I'm describing would be helpful.
The problem basically is thus:
Linux distributions bundle the Linux kernel with typical Linux plumbing - glib, dbus, udev and the like. Most also bundle desktop environments like KDE or Gnome.
While the distribution may have a few bundling program packages of its own, most of programs and libraries come from upstream, meaning sources other than itself. Packages like dbus are "upstream" and flow downstream to distributions such as Debian, Fedora, Ubuntu and the like.
Sometimes I use these programs and feel they can be improved. Some of the improvements are bug fixes that can't really be argued with - say a small patch that prevents a segmentation fault from an unneeded memory violation.
When building these packages, one thing distributions include are "depends" lists, as many of these programs rely on certain libraries (and certain versions of those libraries), and some of those libraries rely on other libraries. This leads to some of the complications I am encountering.
If I encounter a bug in a program or library and report it upstream, a common question is, "are you using the latest version in source control, or an older version". Understandably, the developers want me using the code from the latest commit, as they don't want to waste time retracing ground they have already covered, especially if the bug has been fixed.
So I go to get the latest commit. But then I encounter a problem because the latest commit now depends on a library which is newer than my operating system uses.
An example might be is if I am looking at a PDF with the default reader in Ubuntu, evince. It is not displaying properly due to what appears to be a flaw in the poppler library evince depends on. So I post a bug, but they want to know if I have the latest poppler version. So I download the latest poppler commit, but the poppler library depends on the cairo library, and my OS does not have the latest cairo library. So I have to get that - but then cairo complains I don't have the latest pixman and x11 libraries.
This is one example of this, but it goes for pretty much any package.
So my question is, what is a good Linux distribution to use for this sort of thing? One which is known for having the most up-to-date packages, or at least the option to get them easily?
Or maybe a Linux distribution that more easily allows me to do such things. I have heard talk about how Gentoo builds from source via emerge, and I could see this solving a lot of problems.
There's also the option of having a subsystem of the latest packages in a chrooted environment within another system using tools such as pbuilder and debootstrap.
Lastly, I could just download the latest commits of all libraries, build the one with no dependencies I'm concerned with first, and then go to the next one and build that, pointing the program to use my compiled local library, not the system library, and then do that again and so on. This is what I'm trying to avoid for a number of reasons (way too much manual mucking around, I might miss an important dependency etc.)