Wednesday, August 3, 2011

A Fast(er) LibreOffice Build


So I have finally managed to build LibreOffice from the source. In order to cut a lot of compile time, I have set up a small build cluster. And this is how you would do the same. This is how I think I did it (but I don't guarantee anything... too many intermediary steps). If anything is missing, please let me know in the comments.

sudo yum-builddep libreoffice

sudo yum install icecream

Once you reach that point, set up your Icecream cluster properly. I won't mention steps on the other machines
sudo vim /etc/sysconfig/icecream
sudo /etc/init.d/iceccd restart
sudo chkconfig iceccd on
icecc --build-native
mkdir ~/.icecc
mv <whatever icecc generated> ~/.icecc/
sudo vim ~/.bashrc
  • export ICECC_DEBUG=debug
  • export ICECC_VERSION=/home/<your home folder>/.icecc/icecc-env.tar.gz

Now, you are ready to build
./autogen.sh --enable-icecream --with-gcc-home=/usr/lib/icecc --with-num-cpus=16 --with-max-jobs=16 --enable-symbols ; make 
Next step: I'm going to find out how to accelerate this build using even more system libraries.

1 comment:

  1. While icecream is might still be useful for a full build from scratch, for the usual developer scenario of incremental rebuilds it pales compared with a simple ccache on one machine. Even deleting everything (but not the cache) and then starting a build completes after ~10-15 minutes with a hot ccache (single Intel Core2Quad Q9650 with 8GB RAM and a software RAID0) -- most of the time is spent in the (un-ccached) packing.

    ReplyDelete