ccache for MXE Octave cross builds

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ccache for MXE Octave cross builds

mmuetzel
Out of curiosity: How did you set up your ccache configuration for the Windows cross-builds with MXE-Octave?
My settings are:
cat ~/.ccache/ccache.conf
max_size = 30.0G
hash_dir = false

To me it looks like with these settings the compiler cache is only used for the "build-*" packages after a "make clean".
The later packages never seem to hit any cached files. Maybe because ccache detects that the freshly built compiler is different from the previous run?

Are there some settings or switches which allow the compiler cache to be used more efficiently?

Markus

Reply | Threaded
Open this post in threaded view
|

Re: ccache for MXE Octave cross builds

John W. Eaton
Administrator
On 07/14/2018 09:16 AM, "Markus M├╝tzel" wrote:

> Out of curiosity: How did you set up your ccache configuration for the Windows cross-builds with MXE-Octave?
> My settings are:
> cat ~/.ccache/ccache.conf
> max_size = 30.0G
> hash_dir = false
>
> To me it looks like with these settings the compiler cache is only used for the "build-*" packages after a "make clean".
> The later packages never seem to hit any cached files. Maybe because ccache detects that the freshly built compiler is different from the previous run?
>
> Are there some settings or switches which allow the compiler cache to be used more efficiently?

Did you use the --with-ccache option when configuring mxe-octave?

That is intended to cause the Makefile rules ot create links in
usr/bin/ccache for the cross compiler that will be used, and also add
usr/bin/ccache to the PATH that is used when make runs.  However, I now
see that the ccache-links target in the Makefile will only be executed
automatically if you execute make with the default "all" target.
Otherwise, you need to execute "make ccache-links" explicitly.

I also see now that the usr/bin/ccache directory is not being created
for the buildbots, so I don't think the cross-compile steps are taking
advantage of ccache.  Oops.  I'll try to fix that so we get better
performance for the mxe-octave builds.  That should speed things up a lot!

I don't use hash_dir = false.

I enabled logging to see what was being cached and found in the cache
and it seems to work for me.

jwe

Reply | Threaded
Open this post in threaded view
|

Aw: Re: ccache for MXE Octave cross builds

mmuetzel
> Gesendet: Samstag, 14. Juli 2018 um 18:32 Uhr
> Von: "John W. Eaton" <[hidden email]>
>
> Did you use the --with-ccache option when configuring mxe-octave?
>
> That is intended to cause the Makefile rules ot create links in
> usr/bin/ccache for the cross compiler that will be used, and also add
> usr/bin/ccache to the PATH that is used when make runs.  However, I now
> see that the ccache-links target in the Makefile will only be executed
> automatically if you execute make with the default "all" target.
> Otherwise, you need to execute "make ccache-links" explicitly.
>

I configured with:
./configure --enable-devel-tools --enable-windows-64 --enable-octave=default --enable-binary-packages --with-pkg-dir=../mxe-octave-pkg --with-ccache --disable-system-opengl --enable-qt5

And am building with:
make all 7z-dist JOBS=3

The soft links in [mxe-octave-dir]/usr/bin/ccache are created.

I cleared my ccache cache and changed the configuration like this:
cat ~/.ccache/ccache.conf
max_size = 30.0G
hash_dir = false
compiler_check = %compiler% -v

Let's see whether this speeds things up after the next "make clean".

> I also see now that the usr/bin/ccache directory is not being created
> for the buildbots, so I don't think the cross-compile steps are taking
> advantage of ccache.  Oops.  I'll try to fix that so we get better
> performance for the mxe-octave builds.  That should speed things up a lot!

I am glad if at the very least this helps the buildbots. :-)

> I don't use hash_dir = false.

If I understood correctly, that setting should speed up compilations in the different (but similar) Octave source trees that I have in parallel.

Markus