Saturday, July 2, 2011

Building LibreOffice: What Nightmares are Made Of

It is no secret that I started helping out with fixing bugs in LibreOffice, that fixed-up and overall much improved fork of
Started is a good word. After managing to do one patch, I somehow messed something up and I had to rebuild it all. I started on Monday. By Friday, I still didn't have a working build.
Why? Well, it is about 9 million lines of code meant to be compiled on pretty much every computer that is reasonably recent. The amount of switches on the autogen script is mind-blowing, and it has a mix of C++ with Java and Python. The build tool is coded in perl, and it is being migrated to proper makefiles.
Some of the dependencies are downloaded from the internet and patched as part of the build process.
Etc. etc.
I have been told that the best case scenario, using a icecream cluster and ccache is a 45 minute build.
Every now and then, a module will not build nicely and some manual intervention is required. Or you will run out of disk space (we are talking about 10+ Gb!). Or there is a bug specific to your platform that needs a magical patch not yet committed to git.

That sort of stuff. It is a beast, in the words of leading maintainers.

I also literally had a nightmare about this building process. And I can safely say that I hate C++ more than ever!
I encourage everyone to join and help. But you need to be very very patient!

On the + side, I'm fast becoming friends with the maintainers on IRC. I also learned many things about software builds. I see more than ever how you need to make your software very easy to build if you want contributors. This is why I am a big fan of Buildr, which makes things simple to package, test and release.

No comments:

Post a Comment