[KDE Dot News]
 faq
 flatforty
 contribute
 subscribe
 configure
 search
 rdf

 main


  KDE to Migrate to bksys/SCons Build System
Developer Posted by Jonathan Riddell on Sunday 11/Sep/2005, @08:28
from the do-we-get-to-keep-libtool? dept.
At the build system BoF at aKademy it was decided to start moving the KDE 4 build system from unsermake to the SCons/Python based system bksys. To find out more about this important future technology, KDE Dot News talked to its lead developer Thomas Nagy about the reasons behind the change and what it will mean for KDE developers.

Thomas is ita on IRC

Please introduce yourself and your role in KDE.

My name is Thomas Nagy (I am also known as 'ita' on freenode). I have spent some time writing some KDE utilities (solvers, small games) and adding some features to KDE applications such as KOffice and Kalzium when i was still a student. Since i graduated i have spent more time trying to create complete applications like kdissert, a mind-mapping tool for the creation of documents and its build system bksys.

What is SCons and what is bksys?

SCons is a software construction tool which is used to build and install programs. It is written in Python and its design is modular, making it easy to extend for use with unsupported compilers or complicated build rules.

bksys (as in Build Kde SYStem) extends SCons and aims at replacing the autotools. It has been written in the main place for compiling and installing kdissert and became more modular over the time. The most important feature is the object-oriented style API that can be accessed from either Python code or throughout XML description files.

Some more documentation describing the framework can be found in the the slides from my aKademy 2005 presentation.

Why is bksys separate from SCons?

bksys aims at replacing completely autotools for common projects, so this goes way beyond SCons' main goals.

In which way are they better than autotools?

There are many improvements over the autotools, but I will try to describe the most striking ones:

  • Reliability: targets are rebuilt if compilation flags are changed or if md5sums of the files changed
  • Size: 100KB (miniSCons included) vs 600KB (autotools)
  • Simplicity: one language (Python) versus at least 3 (m4, posix sh, make) for autotools (GNU/make, automake, autoconf, libtool); no intermediate file to generate for the compilation process (Makefile.in, Makefile)
  • Configuration: the configuration process is fast, easy to control and to modify
  • Flexibility: SCons can be extended easily thoughout modules. Besides, helpers can be written easily to help programmers (take all source files in a directory, or check automatically the consistency of the builds for example). SCons also has excellent support for win32 and OSX platforms, it handles many languages like Java or Fortran out of the box.
  • Evolution: the API and the code written for compiling the targets are re-usable so projects using it will not be locked.

How do they compare to unsermake?

Unsermake is a replacement for make and automake only. Bksys replaces the whole autotool chain.

Can you summarise the build system BoF at aKademy?

Several candidates were evaluated. QMake is way too limited and cannot be used at all. Unsermake is not to be kept, as it is only a partial solution and emulating the behaviour of automake and make consumes a lot of resources. Two solutions remained in competition for the future KDE build system: CMake and SCons.

CMake is a Makefile generator like QMake; it uses a macro language which is known to present several risks as non-standard targets arise frequently in KDE. On the other hand SCons is much more flexible as it is based on Python, and was proven to work on fairly complex applications already (KDE Games, Rosegarden, ..). SCons was then chosen and the conversion of kdelibs 4 has started.

So what work needs to be done now?

So far, the main goal of bksys has been to replace autotools for usual KDE projects. Now for kdelibs the situation is a bit different as the tool will be the base of all KDE applications, so a new framework has to be designed, in particular:

  • We have to agree on a new set of API (stardard targets, naming, features...)
  • New bksys modules have to be written for detecting the system configuration (full autoconf replacement)
  • Some work has to be done for writing config.h files
  • More helpers will have to be written to make programmers lifes easier (scan for sources automatically..)

At the very moment, the bksys scripts have been added to KDE SVN, and 3 main directories in kdelibs 4 are already compiling (dcop, libldlt, kdefx). There is some documentation in trunk/KDE/kdelibs/bksys/design. The main aspects of the future framework are presented, and some questions are left opened to discuss.

In the past, the kdegames module was converted in about 2 days, but for kdelibs it will take a lot more time as even after the framework is complete some reverse-engineering will have to be done on the Makefile.am to achieve the conversion. I am striving at the moment to get a first version of the framework ready (most configuration modules complete and a few folders compiling) to show how the new system will look like and the main advantages of using it.

Who is going to do the work?

.. or who is working on it already? Three people have committed code on bksys in svn so far, Simon Haussmann, Stephan Kulow and I. Interesting ideas have been raised on the IRC, and I am awaiting more comments, when the first version of the framework is ready for testing (a request for comments will be posted).

Are non-KDE projects taking up SCons/bksys?

Most projects using SCons do it directly and use their own framework, like Blender or Rekall. The projects using the bksys layer i know of are almost all KDE-oriented: Rosegarden, kio-locate, skim...



<  |  >

 

  Related Links
 ·   Articles on Developer
 ·   Also by Jonathan Riddell
 ·   Contact author

Thread Threshold:

The Fine Print: The following comments are owned by whomever posted them.
( Reply )

Over 40 comments listed. Printing out index only.
Dependencies
by Jakob Petsovits on Sunday 11/Sep/2005, @08:48
So, does that mean that KDE mandatorily requires Python as dependency?
Or does this only matter on source-based distros like Gentoo?
[ Reply To This | View ]
BK?
by john on Sunday 11/Sep/2005, @09:07
Thought BK sttod for bit keeper for a sec - wondered why KDE developers wanted to open that can of worms again :)
[ Reply To This | View ]
Sounds Good
by Segedunum on Sunday 11/Sep/2005, @09:56
Sounds good to me. The existing build and tools chain is an absolute pain to work with at any time. With this and the use of things like unit tests should make KDE a very nice desktop to develop for, and develop with than it is already. Done right this could certainly attract more developers and contributors to KDE come KDE 4.
[ Reply To This | View ]
KDE is on the ball
by am on Sunday 11/Sep/2005, @10:28
First Subversion, now a new build system. What's next? Ditching Bugzilla for Trac? ;-)

