Home » Community » Forums » » KJam - a new build tool for game development
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 KJam - a new build tool for game development
Post Reply 
Just out of interest: in the benchmarks on the KJam website, did you run GNU make with -j 2?

 User Rating: 1322   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

It sounds pretty cool, but it's too bad that it's not usable for most open-source projects.

 User Rating: 1015    Report this Post to a Moderator | Link

Why is that?

 User Rating: 1464   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Of course, otherwise the test would hardly be fair.

I will note that both kjam and gnu make only use one process for their scanning and dependecy building, so the number of processors and threads should not matter for those tests.

I tried making the kjam scanning phase multi-threaded, but it didn't help performance. Right now scanning with kjam is disk bandwidth limited, even with a fast raid0 disk array, so further optimization of the scanning phase won't make kjam faster unless disk bandwidth starts to improve faster than raw cpu speed.

Scanning using jam is usually disk limited also, which is why jam and kjam have similar performance for many of the scanning only tests. Gnu make and MSbuild have slow scanners and are cpu bound.

-rafael

 User Rating: 1015    Report this Post to a Moderator | Link

Doh. In case it isn't clear im responding to SHilbert.

 User Rating: 1015    Report this Post to a Moderator | Link

DrEvil: Because of it's current license: "KJam Preview may be used freely for the development of non-commercial software. It may only be used by commercial software projects for the purpose of evaluation for a period of 60 days." For most open-source projects it's quite hard to define if they are "non-commercial", because a lot of them are used and sold (with support etc.) commercially.

Another such build tool is SCons, i haven't used it extensively, but so far it looks quite well. Would be nice to see a comparison between scons and kjam...

-Raven


 User Rating: 1018   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by RavenMokel
DrEvil: Because of it's current license: "KJam Preview may be used freely for the development of non-commercial software. It may only be used by commercial software projects for the purpose of evaluation for a period of 60 days." For most open-source projects it's quite hard to define if they are "non-commercial", because a lot of them are used and sold (with support etc.) commercially.

Another such build tool is SCons, i haven't used it extensively, but so far it looks quite well. Would be nice to see a comparison between scons and kjam...

-Raven

SCons is pretty powerful (mainly because the scripts are in Python), but it's unlikely to have a compile speed advantage over KJam from the results I've seen. For me, SCons always takes a second or two just to start up and scan the scripts and files and decide what to do. Also, their default way of checking if files have changed involves comparing MD5 signatures (although apparently this isn't a major culprit in affecting speed overall). In one of the newsgroup posts in 2005, the founder of SCons said "SCons will never be as fast as Make, because it *is* doing more for you under the covers."

That said, SCons is my preferred way of building stuff on Linux, because it's way cleaner and more flexible than make. I've also toyed with the idea of using it in place of VS2005's build system on Windows just by virtue of it working a lot more nicely with custom tools and build steps, which I have a lot of.

 User Rating: 1322   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Quote:
Original post by Anonymous Poster
Of course, otherwise the test would hardly be fair.

I will note that both kjam and gnu make only use one process for their scanning and dependecy building, so the number of processors and threads should not matter for those tests.

I tried making the kjam scanning phase multi-threaded, but it didn't help performance. Right now scanning with kjam is disk bandwidth limited, even with a fast raid0 disk array, so further optimization of the scanning phase won't make kjam faster unless disk bandwidth starts to improve faster than raw cpu speed.

Scanning using jam is usually disk limited also, which is why jam and kjam have similar performance for many of the scanning only tests. Gnu make and MSbuild have slow scanners and are cpu bound.

-rafael

Okay, I figured you did, I just didn't see it mentioned anywhere.

 User Rating: 1322   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

My issues with build systems are that they simply aren't well documented enough and when there are problems, its damn hard to diagnose.

We do lots of cross platform work, from mobile phones to GBA, DS, XBox, GC, PS2, PSP and even some relatively unknown embedded platforms and there's no halfway decent dependency generator/checker for C/C++ based projects. Using GCC -M or whatever is useless in this case, as some of the compilers don't even have the option let alone the abysmal speed at which it runs. I ended up writing a dependency generator, in about a page of python, out of sheer desperation.

I'm also curious who in their right mind would want to add dependencies manually, line by line in a jamfile/makefile? Surely it would have to be a tiny project, with few programmers, for this to be workable? How does Jam/KJam work with non-source based assets?

The biggest problem seems to lie with all these 'build systems' having no decent working examples. I, for one, need examples of using multiple cross compilers for multiple platforms using the same code base, with specific directories or source files for specific platforms, all with a cross platform dependency generator. Does this exist? Does KJam do all this? I tried to interpret plain JAM docs and was left wondering how anyone had enough time to bother in a real world situation.

I appologies if this all comes across as negative or aggressive, its not intended that way...

Cheers,
Mark


 User Rating: 1124   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

A prime example of successfull JAM usuage is Boost.
Though, they use their own JAM (Boost.Build) for it.

 User Rating: 1062   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Rompa,

We have worked hard to make excellent documentation for KJam, with not only a very complete reference document, but also serveral quick start guides, and numerous example build environments.

With KJam and other Jam variants you don't have to specify dependencies manually. KJam comes with its own built-in dependency scanner which runs before every build. The dependency scanner is KJam is much much faster than the dependency generator in gcc. ( To be fair, the dependency generator in GCC expands all yout macros first and KJam doesn't do that ).

