Linked by Eugenia Loli on Fri 23rd Feb 2007 02:49 UTC, submitted by ronaldst
KDE When a project with the size and scope of KDE gets to be as big as it is, sometimes changing a decision established almost a decade earlier is very difficult. KDE has relied on autotools to build most of the project since its inception, but for the last year, KDE 4 has been building with CMake, a newer build system that is rapidly becoming a heavyweight contender. Read on for more.
Order by: Score:
Sounds good
by Schmeggma on Fri 23rd Feb 2007 03:32 UTC
Schmeggma
Member since:
2006-01-14

almost all of the KDE developers would now be considered CMake newbies. The CMake developers have been personally involved in ensuring that KDE's transition is as smooth as possible.

Good to see such a close relationship between the KDE and CMake devs. I knew about the move to CMake but not really much about it, though judging purely on the comments in this article it's going to be a great improvement for KDE and a good system for many other projects too.

Being a Gentoo user, the "CMake searches for dependencies several times faster than the './configure' process did. CMake builds KDE 4's kdelibs about 40% faster than autotools build KDE 3.5.6's kdelibs" bit sounds good. ;) I've always found build times a disadvantage for KDE apps. (It's worth it though.)

Edited 2007-02-23 03:36

Reply Score: 5

RE: Sounds good
by troy.unrau on Fri 23rd Feb 2007 04:49 UTC in reply to "Sounds good"
troy.unrau Member since:
2007-02-23

judging purely on the comments in this article it's going to be a great improvement for KDE and a good system for many other projects too.

