Building LibreOffice from source

Two weeks ago, the developer community behind OpenOffice.org decided to free itself from its “parent” Oracle. This split was unavoidable – Sun Microsystems who used to manage and oversee the development of OpenOffice.org was absorbed by Oracle, a company which is not particularly known for its fondness toward Open Source.

The tension which has been building up between the community and Oracle found a release in a “fork” – or perhaps just a continuation – called LibreOffice, as well as the birth of the Document Foundation which is the legal body to oversee its development.

The intention is to use the fruits of a parallel development project which has been ongoing for a long time – called “go-oo” – and merge the code. From what I understood, the go-oo code is leading at the moment, since it has a lot of added features still missing in OpenOffice.org like better MS Office compatibility, multimedia integration – which SUN  has always been reluctant to add to OpenOffice.org because of direct competition with SUN/Oracle’s own not-so-open ancestor of OpenOffice.org, StarOffice.

Anyway, that is all old news now, even though it was exciting to see how a developer community takes the lead.

Binaries for LibreOffice beta are available for download from the Document Foundation site, and Niels Horn has a SlackBuild script which re-packages those binary RPMs into a clean Slackware package.

But I wanted to see if I could compile this software from source. OpenOffice.Org always seemed like a hurdle I was never prepared to take in terns of compilation. But this time I decided to go ahead and use the power of my new build box (components bought with donation money, thanks again!).

I must say, the LibreOffice source code is very much “in flux”. There are no source tarballs to download (except for the bootstrap) so I followed the official build instruction, which is to grab all sources directly from git repositories. That fact proved disastrous to the time required to come up with an error-free compilation… code can break any time, and in two weeks of compiling with my Slackware oriented set of configuration parameters I could only produce a working package with code from two days ago.

My SlackBuild script is a fairy crude script which is not (yet) able to checkout a snapshot from git at any desired date in the past (like my vlc and ffmpeg scripts can). So… if you try to replicate my efforts using my script you have a large chance of failure. Prepare for days of compilation – and to build it you need way more than 6 GB of free space.

Anyway, I have uploaded my built-from-source LibreOffice 3.2.99.2 packages (this is officially called the 3.3-beta2 release) for both 32-bit and 64-bit Slackware 13.1 (should work on -current too of course).

Grab them here: http://slackware.com/~alien/slackbuilds/libreoffice/ or use my fast mirror at http://taper.alienbase.nl/mirrors/people/alien/slackbuilds/libreoffice/ (rsync access through rsync://taper.alienbase.nl/mirrors/people/alien/slackbuilds/).

I must say I am impressed with the speed of LibreOffice. Within 5 seconds of clicking the LibreOffice Writer icon, I was typing in a text document. At the same time, that computer was running a virtual machine in wich I was compiling a xulrunner package.

Feedback is welcome!

Cheers, Eric

