Step by step building guides for different platforms

From Apache OpenOffice Wiki
Jump to: navigation, search

This page is intended as a collection of simple step-by-step recipes to build Apache OpenOffice from source code. A more thorough explanation of what the individual steps do and why they are necessary can be found in the building guide.

Ubuntu 14.04

The basic building steps under Ubuntu 12.04 (see below) are to be followed in Ubuntu 14.04 as well; however, there are some minor build issues that any developer, using this OS, needs to be aware of, if he gets stuck while building. The following is the list of issues, with their fixes, that a developer may face with:

If you are building trunk, the patch is already applied; if you are building from a release tag or tarball, the patch needs to be applied for all releases <= 4.1.1.

As the BZ says, it is because of buggy toolchain g++4.9. So for now in Ubuntu Linux 14.04, build the source using g++4.8.2, gcc4.8.2; these are the default compilers in Ubuntu Linux 14.04 anyway; please check it using the following commands:

 g++ -v
 gcc -v

if not, you've to download them.

 sudo apt-get install g++-4.8
 cd /usr/bin
 rm gcc
 rm g++
 ln -s gcc-4.8 gcc
 ln -s g++-4.8 g++
  • Failed to find ./solver/420/ error.
 cp /usr/lib/x86_64-linux-gnu/ ./solver/420/
 rm ./solver/420/
 ln -s ./solver/420/ ./solver/420/
  • No such file or directory - connectivity/virtualdbtools.hxx while building svx.

if you get an error like this, then that means connectivity is not built properly. Build connectivity using build --all:connectivity and this error will go away.

Ubuntu 12.04

  • Setup VirtualBox with Ubuntu 12.04 64 bit on Windows7 64bit host. A native installation is of course fine, too.
  • Let updater update ca. 380 packages. Restart.
  • Get the source. You can start with the source release or by checking out from SVN:
Source release SVN
Build from source release if you want to build OpenOffice once but don't want to do any development. Build from SVN if you want to development work with OpenOffice.
  • Download AOO 4.1.1 source tarball from

  • Optional: Download signature from

and verify the source tarball with

gpg --verify aoo-4.1.1-incubating-src.tar.bz2.asc \

Note that you have to have the keys already imported to your key chain. The keys can be found on the download page:

  • Unpack source:
 cd /tmp
 tar -xjf ~/Downloads/aoo-4.1.1-incubating-src.tar.bz2
 cd aoo-4.1.1/main
  • Start with creating a parent directory for the source code. Don't use /tmp because that is deleted on every boot:
 sudo mkdir /source
 sudo chown <your-user-name> /source
 cd /source
  • Install subversion and checkout the source:
 sudo apt-get install subversion
 svn co aoo-trunk
 cd aoo-trunk/main
  • Install requirements (this will also install packages that are not listed):
 sudo apt-get install g++ gcc bison flex libarchive-zip-perl libcups2-dev \
      libpam0g-dev gperf libfreetype6-dev libxaw7-dev libfontconfig1-dev \
      libxrandr-dev patch libgconf2-dev libgnomevfs2-dev ant libgtk2.0-dev \
      junit junit4 libidl-dev liborbit2-dev openjdk-6-jdk libwww-perl \
      libxml-parser-perl autoconf libssl-dev
  • Run autoconf to generate configure script:
  • Configure (see the building guide section on configuration for further options):
 ./configure \
     --with-dmake-url= \
     --with-epm-url= \
     --disable-odk \
  • Finish configuration and download missing tarballs and extensions:
  • Include the configured environment:
  • Build:
 cd instsetoo_native/
 build --all

This may take a while to complete. Several hours are not uncommon. To speed things up you may want to run 'build' like this

 build --all -P<n> -- -P<n>

to start a parallel build. Replace <n> with the number of CPU cores.

  • Install:
 sudo dpkg -i*.deb
 sudo dpkg -i
  • Start Apache OpenOffice:

CentOS 5