You can, if you want specify dependencies manually, but you would use this for special cases where it isn't worth it to figure out an automatic way to generate them.

KJam can figure out dependencies between files if you can provide KJam with a text file from which it is possible to deduce the dependencies. So for example if you have a text data file that lists all the assets that get compiled into your runtime data files, KJam can read those files and figure out which models and textures need to be re-exported and packed into your runtime data store. What KJam can't do is figure out dependencies hidden in binary files. So if you have a binary model file with references to textures. If you update a referenced texture KJam won't know to re-export that model file.

-Rafael



 User Rating: 1015    Report this Post to a Moderator | Link

Good work, but too late. CMake already took the place.

 User Rating: 1015    Report this Post to a Moderator | Link

How about platform customisation? I mainly develop on a Mac, and while it is a unix box, if you want nice userland apps you have to use Apple's highly non-standard packaging systems (for shared libraries, etc.). This involves lots of customised search paths, compiler and linker flags, and even build paths. Unfortunately, I haven't found a build tool that is really flexible enough to allow this, without maintaining entirely separate make/build files.

as a quick example, to link to the OpenGL library on normal unix:
gcc ... -lgl -I/usr/include/gl

and for a userland Mac program:
gcc ... -framework OpenGL

which automatically determines the include path to be:
/System/Library/Frameworks/OpenGL.framework/Headers

As you can see, somewhat of a nightmare for cross-platform build tools.

 User Rating: 1743   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Rafael,

Thanks for your comments - it sounds good. I remember (about 6 months ago) playing with JAM for a bit and found it painful in that my "platform" was obviously never listed in the default jamfile and I effectively had to replace most of it. Is KJAM similar/same?

Cheers

 User Rating: 1124   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Rompa,

For a project which is just building fairly standard c and c++ into libraries and executables using MSVC or GCC then the built-in jambase files should work very well and you won't need to write your own jambase files.

If you need to do other things - not yet forseen in the built-in jamfiles, then you will need to write your own jambase like you would have to do with Jam. This is a task similar in scope to writing your own base make files.

SwiftCoder,

Yeah that is annoyingly different. I haven't yet made a mac port of Kjam so, its kind of moot, but in principle kjam could handle this problem. You would need to create a file that lists the associations between libraries and include dirs, and then when you process the link flags have that modify the list of include dirs for that target. It would be straightforward to write.

-Rafael

 User Rating: 1015    Report this Post to a Moderator | Link

Quote:
Original post by Rompa
My issues with build systems are that they simply aren't well documented enough and when there are problems, its damn hard to diagnose.

We do lots of cross platform work, from mobile phones to GBA, DS, XBox, GC, PS2, PSP and even some relatively unknown embedded platforms and there's no halfway decent dependency generator/checker for C/C++ based projects. Using GCC -M or whatever is useless in this case, as some of the compilers don't even have the option let alone the abysmal speed at which it runs. I ended up writing a dependency generator, in about a page of python, out of sheer desperation.

I'm also curious who in their right mind would want to add dependencies manually, line by line in a jamfile/makefile? Surely it would have to be a tiny project, with few programmers, for this to be workable? How does Jam/KJam work with non-source based assets?

The biggest problem seems to lie with all these 'build systems' having no decent working examples. I, for one, need examples of using multiple cross compilers for multiple platforms using the same code base, with specific directories or source files for specific platforms, all with a cross platform dependency generator. Does this exist? Does KJam do all this? I tried to interpret plain JAM docs and was left wondering how anyone had enough time to bother in a real world situation.

I appologies if this all comes across as negative or aggressive, its not intended that way...

Cheers,
Mark



Mark,
I've been using KJam for almost nine months now on a project that compiles to multiple platforms and has multiple compilers. After using SCONS in our last project I can say that this is much easier to maintain.

Also, the documentation is pretty indepth and any addtional questions I've had were answered by Rafael promptly via email.

-= Dave

 User Rating: 1184   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Nice job.

Feature request: create a tool to automatically configure KJam from a Visual Studio .sln and add a .txt file to make users know how setup distributed compilation over the company network. Users will then be able to rapidly compare the results.

Bernard.

 User Rating: 1015    Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: