[mythtv] Using ccache for native builds in win32 build script

Lawrence Rust lvr at softsystem.co.uk
Mon Feb 21 18:35:06 UTC 2011


On Mon, 2011-02-21 at 18:39 +0100, Jonathan Martens wrote:
> On 21-2-2011 11:12, Lawrence Rust wrote:
> > I'm not sure that using ccache for the Qt build would be useful.  In a
> > normal environment Qt is built just once,  There should be relatively
> > few times when a clean build is necessary.  In those cases using ccache
> > could actually slow the build due to ccache saving the intermediates.
> 
> That might be true, I have not timed everything. The overhead of ccache 
> seems pretty low, but this is just a gut feeling. At the moment I am 
> still unable to compile Qt with ccache. For some strange reason it seems 
> to bail out looking for a file CreateProcess, which should is a native 
> Windows function AFAICT.

When you get Qt to build with ccache I should like to merge your
changes.  Is that OK?

> I do see a benefit for using ccache in Qt. By the nature of it's 
> mechanism ccache will also result in faster compilation of Qt when a new 
> version is released and used to build against as lots of the Qt files 
> will be the same, which then can be taken from the cache.
> 
> > I see that you create wrapper scripts for cpp, c++, gcc and g++  which
> > means that ccache will be used for every compilation.
> 
> Yes, the other way is symlinking or specifying a compiler command as a 
> define when compiling. Symlinking, does not work as it seems that MinGW 
> does not create real symbolic link, it seems to be more like a hard 
> link, which in itself is not supported as specified in the ccache docs.
> The define option could be an easier way to go when we do not want to 
> compile everything under ccache.

Have you tried building Qt using CC="ccache..." etc?  It might avoid the
problems you're seeing.

> > Incidentally, I got bored manually updating the script and patch
> > archives so I setup a git repo for them about 2 weeks ago.  You can find
> > it here:
> >
> > git clone http://www.softsystem.co.uk/git/mythbuilder.git
> 
> That is nice, any particular reason for not using GitHub? It makes 
> following and forking a little easier.

The reason for using my own server to host the repos was knowledge. It's
certainly easier to use github but I don't get to learn all the gotcha's
as with 'rolling my own'.  I'm OK with git as a user but never really
experienced it from an admin view.  It's also a very good test for my
http server and CGI module, which are home grown.  It's already
highlighted a problem with the daemon's eGID when Perl baulked at
executing external scripts. 

-- Lawrence




More information about the mythtv-dev mailing list