Yeah, that was sort of the purpose of this article. CMake is really a great buildsystem (it has it's quirks too), but it's really helped KDE a lot during the KDE 4 developer cycle. So, we thought it'd be a good thing to post about our good experiences so that other projects may consider CMake as well. Maybe raise awareness for CMake, after all they've done for us.

Reply Score: 5

RE[2]: Sounds good
by superstoned on Fri 23rd Feb 2007 09:15 UTC in reply to "RE: Sounds good"
superstoned Member since:
2005-07-07

CMake rules - absolutely. It's much better capable of doing incremental builds, which saves a lot of time.

Reply Score: 2

v Sheesh
by fsckit on Fri 23rd Feb 2007 03:42 UTC
RE: Sheesh
by PLan on Fri 23rd Feb 2007 03:50 UTC in reply to "Sheesh"
PLan Member since:
2006-01-10

...Other projects have been switching to CMake too, including (but not limited to): Scribus, Rosegarden (switched from SCons), PlPlot, ChickenScheme, and more. ...

It's not only about KDE in reality ...

Reply Score: 2

RE: Sheesh
by MamiyaOtaru on Fri 23rd Feb 2007 03:51 UTC in reply to "Sheesh"
MamiyaOtaru Member since:
2005-11-11

Pretend this is an article about cmake then. It's an interesting build system with which not many people are familiar.

At any rate, this isn't a "little piece of KDE." It's a large fundamental change. People may recall Patrick dropped Gnome support from Slackware because of the difficulty inherent in building it. KDE was easier, and cmake should make it even more so. It's worthy news imho.

Reply Score: 5

v RE[2]: Sheesh
by fsckit on Fri 23rd Feb 2007 04:04 UTC in reply to "RE: Sheesh"
RE[3]: Sheesh
by smitty on Fri 23rd Feb 2007 04:26 UTC in reply to "RE[2]: Sheesh"
smitty Member since:
2005-10-13

Troy Unrau puts out this weekly article, which I don't think is too often as long as they stay interesting.

Why not one comprehensive article? Or we could just wait for the Release announcement/Release notes, if/when they finish building this beast.

The whole point of this series of articles is to keep interest high for KDE4 by showing progress that is being made. Waiting for the official release would just result in a lot of comments about KDE4 being vaporware, as Thom's article did before these articles started coming out.

Reply Score: 5

RE[4]: Sheesh
by postmodern on Fri 23rd Feb 2007 07:02 UTC in reply to "RE[3]: Sheesh"
postmodern Member since:
2006-01-27

I honestly don't understand these claims of KDE being vap-o-ware that people try to float around. One can simply go to svn.kde.org and view all their code so far.

I believe a better term would be "work in progress".

Reply Score: 5

RE[5]: Sheesh
by Darkelve on Fri 23rd Feb 2007 07:39 UTC in reply to "RE[4]: Sheesh"
Darkelve Member since:
2006-02-06

In a way, maybe it's better. Otherwise you get all those comments b*tching about issues that aren't really there, just because they look at the WIP as if it was the final release.

Edited 2007-02-23 07:40

Reply Score: 2

RE[6]: Sheesh
by smitty on Fri 23rd Feb 2007 07:48 UTC in reply to "RE[5]: Sheesh"
smitty Member since:
2005-10-13

The last article about okular had someone spouting off about how okular wasn't as polished as evince or the mac's doc viewer. I think he got about 10 replies or so, all telling him that you can't expect a pre-alpha release to be more polished than released software. Some people just have no common sense. :-)

Edited 2007-02-23 07:49

Reply Score: 4

RE: Sheesh
by reldruh on Fri 23rd Feb 2007 04:17 UTC in reply to "Sheesh"
reldruh Member since:
2007-02-05

Actually, one of the future articles is about the new Oxygen theme. I don't see what your problem is. This is a series of articles, each about a completely different topic. They're also very good articles. They're meant to show how kde is developing while the process is still ongoing. As far as I can tell, your complaint is that you don't have to wait months and months for the actual release, to read one enormous article (at which point you could just use the software).

Reply Score: 5

RE[2]: Sheesh
by butters on Fri 23rd Feb 2007 05:20 UTC in reply to "RE: Sheesh"
butters Member since:
2005-07-08

They're also very good articles.

I like the idea of the series, and I agree with the other comments to the extent that the articles keep interest in KDE4 high and claims of vaporware low, but I think that many of these articles suck, quite frankly.

This one was pretty good, but some of the others were extremely bad. The first one on Decibel comes to mind. So if Troy is still reading this thread, keep doing the article series, but work a little harder on the articles. For instance:

Give a good overview of what the particular component does (it's purpose and rationale) in the second paragraph, right after the teaser. I don't want to read about the history of pdf viewers in KDE before finally getting a good idea of how Okular is different somewhere in the middle of the article.

More screenshots, code/shell snippets, and other visuals. It breaks up the text and keeps the reader's interest. I know for a fact that CMake has a nice UI for configuring builds, but you didn't show it, and instead claimed that you can't show screenshots of a build system. This simply isn't true. You could have shown how KDevelop integrates with CMake, and you could have also demonstrated a "hello world" CMakeLists.txt file.

Reply Score: 3

RE[3]: Sheesh
by aseigo on Fri 23rd Feb 2007 05:37 UTC in reply to "RE[2]: Sheesh"
aseigo Member since:
2005-07-06

you're confusing "the road to kde4" series (which troy authors and this article is one of) and "the pillars of kde4" series (which is done by someone else, and which the decibel articles are a part of). think of it like "CSI" and "CSI: New York", they have the same theme but topics and quality may vary. =)

you do have some interesting ideas though .. perhaps you could conspire with troy or nathan or one of the other writers to help make things even better

you mention kdevelop .. that's something that is starting to come into its own as well, btw, and would do well with an article in the next while.

Edited 2007-02-23 05:48

Reply Score: 5

RE[4]: Sheesh
by Doc Pain on Fri 23rd Feb 2007 06:19 UTC in reply to "RE[3]: Sheesh"
Doc Pain Member since:
2006-10-08

"think of it like "CSI" and "CSI: New York", they have the same theme but topics and quality may vary. =)"

Just like "CSI: Wanne-Eickel" and "CSI: Stasi". :-)

But back on topic: I found the article quite interesting allthough I'm not a KDE developer (and surely won't be). The article furthermore mentioned the use of SNV (obsoleting CVS) for source control of KDE.

