Results 1 to 8 of 8

Thread: long build time

  1. #1

    Default long build time

    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.

  2. #2
    Master Sorcerer
    Join Date
    Sep 2006


    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.

  3. #3
    ClanLib Developer
    Join Date
    May 2007


    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

  4. #4


    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. It is possible to deal with precompiled headers manually; I don't know how tricky it is with GCC.

    Premake 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.

  5. #5
    ClanLib Developer
    Join Date
    May 2007


    If using CMake, a macro would probably be a better aproach.

    Looks good for GCC and Visual C++

  6. #6


    Doesn't that look like fun to figure out? 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.

  7. #7
    ClanLib Developer
    Join Date
    May 2007


    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

  8. #8


    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.

Similar Threads

  1. Replies: 9
    Last Post: 04-22-2013, 11:29 PM
  2. Build time is looooong :(
    By tehJP in forum Proton SDK
    Replies: 2
    Last Post: 08-13-2012, 02:29 PM
  3. Long term tank member and fan
    By AOEO in forum Tanked
    Replies: 7
    Last Post: 04-13-2012, 01:21 AM
  4. Long time
    By in forum RTsoft Tavern
    Replies: 0
    Last Post: 11-21-2005, 06:10 AM
  5. How long does it take
    By Mugombie in forum Funeral Quest
    Replies: 1
    Last Post: 05-01-2004, 10:45 AM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts