Almost all of my experience is in Windows development but I need to port an application to Linux. The problem I'm having is how do I make binaries that will work across all the different distributions?

In particular, it seems to be glibc that is causing me problems. Everything else I need I can link against statically. But if I build my app on, say, Redhat 7.1 I can't run it on 6.2 because it requires glibc 2.2. It doesn't seem to matter whether I link glibc statically or dynamically.

And then what happens if I build on Redhat and my customer is running Debian? I haven't yet tried this but I recall reading somewhere that those distributions aren't binary compatible.

This probem has to have been solved. How do commercial vendors release software in binary form? Am I going to have to maintain build and test environments for every possible flavor of Linux? Please say it ain't so!

-Dylan