which compilers do we want to support with KDE 4 ?

Alexander Neundorf neundorf at kde.org
Sat Jan 21 12:48:19 GMT 2006


Hi,

...
> For me, it seems the KDE developers are quite up-to-date in what
> distributions updates says, that means the most of us are almost always
> with latest compilers. 

It's not only about the developers, it's also about the users. Users with 
distros where everything was compiled using gcc 3.2 will not be able to run 
KDE if it requires an ABI incompatible version of gcc (at least troubles).

> That means supporting older compilers is a problem
> for most of us, as the code we write compiles with the compiler we are
> using, so we commit it, then we discover it does not compile on older
> versions.
>
> So, what to do? How can i be sure that my code will compile in a compiler i
> don't have? The only answers i can find is:
>
> a) Everyone uses the lowest common denominator compiler. This is very
> difficult as usually you do not want to be running older versions when
> newer are available
>
> b) We write "specs compilant" code. This is not as difficult as a)
> difficult, you can check it with a book, or wathever, the problem is that
> older compilers we could want to support are not as specs compilant as we
> would want, so this does not help either.
>
> c) There is someone that does the changes to make it compatible with older
> compilers. I am not completely against this, but the problem is that
> sometimes it results in "worse" code.

d) Stay away from *advanced* template usage (and maybe other advanced C++ 
features, no problems so far with gcc 3.2.3)

> So what is my opinion?
>
> Be a bit agressive now and ask for gcc 4.0.x or similar capable compilers
> for KDE 4.x because KDE 4 will be around for quite time (maybe 3 years?)

If we would go for gcc >= 4.0 , count me out for the next weeks.
And probably not only me. 
We already lost a lot of developer time by the switch from cvs to svn, we have 
to invest time in the switch of the buildsystem, and with requiring gcc >= 
4.0 we would have to invest time so that every developer can upgrade his 
distribution to gcc >= 4.0 ?
Might turn out as a killer for KDE 4.

The problematic code is in kdelibs/kxmlcore. This is really heavy template 
stuff, not easy to understand for the average developer with limited spare 
time (at least not for me).
The problem here isn't supporting some "old" compilers, it's to support *only* 
compilers which are able to handle advanced template code. For the Apple 
developers this is no problem, they have only gcc >= 4.0.

After all, we're not talking about some weird ancient compiler, but about 
*gcc*, version 3.2.3, released April 2003, i.e. not even three years old. 

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list