At least, cmake seems to need less dependencies than the classical way due to the optimized toolchain.

Reply Score: 2

RE[3]: Sheesh
by postmodern on Fri 23rd Feb 2007 06:54 UTC in reply to "RE[2]: Sheesh"
postmodern Member since:
2006-01-27

#
# A "hello world" CMakeLists.txt example
#

message("hello world!")

There, now are you satisfied? ;)

Edited 2007-02-23 06:55

Reply Score: 4

RE[3]: Sheesh
by troy.unrau on Fri 23rd Feb 2007 16:44 UTC in reply to "RE[2]: Sheesh"
troy.unrau Member since:
2007-02-23

This one was pretty good, but some of the others were extremely bad. The first one on Decibel comes to mind. So if Troy is still reading this thread, keep doing the article series, but work a little harder on the articles.

Fortunately for me, I wasn't the one responsible for the Decibel article. That one was produced by the KDE-promo team, a mostly ineffective design-by-committee type group. I write my articles on my own time and independent of any KDE influence. I usually go directly to the developers of a given component for my information rather than spend time bikeshedding with the promo folks.

Regarding your other suggestions, yes I could have wrote all of that content and made the article twice as long, but most of it is already covered in the various links I provided. I try not to get too technical, as my audience is mostly non-developers.

Reply Score: 5

autohell
by Redeeman on Fri 23rd Feb 2007 12:13 UTC
Redeeman
Member since:
2006-03-23

i have also tried using autotools and cmake, both in kdevelop and outside, and i must say, i NEVER had anything but trouble trying to manage autotools, hell, i gave up, its a freaking mess, i simply found it MUCH more managable to have a build bash script, where i wrote it all manually, it worked, was fast, and i could do that. since then i have been testing cmake, and it really just works, it also adds nice progress showing to the build process ;) not required, but nice nonetheless.

Reply Score: 2

RE: autohell
by load_mic on Fri 23rd Feb 2007 13:30 UTC in reply to "autohell"
load_mic Member since:
2005-12-13

I'm glad to see I'm not the only one cursing automake.

Reply Score: 1

RE[2]: autohell
by panzi on Fri 23rd Feb 2007 13:47 UTC in reply to "RE: autohell"
panzi Member since:
2006-01-22

Well, maybe the maturity is still using autotools, but I think the maturity is also cursing autotools. ;)

Btw.: There are computer science professors (Technical University Vienna) who insist that their students have to use autotools, just because they never heard of anything else! And I'm thinking of a particular professor who isn't that old that he could have lost touch which the current world of computer science. I think the new systems like scons[1], waf[2] and cmake[3] need more media attention!

Apropos: A comparison article between scons, waf and cmake (and maybe autotools) would be a very nice thing.

[1] http://scons.org/
[2] http://www.freehackers.org/~tnagy/bksys.html
[3] http://www.cmake.org/HTML/Index.html

Reply Score: 3

RE: autohell
by crystall on Fri 23rd Feb 2007 13:54 UTC in reply to "autohell"
crystall Member since:
2007-02-06

autotools are fairly hard to use but the real problem for me was the horrible lack of documentation for newbies. Now I'm quite familiar with them and I have even used many of the advanced features they offer but this has costed me a lot of time reading info files and even peeking into autoconf's sources. CMake looks way easier to learn and as a plus can be used in already 'autotoolized' projects without disrupting the existing infrastructure. However not being too familiar with it I wonder if it offers all the most advanced features of the autotools.

Reply Score: 2

RE[2]: autohell
by Ookaze on Fri 23rd Feb 2007 15:52 UTC in reply to "RE: autohell"
Ookaze Member since:
2005-11-14