This is great work so keep it up!
[ Reply To This | View ]
distributed compiling (distcc)
by fast_rizwaan on Sunday 11/Sep/2005, @11:04
Is it possible to build using distccd with scons like "unsermake -p -j4 CXX=distcc"
[ Reply To This | View ]
KDevelop integration?
by ac on Sunday 11/Sep/2005, @13:10
How are the issues (hard to parse existing Python build scripts since they are too powerful to catch all possibilities) raised in the past on the mailinglists about integration of the new building system into KDevelop to be solved? Strictly limiting API/syntact to the amount understood/supported by KDevelop? With everything not complying being thrown out from the SVN? Who is going to monitor this?
[ Reply To This | View ]
Hooray...
by Carlo on Sunday 11/Sep/2005, @15:00
...for not choosing CMake!
[ Reply To This | View ]
porting now
by Ian Monroe on Sunday 11/Sep/2005, @19:17
Would it make any sense to move amaroK 1.4 to bksys? Could we do so and keep autoconf? Sounds like most of the TODO list for bksys is configuration related.

Of course, I can't imagine amaroK is that much more complicated then kdegames if at all. Its just that there are several features that have to be enabled/disabled.

(BTW, codeine is another KDE project using scons).
[ Reply To This | View ]
ant?
by Florian on Monday 12/Sep/2005, @00:54
Hello,
what is about the Java based Apache ant? Why is this not suitable?

Florian
[ Reply To This | View ]
HP-UX
by Tom Matelich on Monday 12/Sep/2005, @07:53
Hopefully this will help with my goal to use KDevelop on HP-UX. The main problem is -no-undefined being passed to libtool, which on HP makes it build static libs (hard to have a plugin thats built as a static lib).

Will BKSys be eliminating libtool?
[ Reply To This | View ]
Absolutely brilliant news!
by Max Howell on Monday 12/Sep/2005, @18:13
I've been using bksys for my projects for a while now. It is a wonderful build system it brings a smile to my face to use it where using automake/autoconf would always bring my hours of despair. Great choice to those who made it. Grats to the developer :-)

Also it means the source tarballs shrink dramatically. My tarballs for Filelight went from 600kB to 60kB. Bandwidth savings for all!
[ Reply To This | View ]
Working with scons
by Shiri Danan on Tuesday 13/Sep/2005, @01:57
Lately we were doing some testing to the scons build too we've but found it very difficult to work with since it was not so java oriented. Therefore I was wondering how did you handle the Java build in your system?. Did you implement the required changes/addiotions yourself or got some adequate reference from the Scons dev team?
[ Reply To This | View ]
Oh no, this is definately a shot in the own leg
by ac on Tuesday 13/Sep/2005, @02:59
If you allow, I am not a big fan of stuff that requires Python. It was a big pain to have Python stuff together with GNOME and I hoped that KDE would stay entirely free of it, not just runtime, but also buildtime. I feel a bit sad to say the truth because I've been following the Scons discussion on IRC for quite a while now amd came to the personal conclusion that Scons has absolutely no advantage over Auto* not to mention that this requires a new learning curve to the developers to keep on with the stuff and then in what aspects does it make stuff easier ? I was seriously considering keeping KDE as my main desktop of choice once I set up a new source based setup of my Linux system and Python was one of the main reasons that I wanted to get rid off. 40 mb of Python trash for just some config files - what's next MONO ?
[ Reply To This | View ]
Cross compiling
by Luciano on Tuesday 13/Sep/2005, @05:36
I must say this change is worrying me a bit.
Does the new build system provide cross compiling capabilities?
[ Reply To This | View ]
Oh no...
by Me on Tuesday 13/Sep/2005, @06:36
Autoconf/Auromake was already pretty bad, but at least (sometimes) only bash was required, now I will need to install another one of those scripting languages I really don't need nor want to have installed. Ok ok, so bash is probably not the most elegant way to program something, but at least bash is compact in the sense that it doesn't spill a shitload of files all over the filesystem (often in the wrong places). I was pretty pissed when I found out one had to have perl installed to get Gtk and GIMP to build. Has Jam been considered as an alternative?
[ Reply To This | View ]
Using it as a non developer.
by non-developer on Wednesday 14/Sep/2005, @05:23
Like many people I don’t develop KDE but I do compile it in order to use it.

Will I still be able to do:

./configure
make
make install
[ Reply To This | View ]
Sendmail
by Backwards on Thursday 15/Sep/2005, @10:51
Everyone should use sendmail because it's always been used and if you can't understand the config files then you obviously are too dumb to read the various documentation. Distros should never ship non-standard MTA's such as postfix even if they are easier to set up because everyone already knows the sendmail config files and you could ask anyone on irc and they'd be able to answer it for you.

</sarcasm>
[ Reply To This | View ]

 
The Fine Print: The previous comments are owned by whomever posted them.
( Reply )

  "That's something I don't know." -- David Faure
KDE®, "K Desktop Environment", "KDE Dot News", "got the dot?" and the KDE Logo® are trademarks or registered trademarks of KDE e.V. in the European Union, the United States and other countries. All other trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster. The rest: Copyright © 2000-2008 KDE e.V. for The KDE Project. For further information or comments on this site, please contact the Webmaster.
[ home | post article | flat forty | subscribe | search | rdf ]