46 thoughts on “Building LibreOffice from source

  1. I do wonder… does this, compiled-from-source-on-a-slackware-system version still use it’s own libraries? Or is it properly using the system libraries where it can?


  2. I make it use system libraries as much as possible. Look at the “Slackware.conf.in” file which I use instead of the one that comes with the source tarball – you find it in the same directory as the SlackBuild script.

    Eric



  3. Many thanks for undertaking such a large task.
    I just installed it in Slackware64 ‘current’ but it won’t run and returns the error message, “error while loading shared libraries: libicuuc.so.44: cannot open shared object file: No such file or directory.”
    I’m looking for it now.
    🙂


  4. Hi Eric,

    this is really a lot of work. I was trying to do the same. But I am not strong enough at compiling. After about one week of trial and error I gave up yesterday. Thank you so much.

    Vladimir.



  5. Thanks Eric!
    I have the same problem of cwizardone: “error while loading shared libraries: libicuuc.so.44: cannot open shared object file: No such file or directory.”



  6. Hi Eric,

    Thank you very much, this is working well on my slackware 13.1 32bit machine, also thanks for your KDE 4.4.5, I am using them too! 🙂

    All the best from South Africa,
    Daniel


  7. It works fine on 32bit here too & without icu.
    BTW when i had said that some of Niels Horns’ scripts are heroic, yours, and especially the VLC SlackBuild, were out of the competition. That is much much more than just a build script.
    Thanks again!


  8. Though I use Slackware64-multilib, for me Libreoffice worked after installing icu4c from link posted above.

    Really fast speed now.
    Thanks!




  9. After installing icu4c it started right up on my 64 machine. I can not get spell check to function though. I put intentional typo’s and spelling errors and it triggered neither the inline spell checker nor the manual spell checker. I have “standard”, “oracle”, “soffice” and IgnoreList checked. Each has a list of entries in it. I am using US-English, so it seems like this feature should be working. Is it just me?




  10. In the meantime I have refreshed the libreoffice packages with a version that is two days newer and uses a fine-tuned SlackBuild.
    That means the icu4c dependency has now been completely removed.
    Next on the list, is to build additional languages and dictionaries.

    Eric


  11. Pingback: LibreOffice

  12. Thanks alien, it worked in Slackware64 13.1.
    Go-OO have some dependencies, LibreOffice don’t have the same dependencies?

    It’s running great in my laptop.


  13. @Mário –

    The dependencies you are referring to, which are listed for “go_openoffice” on http://slackbuilds.org/ are basically build-time dependencies… except for icu4c which is also required at runtime. I got rid of these runtime dependencies, it is much nicer that way.

    Eric


  14. I noticed that the new build uses ~/.ooo3 instead of ~/.libreoffice. The first time i start Writer without an ~/.ooo3 it closes immediately without any output. Also upon firing up firefox for the first time i got:
    ‘OpenOffice path before fixup is ‘/usr/lib/libreoffice’
    OpenOffice path is ‘/usr/lib/libreoffice’
    but i dont see how whats the relevance since Applications doesnt associate any files with libreoffice.



  15. @Greg –

    Yes, I realize now that I noticed the change from ~/.libreoffice/3/user to ~/.ooo3/user between the two builds of the package…. I guess I was too tired at the time to consciously realize that there was a change in the preferences directory.

    At first start of a LibreOffice application after the upgrade, its window closed immediately too here, I thought ‘what the heck’ and did not think further 🙂

    I am still running a firefox instance which I have not restarted since upgrading the libreoffice package, so my guess is that I will see a message about libreoffice after I restart it. The libreoffice package contains a browser plugin (which is not enabled by default iirc).

    Eric



  16. This is so much better than I was expecting for a beta. Once I got the spell checking working (thanks dolphin77) everything is just working and fast~~~ 🙂


  17. The slackbuild fails for me at………….
    ccache: no
    icecream: no
    distcc: no
    ./package-ooo: line 9: /tmp/build/tmp-libreoffice/libreoffice-20101012/build/libreoffice-3.2.99.2/*.[sS]et.sh: No such file or directory
    ./libreoffice.SlackBuild: line 269: cd: /tmp/build/package-libreoffice/usr/lib64/libreoffice/basis-link/share/fonts/truetype/: No such file or directory
    ./libreoffice.SlackBuild FAILED at line 274

    I am using slack64-13.1 no multilib. it looks like I am missing some files in the downloaded package
    I used libreoffice-20101012.tar.xz from the mirror

    got any suggestions?

    thanks
    john


  18. @John Yost –

    Every time you run my SlackBuild, all of LibreOffice software will be extracted from its git repositories. That is why I said in my post that it took me two weeks and I came up with exactly one time that the source code compiled successfully.
    You are welcome to try and repeat that, but be warned that you may waste many hours for nothing. That is why I also offer the package.

    Eric


  19. Thanks Eric
    Do I need the apache-ant package to build libre office?
    I have nothing but time “retired”
    Thanks
    john





  20. LibreO – 32bit version that is – spawns this process every now and than!?

    bin/sh /usr/lib/libreoffice/program/soffice -nologo -nodefault -nolockcheck -accept=pipe,name=

    What the heck??
    How to disable it?? What does it do??
    I hate when app tries to be smart. OO.org didn’t try to be fancy…

    Also it appears to have two config dirs? one .ooo3 and second is .config/.ooo3 …. hmm…




  21. Hi,

    Great work Eric. I tried your 64-bit version and can only agree, speed is fantastic. Unfortunatly I’m having problems to install extensions. Any one else with this problem? The extension (SLAMlib) is written in java but that shouldn’t be a problem yet should it. I did find some similar (one year old) problems related to compiler optimisation -O2 with gcc 4.4 which you are using. Work around then was to go for -Os. Tried to build with this optimisation but the build got stuck during download phase. Will retry a soon as I got time for it.
    Question though, is it not possible to make the build script check if you got the source you need/want and skip the download where applicable?
    And is there a specific need for xulrunner? Why not the system semonkey?


  22. @Björn –

    I am working on a version of the SlackBuild that allows you to download the required sources when you want (so that the script can skip the online download during package building) but that is a pain in the *ss. The LibreOffice download script checks online what tarballs it has to download. It first downloads a list of download URLs) and I must find a good way of applying that to my SlackBuild.

    Perhaps you should post a question regarding the compatibility of my LibreOffice package with OOo extensions in the http://www.linuxquestions.org/questions/slackware-14/ forum. Who knows, there may be more people trying to deal with that issue.

    I use xulrunner because that uses a much more up-to-date version of the XUL codebase. I often remove seamonkey* and replace it with xulrunner anyway – the seamonkey runtime in Slackware 13.1 and later no longer supports building Mozilla plugins. I have the same issue with my VLC package. For VLC I solved it by using an internal copy of the xulrunner SDK specifically for the VLC plugin compilation.

    Eric



  23. Hi Eric,

    It was not just java extensions that didn’t work but others as well. Rebuilding without -O2 solved it for me so now I can use extensions again. 🙂

    OK, never use Seamonkey much anyway, so I think I will try Xulrunner. Made an attempt on Slackwar 13 but as far as I remember it was a bit difficult to build.



  24. @Björn –

    You mean I should rebuild the packages without “-O2” to make OOo extensions compatible with my build?

    In that case I will try and rebuild 3.3-beta3. There was an issue with a en_US language pack that should not have been built (en_US is the package’s default language) which I wanted to fix anyway.

    I will also make an effort in enhancing the SlackBuild with offline build (downloading tarballs in your own time).

    Eric


  25. Well, I just wanted to let you know what I found out. After all it’s nice to be able to add additional features. 🙂

    Björn


  26. During install I get this:
    Max number of projects to build in parallel is ‘2’
    ./package-ooo: line 9: /tmp/build/tmp-libreoffice/libreoffice-build-3.3.2.2/build/libreoffice-3.3.2.2/*.[sS]et.sh: No such file or directory
    ./libreoffice.SlackBuild: line 760: cd: /tmp/build/package-libreoffice/usr/lib/libreoffice/basis-link/share/fonts/truetype/: No such file or directory
    ./libreoffice.SlackBuild FAILED at line 765

    Any ideas what is causing it?


  27. @Lord_Beavis

    My libreoffice.SlackBuild is configured to run 2 parallel jobs. The libreoffice build system does not allow for more parallellism.
    Did you edit the script and in particular the line “NUMCPUS=${NUMCPUS:-2}” ? Then you should revert that change and try again.

    Eric


  28. @alienbob

    Darndest thing, I was running out of space on / where tmp is. Took KDE crashing for me to figure that out. Is there a way to tell libreoffice.SlackBuild to use a different tmp location?


  29. @Lord_Beavis –

    Yes. “TMP=/some/whare/else ./libreoffice.SlackBuild”

    Or, just install the package. Compiling LibreOffice will not make you happier.

    Eric



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.