Autotools are actually fairly easy to use. What is hard, as always, is to grasp how it works. And there is plenty of documentation and tutorial for that.
The hardest part, is actually to find these tutorials, for beginners. They should be linked directly on the automake and autoconf pages. Only the general documentation is, and that's not what you want.
The hardest part of autotools must be m4, which is a new macro description language you have to learn.
I find autotools are still better than CMake, for the few things I know about CMake.
Basically, CMake was no better than autotools for KDE, but contrary to autotools makers, CMake makers had time to listen to KDE devs, and helped them.
You won't see that from autotools makers, as autotools are already well established.

Also, I see some KDE devs are still dishonest at best. Because the main reason for CMake, is actually that it can make project files for MacOS, Visual Studio and specific Kdevelop ones too. Of course, it would be harder with autotools, which is not made for that, AT ALL.
Also, it is not made to scale to KDE kind of projects, which is basically an archive containing several projects, and you must be able to compile selectively one or several of them.

This article is completely dishonest too, as the toolchain for cmake also includes sh and perl, and the one for autotools doesn't require automake, autoconf or m4. That's a pure lie. A project made with autotools shouldn't need anything more than sh, libtool and make to build : that's its purpose, and that's why it's slow !

Reply Score: 1

RE[3]: autohell
by troy.unrau on Fri 23rd Feb 2007 17:12 UTC in reply to "RE[2]: autohell"
troy.unrau Member since:
2007-02-23

Also, I see some KDE devs are still dishonest at best. Because the main reason for CMake, is actually that it can make project files for MacOS, Visual Studio and specific Kdevelop ones too.

While this is indeed a nice side effect, this is not the reason we switched to CMake. We knew at the outset of KDE 4 that we'd be moving away from autotools, since it got too messy for such a large project with so many custom generated files. SCons was our first candidate, but the SCons developers were unreceptive to changes we were suggesting in order to make it more modular and so forth. After several months of struggling with SCons, CMake support was added in days. Being able to build XCode, KDevelop, etc. project files was not the reason we chose CMake.

This article is completely dishonest too, as the toolchain for cmake also includes sh and perl, and the one for autotools doesn't require automake, autoconf or m4. That's a pure lie. A project made with autotools shouldn't need anything more than sh, libtool and make to build : that's its purpose, and that's why it's slow !

Well, you obviously haven't taken a very close look. CMake has no perl dependencies.

And KDE did require automake, autoconf, and m4, the reason being that the ./configure script was not hand coded. KDE 3.x (and earlier) in CVS/SVN had no ./configure script, and so forth. This had to be autogenerated when you checked KDE out from the repository by running
'make -f Makefile.cvs'
It needed to be regenerated every time you added/moved/renamed/etc. a single file to KDE. This whole system was very slow, and KDE had invented ways of speeding up this toolchain, including an optional in-house rewrite of automake (called unsermake) which sped the process up significantly, but introduced a python build dependency.

Also, libtool was probably the main offender for poor compilation performance. Simply losing libtool from the toolchain accounts for most of the build speed gains we've obtained for KDE 4.

You've got to remember that KDE isn't pure C++, we've got all sorts of other things to deal with when building. XML-defined config classes, dbus interface classes from XML, documents to generate from raw source, Qt moc file to generate from the headers, .ui files to compile that create the code powering dialogs, translation files to generate, and so forth. Writing ./configure and Makefiles by hand is pretty much a nightmare when you get to a project of KDE's size, so we had to resort to automake and autoconf. So no, it is not a lie. Those were our old dependencies, and our new dependencies are cmake and make.

Reply Score: 5

RE[4]: autohell
by Ookaze on Fri 23rd Feb 2007 18:47 UTC in reply to "RE[3]: autohell"
Ookaze Member since:
2005-11-14

I should have said "one of the main reasons" CMake was chosen, instead of "the main reason", OK.