CentOS 5 is our reference environment for build through the 4.1.x series. As it is a very old environment, it is not recommended to use it for your first build. But is important to document how to build on CentOS 5 since this is where the release through 4.1.x are built.

  • Setup a VM (KVM given here as example):
 $ wget -O /tmp/CentOS-5.iso
 $ fallocate -l 20480M /vms/centos5_64.img
 $ sudo virt-install --boot cdrom --name centos5_64 --memory 8192 -f /vms/centos5_64.img --cdrom /tmp/CentOS-5.iso
  • Install the system; installation will start with the above command and use the following values when asked:
    • Installation method: HTTP with website and CentOS directory /centos/5/os/x86_64
    • Partitioning: one 20000M for /, rest swap
    • Setup Base system only
  • Reboot the VM and configure it
    • You'll probably want a non-root user with sudo access and you may want to disable some services.
  • Install dependencies from CentOS repository
 $ sudo yum install subversion autoconf tcsh perl-Archive-Zip gcc gcc-c++ cups-devel pam-devel java-1.7.0-openjdk-devel gperf freetype-devel gtk2-devel libIDL-devel libXaw-devel bison patch GConf2-devel gnome-vfs2-devel ant make tar rpm-build flex perl-XML-Parser ORBit2-devel
  • Install and configure ccache:
 $ sudo yum install ccache
 $ ccache -M 2G
  • This leaves out four packages (to be handled later):
    • junit4
    • perl-LWP-UserAgent-Determined
    • perl-Digest-SHA → This one is available on EPEL (sudo yum install epel-release && sudo yum install perl-Digest-SHA) but it is not worth to do that for a single module, as other modules must be fixed anyway
    • perl-LWP-Protocol-https
  • You can still configure with
 $ ./configure --enable-category-b --with-dmake-url= --with-epm-url= --enable-bundled-dictionaries --with lang="en it" --without-stlport --with-package-format="installed rpm" --without-junit
  • Bootstrap will fail
  • Once one works around bootstrap (for example, using a local package cache) build succeeds.

Fedora 21

soon to come

Fedora 19 and 20

Build Instructions

The build procedure is the same as for other Linux systems.

Required packages:

$ yum install tcsh perl-Archive-Zip gcc gcc-c++ cups-devel \

             pam-devel java-1.7.0-openjdk-devel gperf freetype-devel \
             gtk2-devel libIDL-devel libXaw-devel bison patch GConf2-devel \
             gnome-vfs2-devel ant make tar rpm-build flex junit4 \
             perl-LWP-UserAgent-Determined perl-XML-Parser \
             perl-Digest-SHA ORBit2-devel perl-LWP-Protocol-https

Build notes:

  • The perl-Digest-SHA dependency is not caught until bootstrap
  • The ORBit2-devel dependency is not caught until building the "shell" module
  • Build breaks in "hsqldb": to build with Java7, you need to apply the patch at
  • Build breaks in "moz": configure with --disable-mozilla to work around it.

Fedora 10 and 14

Build Instructions

The build procedure is the same as for other Linux systems.

Required packages:

$ yum install tcsh perl-Archive-Zip gcc gcc-c++ cups-devel \

             pam-devel java-1.6.0-openjdk-devel gperf freetype-devel \
             gtk2-devel libIDL-devel libXaw-devel bison patch GConf2-devel \
             gnome-vfs2-devel ant make

Quick start guide

Still valid?

$ yum -y install mono-devel perl-Archive-Zip ant bison \

        flex pam-devel cups-devel gperf libxslt-devel openldap-devel \
        firefox-devel xorg-x11-devel gstreamer-devel \
        gstreamer-plugins-base-devel db4-devel unixODBC-devel \
        xml-commons-jaxp-1.3-apis xalan-j2 boost-devel \
        unixODBC-devel qt-devel subversion autoconf automake \
        gtk2-devel gcc-c++  gnome-vfs2-devel rpm-build \
        expat-devel python-devel curl-devel

$ ./ -with-distro=SUSE \

        --with-jdk-home=/usr/lib/jvm/java-1.5.0-gcj \
        --with-ant-home=/usr/share/ant \
        --with-system-mozilla=firefox \
        --disable-Xaw \
        --disable-kde \
        --disable-mono \
        --enable-opengl --enable-ogltrans \
        --disable-neon \

Another list:

Blog about building ooo-build on Fedora 7:

Fedora packaging

Fedora 14

The Fedora 14 spec file can be found at (download the srpm, and uncompress it (rpm2cpio <file> | cpio -idv) ); you'll see the single spec file ; note that it doesn't build cleanly, you need to apply the patch from

Fedora 19

Windows 7, Windows 8.1

Complete requirements found at General Build Requirements and Building on Windows.

