Best way of compiling applications to run on older linux distros

Tom Quarendon tom.quarendon@teamwpc.co.uk
Tue Nov 4 14:45:00 GMT 2008


> Are you kidding me?  I used to develop windows applications for a living 
> (before coming to my sense) and you'd *regularly* stumble upon GDI 
> inconsistencies between say 95, 98 and XP.  Don't give us this "Windows 
> works perfectly" line.  I used IRIX boxes to develop OpenGL applications 
> and same story there (mostly because IRIX wasn't POSIX.1 compatible).
We've never had any issues with Windows compatibility (we don't do 95/98 
so I don't care about those -- I treat those as seperate platforms) and 
building on 2003 server and the result working on other versions. The 
APIs are suitably #ifdeffed so you get what target you're after and the 
binary interface to the operating system is the same. You can ship a 
later runtime library dll if you want (which, critically, it appears you 
can't with gcc/libstdc++, and this seems to be the key issue).

> The most logical solution to this problem is to have VMs properly setup 
> so they can access your CVS [or whatever source control you have] and do 
> automated nightly builds with monitoring for which builds failed [or 
> failed to pass regression].  Sure it'll probably take time to setup, and 
> a bit of time to maintain, but in the long run it'll mean your 
> application(s) stand the best chance of being as widely deployable as 
> possible.  And given that you can pick up quad-core boxes with 4GB of 
> ram for cheap nowadays, it's not a huge investment to buy a half-dozen 
> of them to setup as your build-lab.

So again, you're implying that the only solution is to build on the 
lowest common denominator platform. That isn't obvious.
What happens if I build up, say, gcc 4.3 on a suitable Centos 4 box and 
compile on that. Will the result work on a customer's Centos 4 box? 
Answer isn't in any way obvious to me. Will the version of libstdc++ on 
a "normal" centos box work or will we have to ship our own? If we ship 
our own from the build machine will that work? Or will it have been 
compiled with the incompatible dynamic loader hash tables? Not obvious.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the Gcc-help mailing list