My thoughts on Slackware, life and everything

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

45 Comments

  1. Questioner

    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. alienbob

    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. Niels Horn

    Hey, now *that* is a heroic job! 🙂
    By the way, I have seen source tarballs on the LibreOffice site.

    Congratulations with this huge job.

    Niels

  4. cwizardone

    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.
    🙂

  5. dolphin77

    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.

  6. dolphin77

    PS speeeeeed is reallyyy amazing!!!!

  7. dm

    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.”

  8. dolphin77

    >“error while loading shared libraries: libicuuc.so.44: cannot open shared object file: No such file or directory.”

    As per .dep file you should have icu4c package installed. You can also get it from Eric’s slackbuild repository.

    http://taper.alienbase.nl/mirrors/people/alien/slackbuilds/icu4c/ and choose appropriate package for your architecture.

  9. demitasse

    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

  10. Greg

    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!

  11. Virendra

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

    Really fast speed now.
    Thanks!

  12. alienbob

    @cwizardone:

    O yes, I forgot, the 64-bit package was built a bit differently and requires icu4c to be installed (see http://slackware.com/~alien/slackbuilds/icu4c/pkg64/13.1). The 32-bit package was built using a more recent (and better) SlackBuild script so that it does not require additional packages like icu4c.

    There will be updated packages soon anyway, it looks like the build errors have gone for the moment.

    Eric

  13. spc

    That’s a no doubt heavy lifting you’re doing down there…
    Cheers.

  14. em21701

    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?

  15. dolphin77

    @em21701

    the same observed here. But I downloaded dictionaries from here http://extensions.services.openoffice.org/ru/download/1471. And now it works.

  16. cwizardone

    @alienbob,
    Many Thanks. I looked for it but didn’t see it…. Time to go to the optometrist, I guess. 🙂

  17. alienbob

    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

  18. Mário

    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.

  19. alienbob

    @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

  20. Greg

    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.

  21. BrunoRusso

    Fantastic!

    Alien, speed to load the applications on the x64 version is fantastic. Much faster than the rpm converted to tgz.

    Congratulations on the job.

  22. alienbob

    @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

  23. spc

    So far so good.
    It’s so much lighter then OO.org – this is first thing that struck me.
    Thanks again.

  24. Nick Blizzard

    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~~~ 🙂

  25. John Yost

    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

  26. alienbob

    @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

  27. John Yost

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

  28. John Yost

    Sorry Eric I just found the needs line in the slackbuild

    john

  29. kite

    good job! Are there any language packs for non-English languages.

  30. kite

    I found the language packs here:
    http://download.documentfoundation.org/libreoffice/testing/3.3.0-beta2/rpm/x86/

  31. spc

    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…

  32. spc

    Heh… well it was quicklaucher thing and it was respawning itself without tray icon, hence confusion.

    Cheers.

  33. dolphin77

    Hi Eric,

    According to this: http://www.documentfoundation.org/download

    -beta3 is available. Is there any chance to see it soon in your repository, or do I need to try to build it myself?

  34. Björn Vennberg

    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?

  35. alienbob

    @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

  36. alienbob

    @dolphin77 –

    Perhaps you already discovered that I have created packages for LibreOffice 3.3-beta3 in the meantime?

    Eric

  37. Björn Vennberg

    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.

  38. Björn Vennberg

    ooops,

    sorry about the tripplicats. Got invalid secyritycode.

  39. alienbob

    @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

  40. Björn

    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

  41. Lord_Beavis

    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?

  42. alienbob

    @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

  43. Lord_Beavis

    @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?

  44. alienbob

    @Lord_Beavis –

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

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

    Eric

  45. Andrew

    Just installed libreoffice 3.3.2 on sw 13.37 and cannot connect to my thunderbird address book. The problem is as described here:
    http://listarchives.libreoffice.org/www/users/msg02128.html
    Is there a solution?

1 Pingback

  1. LibreOffice

Leave a Reply to Björn Vennberg Cancel 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.

© 2024 Alien Pastures

Theme by Anders NorenUp ↑