PDA

View Full Version : long build time



bvanevery
03-29-2013, 03:44 AM
I think that one memcpy fix retriggered the entire build. Did the source pool get a lot bigger somehow in the last week or two? The build took 3..4 hours and I don't remember it taking this long before. Coulda sworn it was 1+ hour before but I haven't rigorously benched anything.

Judas
03-29-2013, 05:29 AM
The newer modules (clanCompute, clanCSSLayout, clanGameIDE, clanPhysics2D, clanPhysics3D, clanScene3D) got added to the build script. That probably increased it a lot.

A complete rebuild of all the modules with VS2012 on my old Intel Quad Core (pre i7) computer takes about 3 minutes and 15 seconds.

The Linux build, however, takes considerably longer time. This is partly because gcc is the slowest of the three popular compilers (msvc, clang and gcc), but also because the Linux build uses no precompiled headers. My personal autoconf+automake skills are too poor to add this to the Linux build, so I can't help in fixing this.

rombust
03-29-2013, 08:22 AM
Remember to use "make -j9" when compiling on Linux.

On debian, I think it's around 15 minutes for a rebuild on my machine. (Not sure of the exact time)

Another developer tried precompiled headers, and got it to work - but did not send a patch (It was for the examples)

What makes it tricky is that each component contains it's own precomp.cpp. (excluding clanApp)
And each precompiled file is huge

Maybe an option is to create a global "gcc_precomp.[cpp][h]" that includes the non clanlib headers. And put inside "precomp.h" "#ifdef __GCC #include gcc_precomp.h #endif"

It's a tricky task, for whoever wants to do it

bvanevery
03-29-2013, 02:04 PM
I'll try make -j next time.

CMake doesn't appear to have cross-platform precompiled header support, although some experimental work has been done (http://public.kitware.com/Bug/view.php?id=1260). It is possible to deal with precompiled headers manually; I don't know how tricky it is with GCC.

Premake (http://industriousone.com/topic/exclude-pch-usage-file) has a "pchsource" and "pchheader" syntax, suggesting cross-platform support. I'm not sure how capable it is.

I personally would never invest a lot of labor in an Autoconf build. I view them as maintenance / legacy systems, appropriate for tweaking here and there. Things like this, it's better to get it right with 1 build system that covers all platforms.

rombust
03-29-2013, 07:50 PM
If using CMake, a macro would probably be a better aproach.

https://gist.github.com/larsch/573926

Looks good for GCC and Visual C++

bvanevery
03-29-2013, 08:13 PM
Doesn't that look like fun to figure out? :D Well if you suddenly decide you want to do your build in CMake, just let us all know. I would see what Premake can do before committing to that, frankly. You might get a nicer build system out of that deal.

rombust
03-29-2013, 10:15 PM
From a quick google...

CMake ... "Proven", "used by Ogre3D", "CMake uses it's own internal scripting language ", "The syntax is really horrible"

Premake ... "customizable using Lua scripting", "premake seems to be easier to understand and mantain."

Quote: "I ended up just downloading both and trying them out to see which one I liked best. I ended up going with premake because I'm familiar with Lua. "



It is going to be difficult to decide. My gut feeling is that premake is preferable.

It will be interesting to explore.

[Edit] The "Bullet" library uses Premake

bvanevery
03-29-2013, 11:02 PM
Let me put it this way. I've done heavy duty CMake development, even for money, and know what its weaknesses are. It works, it's better than Autoconf, it's a solid development community, and it's field proven for very large projects. But it is not a joy to work with, and I had a major falling out with the developers. I'm willing to patch someone else's CMake build as I know the ropes, but I'll never be a CMake buildmaster again. For me that's "turning back the clock" and I don't do that. I'll either discover and prove that something else off the shelf works, of which I've identified Lua-based Premake as the most likely candidate. Or I'll finally someday write a build tool that's better than anything currently out there.