And I agree with you about the dev build stage of KDE. What bothers me is that with your comparison, you mixed the dev build phase and the release build phase. The build phase of KDE never required the autotools or even m4, unless you modified some code, but this wasn't said. And the perl dependancy is entirely a choice of yours, not a dependancy brought by the autotools.
And I don't deny either that the KDE build system with autotools was a mess. What bothers me, is that you say that goes with using autotools, which is not true at all.
Had you said that the autotools authors had no will to help you, I would understand.
And I know most of the problems KDE had was linked to the fact that you use C++, that you used the special preprocessor of Qt (moc), and that you wanted to generate XCode or VS projects.

Reply Score: 2

RE[5]: autohell
by aseigo on Fri 23rd Feb 2007 22:15 UTC in reply to "RE[4]: autohell"
aseigo Member since:
2005-07-06

> that you say that goes with using autotools

let's put it this way then: autotools doesn't scale to the size and complexity of a project such as kde without it becoming an exercise in almost constant pain and suffering. we simply outgrew what autotools could reasonbly provide.

i personally don't care about windows and macos support (i understand the benefits for the project, etc, but it doesn't directly improve my life in any form) and cmake has made my kde devel life much easier now that the build system is non-arcane, faster and smaller.

the transition way painful, but it has paid off huge dividends already.

Reply Score: 5

RE[6]: autohell
by Richard Dale on Sat 24th Feb 2007 15:05 UTC in reply to "RE[5]: autohell"
Richard Dale Member since:
2005-07-22

i personally don't care about windows and macos support (i understand the benefits for the project, etc, but it doesn't directly improve my life in any form)

I think autoconf/automake is a complete pile of crap, and anyone who has tried to use it for non-trivial cross-platform builds probably thinks the same. I am quite happy to learn m4, automake syntax etc as long as it actually delivers on cross-platformness, but it doesn't.

I would like to not have to care about Windows and Mac OS X support, but a large percentage of QtRuby users need it. Autohell problems have really inhibited the growth of the QtRuby community, and consequently QtRuby has a reputation for being very difficult to build on Windows and Mac OS X (you have to use a combination of autoconf/qmake/extconf to get it built). I expect once I have a release with cmake builds working properly on Windows and Mac OS X, and building a qtruby gem, the QtRuby user base will be at least 5 times larger.

Reply Score: 2

Will other projects follow?
by Phil on Fri 23rd Feb 2007 12:21 UTC
Phil
Member since:
2005-07-06

If we can assume for a second that I'm too lazy at the moment to look this up for myself...

Does anyone know of the reasons that stop more people from moving away from autotools? What would be really interesting is if anyone can say why they've chosen autotools recently, over any of the alternatives.

I have a lot of respect for what autotools has done, and what it can still do; but these days it's starting to look the hack it is. The idea of still using shell scripts and stepping through build steps in sequence as written is hardly fitting for modern systems.

Is it really just tradition and stability? Is there actually nothing that's reached equivalent portability maybe? Any answers would be appreciated, thanks!

Reply Score: 1

v hhhff
by jennifergmclaurin on Fri 23rd Feb 2007 13:51 UTC
CMake: best new tool in a long time
by braddock on Sat 24th Feb 2007 02:41 UTC
braddock
Member since:
2005-07-08

I just recently moved a 30k line project to CMake, and I have not regretted it. The CamelCase filenames and some of the syntax _is_ a bit dorky. But it really does the job with much less fuss even than straight Makefiles, let alone my previous autotool nightmares.

My CMakefiles are half the size of my old combination of Makefiles and shell scripts, and FAR less contorted.

I expect a huge number of Open Source projects to start switching now that KDE has pushed CMake into proven maturity.

Reply Score: 2

queru..........
by jennifergmclaurin on Mon 26th Feb 2007 04:39 UTC
jennifergmclaurin
Member since:
2006-12-20

anything but trouble trying to manage autotools, hell, i gave up, its a freaking mess, i simply found it MUCH more managable to have a build bash script, where i wrote it all manually, it worked, was fast, and i could do that.

Reply Score: 1