I'm trying to build my application so that it can be run on as many linux distributions as possible without any additional dependencies. For that, I build Qt statically and link my app against it. Now I can run the app on any linux that uses the same gcc and glibc ABIs.
Since I'm using Gentoo on my box, I always have the latest versions on my system. As a result, the apps I build are also dependent on the latest gcc/glibc. That's definitely not what I want. I can for example not run my app on a distribution which is two years old.
I did some research on my options:
- Linking gcc and glibc statically: this doesn't seem to be an option according to http://www.trilithium.com/johan/2005/06/static-libstdc/
- statifier: doesn't work reliable. On some distributions, this will silently crash the app.
- LSB: basically a great idea, especially the possibility to run a test to see on which distributions the app will run/not run. However, this only covers very popular or enterprise distributions. A good example that this doesn't suit me: Gentoo has no LSB support at all! No way to run such an app on my system. So that's not an option for me either.
- Building with a very old version of gcc/glibc: the ABIs should be backward compatible. So if I build with gcc 3.4.6 and glibc 2.3.2, the app should run on any sytem that uses the same version or above. I've looked into creating a cross-compiling environment for those old libs, but that's acutally pretty nasty thing todo. It appears to be easier to simply build my app on an old linux distribution that has the suitable versions.
So here is my question: what's the best linux distribution regarding gcc/glibc compatibility? My guess is it should an old distribution, maybe something from 2005 or before. I've tried building on CentOS 4.7 (RHEL4-based, gcc 3.4.6, glibc 2.3.4 and an quite pleased by the result: the resulting executable runs fine on my gentoo, on Knoppix 5.2 and Debian Sarge 3.1. Does anyone around here have any experience on the subject or can recommend a better option/distribution?
Bookmarks