OpenBSD Journal

Developer Blog - robert@: The story of OpenOffice.Org

Contributed by deanna on from the we-were-slacking dept.

Robert Nagy writes:
The road to native OpenOffice.Org support on OpenBSD was tough. After a half year of hard work we managed to get an openoffice port that runs on both i386 and amd64 with java support and with 11 language packages built by default.
In the begining of this year I had to use openoffice for some school work. Since we didn't have a port, I had to use the linux binary, which is just stupid. Why not have native binaries? Peter Valchev started to work on an older version of openoffice back in 2005 but then the effort got stuck. I asked him if he still had that old port so that I could use it rather than create a new one. After waiting a couple of hours he sent a reply with the port attached.

I must admit that we were lucky in that openoffice was working fine on FreeBSD. So in the beginning it was easy to grep for FREEBSD in the source tree and see what changes were needed to make it work there. We extended many many ifdefs with OPENBSD, and in some places where OpenBSD is different, we made our own modifications. Initially we did builds without java because we thought that would be simpler, but we found that without it, many features were missing, and others were broken badly; for example, we weren't even able to save documents in OpenDocument format. After Kurt Miller added java support, all these problems went away. Thank god we have a java expert ;-).

In the meantime I asked for support from the community because I needed to get an amd64 machine to be able to port openoffice to that architecture too. Many people donated and in two weeks I had a fast amd64 ready for building. I would like to say thanks to the community again. The amd64 port posed a few problems, but they were all solved by either fixing gcc or adding new ports.

Openoffice includes many bundled packages like boost, libwpd others. We hate that kind of thing; we like to have our ports depend on other things in the tree instead of internal versions. The bundled boost was happy on i386 but not on amd64. Even the openoffice team said it was badly broken, so the only way of fixing the problem was to create a port of a newer boost release. I was lucky again because Deanna Phillips created a port which was almost usable. kurt@, wilfried@ and I started to fix that port and finally it got imported. The funny part is that wilfried@ found a gcc bug while running the regress tests of boost. This was the same bug that affected openoffice and even the gcc developers were not able to tell us how they fixed it in gcc 4.2. Funny isn't it? And in the end we got openoffice running on amd64.

I was tired but uwe@ asked if there will be any i18n support so I told him to wait a couple weeks. Eventually I started to do some experimental builds on a fast i386 provided by Johan M:son Lindman with all the languages supported by openoffice -- that is more than 50 languages. After almost 30 hours of building it was still running .... what the #!&@? I checked how much disk space was used .. ~35G and the build was still running. At that point, I started to hit ctrl+c like a raving lunatic. I told the other developers and we decied to include only 11 languages by default. If anyone needs more, they can tell us. I restarted the build and after it finished the needed disk space was around 25G. That's still too much; some package builders won't be able to build it.

In openoffice there are projects and each project has its object directory. After a project is built the files from the object directory get copied to a directory called solver, and the old object directory isn't needed anymore. Kurt figured out that there is an option in the script that removes the unneeded object dirs, saving disk space. After adding this to a cleanobj flavor to the port we managed to reduce the needed disk space to ~16G. The only problem with using this flavor is that if the build fails, you have to rebuild everything from the begining.

Currently we are working on removing the need of tcsh to build openoffice. I am also working together with the OpenOffice.Org team to put our patches into their repository. Currently we have 134 patches and more than 30 are waiting to be commited to the OpenOffice.Org CVS repository. Fortunately they are cooperative and helpful and they actually want to have our modifications. I hope that in the next snapshot packages all of the i18n packages will be available too. Yes you can still build it yourself but we have package tools that are working like a charm and every user should use our binary packages instead of wasting time on building them. I also hope that there will be support for other architectures like macppc in the near future but that's going to need more work, like porting gcj.

I would like to say thank you to everyone who helped to make this monster work by testing, sending patches or by providing hardware to build on.

Robert

(Comments are closed)


Comments
  1. By Marc Balmer (213.189.137.178) on

    Having OpenOffice available for our users is a great plus, it together with other apps it makes OpenBSD a nice desktop system for everydays use (and not only for vi-using LaTeX addicts like me...)

  2. By Dunceor (192.16.134.66) on

    This is very nice for the users even though like Marc I'm a vim/LaTeX addict =)

    Comments
    1. By djm@ (203.217.30.85) on

      > This is very nice for the users even though like Marc I'm a
      > vim/LaTeX addict =)

      I like tea, but I also like apples. Somehow, apart from not being able to fit both in my mouth at once, my like for these almost completely different things don't seem to collide.

  3. By Bernd Schoeller (82.130.74.28) on

    Great summary. Wouldn't it be possible to use hard-links instead of copy operations for the object files? (Probably not, that build process already looks horribly complicated without trying to mess with the copy operations)

  4. By Han Boetes (213.84.147.9) han@mijncomputer.nl on

    Looking a bit through the patches a lot of them can be applied to the main OOo tree. How is the communication going with the OOo maintainers? I mean the ideal goal for a porter is to get all his patches applied to the sourcetree so the next release can build without a single patch.

    Comments
    1. By Anonymous Coward (195.56.245.130) on

      > Looking a bit through the patches a lot of them can be applied to the main OOo tree. How is the communication going with the OOo maintainers? I mean the ideal goal for a porter is to get all his patches applied to the sourcetree so the next release can build without a single patch.

      "I am also working together with the OpenOffice.Org team to put our patches into their repository. Currently we have 134 patches and more than 30 are waiting to be commited to the OpenOffice.Org CVS repository."

      Comments
      1. By grg (203.122.221.58) on

        I look at this:
        http://wiki.services.openoffice.org/wiki/Porting_to_x86-64_(AMD64,_EM64T)
        and wonder at the difficulty of getting it working on OpenBSD/amd64 when the above page mentions the large unmerged patchset against the main tree. There are no linux/amd64 binaries after them working on it for how long now? and you guys get it going on OpenBSD/amd64 in mere months :-) Well done!

  5. By David (87.1.214.91) dcoppa@gmail.com on

    Hats off to all the people involved in this great port!

    Now OpenBSD is MY ONLY desktop @ work ;)

  6. By Michael Bibby (61.141.86.174) on

    I also need a chinese input method for DESKTOP system with OpenBSD. :(

    Comments
    1. By Marc Espie (213.41.185.88) espie@openbsd.org on

      > I also need a chinese input method for DESKTOP system with OpenBSD. :(

      Stop whining !

      Where were you when I asked for some feedback on uim ?
      It does feature some chinese input methods you know.

      However, I do not speak any chinese, so I can't tell whether it's
      any use for chinese speakers. I've only tested the japanese part.

      You want chinese input ? go test! tell me what's missing! find
      people who speak chinese and can understand code !

      Comments
      1. By tamo (60.35.182.245) on http://tamo.tdiary.net/

        > Stop whining !
        >
        > Where were you when I asked for some feedback on uim ?

        Thanks for reminding me to test IMs on OpenBSD.
        I once ported SCIM and have forgotten it (because I've been happy with it).
        Tomorrow I'll test UIM and SCIM again.

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]