This is a sample step-by-step guide - check the complete requirements and report on, if problems with this step-by-step guide occurs.

  • Install cygwin, 32bit version
    • Browse to
    • Click on the setup.exe link (most recent Cygwin DLL at the moment is 1.7.16-1) to download the installer and run it.
    • Click through the questions.
    • On the "Choose A Download Site" select a nearby download server.
    • Expect a "Setup Alert" dialog box on the first cygwin install on the computer.
    • Click OK to close it.
    • On the page that allows you to select additional packages select lynx (enter lynx in the Search box and select the lynx entry in the Web/Default section), expat (enter expat in the Search box and select the expat entry in the Perl section), and XML Parser (enter parser in the Search box and select the XML Parser in the Perl section).
    • Click Next to finish package selection.
    • Click Next to resolve dependencies.
    • After installation is finished click the Finish button to close the dialog.
  • Start cygwin bash in a terminal
One way to do this is:
  • Press WindowsKey-R
  • Enter c:\cygwin\Cygwin.bat
  • Hit Return.
  • Install Java, 32bit version
Choose between JDK or OpenJDK. Versions 1.7 and 1.8 are known to work.
(We need the 32 bit version because JNI requires the JVM's bitness to match the C/C++ bitness).
  • Install Ant
    • Browse to
    • Chose a mirror near you.
    • Download the zip archive (currently that is
    • Open downloaded archive in file explorer and unzip it to a location of your choice, eg c:\. Note that C:\Program Files (x86) will not work due to problems of quoting the spaces and parentheses.
  • Prepare to install missing cygwin packages by installing apt-cyg from Github:
    cd /cygdrive/c/temp
    (or any other temporary directory of your choice)
    lynx -source > apt-cyg
    chmod +x apt-cyg
    mv apt-cyg /usr/local/bin/
  • Use apt-cyg to install missing cygwin packages:
    apt-cyg install perl zip unzip gperf autoconf rsync gcc-g++ bison flex patch subversion make
    or alternatively run setup and select the packages
    If you will use git, you need in addition the packages
    git git-svn
  • Replace symlinked awk with copy of gawk.exe:
    rm /usr/bin/awk
    mv /usr/bin/gawk.exe /usr/bin/awk.exe
    Note that if the rm command fails then the mv is not necessary.
  • Download MS Visual C++ 2008 SP1 Redistributable Package (x86)
    • ( There have been security updates, which are not included in older versions.)
    • Download files vcredist_x86.exe and vcredist_x64.exe
      If you download the most actual version of Apache OpenOffice and unpack it, you will find the files vcredist_x86.exe and vcredist_x64.exe in folder redist. You can use them as well.
  • Optional: Install DirectX SDK (for graphics hardware support in the slide show)
    • Browse to
    • Download and run DXSDK_Jun10.exe. (If you receive an S1023 error towards the end of the installation, the fix is simple. The issue occurs because a newer version of the Visual C++ 2010 Redistributable is present on the computer. The June 2010 DirectX SDK installs version 10.0.30319 of the Visual C++ Redistributable. To resolve this issue, you must uninstall all versions of the Visual C++ 2010 Redistributable before installing the June 2010 DirectX SDK. You may have one or more of the following products installed: Visual C++ 2010 Redistributable x86, Visual C++ 2010 Redistributable x64. You can use Add or Remove Programs in Control Panel to uninstall the products. Or, you can run the following commands from an administrator command prompt:
MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}

and then run the DirectX SDK installer. After installing the June 2010 DirectX SDK, you may then reinstall the most current version of the Visual C++ 2010 Redistributable Package.)

  • Optional: Install NSIS installer (for creating the EXE installer)
  • Get AOO source code. You can use the source release or check out from SVN. Build from source release if you want to build OpenOffice once but don't want to contribute patches. If you will contribute patches, you need to generate them against an actual version of trunk. In this case check out from SVN to be able to rebase before generating patches. You can work with subversion or with git-svn. Do not use a tool that changes line endings, such as the default configuration of TortoiseSVN.
Source release
  • Browse to and locate the table row that starts with "Source code"
  • Download source code in an archive format of your choice (note that tar.bz2 is typically smaller than tar.gz and zip)
  • Optional: Verify the archive - following given link or instructions.
  • Unpack source (in cygwin-terminal). Use the file name exactly as downloaded.
    cd /tmp
    tar -xjf <download-location>/<downloaded-source-release.tar.bz2>
    cd <unpacked-source>/main
    Do not use Windows unpacker, they might cause access right problems.
Checkout from SVN using subversion 
  • Get subversion (only first time)
    apt-cyg install subversion
  • Start with creating a parent directory for the source code:
    mkdir /cygdrive/c/source
    cd /cygdrive/c/source
  • Check out source from Apache SVN repository
    svn co aoo-trunk
    cd aoo-trunk/main
Checkout from SVN using git-svn 
  • Get git and git-svn (only first time)
    apt-cyg install git git-svn
  • Get the actual revision number from, e.g. 1234567
  • Create an empty directory and change to it, e.g.
    mkdir /cygdrive/c/source
    cd /cygdrive/c/source
  • Check out source from Apache SVN repository
    git svn clone --revision 1234567:HEAD
    cd trunk/main
  • Remember the source path (this is optional, it keeps the following lines short):
    [Why? I have not used it. Regina (talk) 21:42, 24 February 2013 (UTC)]
[Added explanation above Andre]
  • Optional: Get dbghelp.dll (for using the --enable-dbgutil configure option)
    • This dll is part of MS Visual Studio. If you do not have it installed, download and install "Visual Studio Community" from
    • Copy file to main/external/dbghelp. Use Windows file manager or in cygwin terminal
      cp /cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 9.0/Common7/IDE/dbghelp.dll $SourceMain/external/dbghelp
  • Copy vcredist_x86.exe and vcredist_x64.exe (see above) to main/external/vcredist.
    • Use Windows file manager or in cygwin terminal
      cp <download-location>/vcredist_x86.exe $SourceMain/external/vcredist
      cp <download-location>/vcredist_x64.exe $SourceMain/external/vcredist
  • Get GDI+ redistributable.
    • Browse to
    • Download WindowsXP-KB975337-x86-ENU.exe
    • Run WindowsXP-KB975337-x86-ENU.exe
    • Enter a temporary path (eg c:\temp\gdiplus) in the dialog and click OK to extract files
    • Copy gdiplus.dll to main/external
      cp /cygdrive/c/temp/gdiplus/asms/10/msft/windows/gdiplus/gdiplus.dll $SourceMain/external/gdiplus/
    • Remove the temporary path
      rm -fr /cygdrive/c/temp/gdiplus
  • Get msvcr100.dll:
    cp /cygdrive/c/Windows/System32/msvcr100.dll $SourceMain/external/msvcp100
  • Make sure that you are in the main source directory:
    cd $SourceMain
  • Run autoconf to create the configure script:
  • Make sure you have the correct Perl modules installed:
    cpan -i Archive::Zip LWP::UserAgent LWP::Protocol
  • Call configure
    • Run configure (adapt paths as necessary)
      SDK_PATH="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.0"
      ./configure \
          --with-frame-home="$SDK_PATH" \
          --with-psdk-home="$SDK_PATH" \
          --with-midl-path="$SDK_PATH/bin" \
          --with-directx-home="C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)" \
          --with-ant-home="/cygdrive/c/apache-ant-1.8.4" \
          --with-dmake-url="" \
          --with-epm-url="" \
          --disable-pch \
          --disable-atl \
          --disable-activex \
      If you have not installed the optional DirectX SDK then remove the --with-directx-home switch
  • Finish configuration and download missing external source tarballs and extensions
  • Include the configured environment
  • Build
    cd instsetoo_native/
    build --all
    Depending on your computer this will take one or more hours to finish.
  • Install
    There are three options:
    1. Regular install with integration into Windows.
      This allows only one instance of AOO to be installed.
      • Start setup.exe and click through dialog:
      • Apache OpenOffice can be started via the Windows start menu.
    2. Install without integration into Windows.
      This allows several instance of AOO, based on the same version, to be installed side by side.
      It still requires Administrator permissions.
      • Start setup.exe with option -a:
        $SourceMain/instsetoo_native/ -a
      • Enter an installation path into the dialog and click through the dialog to finish installation.
      • Start AOO by running
    3. Unpack archive without installation.
      This does not require Administrator permissions
      • Go to installation directory:
        cd <installation-target>
      • Unzip archive:
        unzip $SourceMain/instsetoo_native/
      • Start AOO by running:
(Change the version number in the file name to match the version you built)

Mac OS X

The build guide for Mac OS X can be found on a separate page.

Personal tools