As Apache OpenOffice 4.1.3 is about to be released, I wanted to share my experience building the venerable, enterprise grade, IBM Symphony-enhanced office suite. Although I had tried in the past, I had not succeeded in building such a formidable application. The following post, thus, is an overview of how I managed to build the soon to be released OO 4.1.3. In the process I hope to dispel malicious rumors of its demise by self-serving trolls and invite the community to collaborate in furthering the development of ApacheOO.
So I use Debian Sid as my daily development environment -- with a Google Compute Engine and VirtualBox to provision and spin Debian Jessie (Stable) instances. Evidently, OO is an application that I keep open on a constant basis; thus, it is a no-brainer what instance I was to engage in my build effort. Although I had downloaded a binary of ApacheOO 4.1.3 RC1, had successfully installed into Debian Sid for AMD64, and was using it normally, I had an irresistible urge to build my own OpenOffice , notwithstanding. My quest began by looking at the documentation and example snippets of build commands. And I desired to build installation packages for Debian and derivatives like Ubuntu -- as well as for Red Hat and derivatives like CentOS and its clone Oracle Unbreakable Linux
I had to use GCC-5.x and G++5.x since newer versions failed to build OpenOffice 4.1.3.
Shell
apt-get update | |
apt-get install g++-5 gcc-5 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 libwww-perl libxml-parser-perl autoconf libssl-dev lib32gcc-5-dev libx32gcc-5-dev mingw32 subversion git-svn libgstreamer-plugins-base0.10-dev rpm default-jdk libgles2-mesa-dev |
NOTE BEGIN: below procedure may be irrelevant, since installing default-jdk as above will install appropriate Java distribution for your Debian which will be likely appropriate for your ApacheOO build.
OpenJDK6 is not in Jessie, nor Stretch, nor Unstable repositories, and probably it is not needed but since it was referred to in the ApacheOO build documentation, I installed it from experimental (ugh!)
Opened the file /etc/apt/sources.list with a text editor, i.e., vim, and added the following directive:
deb http://ftp.us.debian.org/debian/ experimental main non-free contrib
Save our modification and
Shell
apt-get update | |
apt-get install openjdk-6-jdk |
Don't forget afterwards to disable the directive so as not to install further Debian software from experimental repository. Follow with another
Shell
apt-get update |
... END of NOTE.
We check if GCC references version 5:
gcc --version
(sample output)
gcc (Debian 5.4.1-2) 5.4.1 20160904
Then, we check if G++ references version 5:
g++ --version
(sample output)
g++ (Debian 5.4.1-2) 5.4.1 20160904
Given the fact that GCC-6.x and G++6.x are by default being pointed by the symbolic links, gcc and g++, respectively, it may be necessary to manually point symbolic links to their lower (non default) version. Hence, if the above directives pointed to GCC/G++ version 6, you need to acquire root powers, or use sudo su, to remove the symbolic links gcc and g++ and subsequently point them properly:
Shell
cd /usr/bin | |
rm -v gcc g++ | |
ln -s gcc-5 gcc | |
ln -s g++-5 g++ |
Verify by repeating the version output of both, gcc and g++.
We are ready to build Apache OpenOffice 4.1.3
Download locally the Apache OpenOffice branch that we want to build. In this particular case AOO-4.1.3 -- as defined below:
Shell
svn co https://svn.apache.org/repos/asf/openoffice/branches/AOO413 | |
cd AOO413/main | |
autoconf | |
./configure --with-build-version="$(date +"%Y-%m-%d %H:%M") `uname -nsm`" --with-dmake-url=http://sourceforge.net/projects/oooextras.mirror/files/dmake-4.12.tar.bz2 --with-epm-url=https://sourceforge.net/projects/oooextras.mirror/files/epm-3.7.tar.gz --enable-graphite --enable-category-b --enable-bundled-dictionaries --enable-pdfimport --enable-wiki-publisher --enable-opengl --with-package-format="rpm deb" --with-lang="en-US ru de" --enable-gstreamer --with-mingwin=i586-mingw32msvc-g++ |
A few explanations on the options to configure script, above:
--with-build-version specifies build date; uname specifies node(host) name, kernel name, and machine hardware, respectively.
--with-dmake-url specifies URL where the dmake utility will be downloaded from; you may build dmake locally, say at /user/local, and modify the above directive as:
--with-dmake-path=/usr/local/bin/dmake
--with-epm-url specifies URL where to find epm utility to be subsequently patched and be built; it is needed to generate DEB and RPM packages. Again, you may download the source from the URL and build and patch locally your epm. For instance, if you specify --prefix=/usr/local, the above directive may be modified to:
--with-epm=/usr/local/bin/epm
--enable-category-b this is required, otherwise you will not have spell checking available in your OpenOffice.
--with-package-format generate packages for Debian, Red Hat, and their respective derivatives.
--with-lang I specified Russian and German, in addition to USA English versions of OO to be generated.
--with-mingwin=i586-mingw32msvc-g++ to build unowinreg.dll.
End of 'a few explanations'
Now proceed to run the command:
Shell
./bootstrap |
in /usr/src/build/apacheoo/AOO413/main (i.e., your current directory) to provide build tools and get third-party packages
Acquire super user abilities; the build routine will need them for epm to build the DEB and RPM packaging. Please be aware that if you omit acquiring super user privilege, your build task will end unable to generate DEBs/RPMs with the following output error:
Calculating Installed-Size...
Building Debian binary distribution...
dpkg --build openoffice-core03_4.2.0-1_amd64
Packaging failed!
Now for real -- after the prior warning explained -- we begin by acquiring root privilege:
Shell
sudo su | |
source ./LinuxX86-64Env.Set.sh | |
cd instsetoo_native |
Now if you have several CPU cores, you may speed the build time by replacing n below with number of threads you want to use; additionally, you may specify m for quantity of modules you may want to build simultaneously:
build --all -Pm -- -Pn
Hence, assuming you want to allocate n=6 threads of your CPU to the OO building build task and want to build m=4 modules simultaneously, you may specify some directive like:
Shell
build --all -P4 -- -P6 |
At the end of the procedure -- which takes approximately 3 hours with the configuration above -- you will find your generated DEB and RPM packages for Linux AMD64 at the directories relative to where you started the build:
unxlngx6.pro/Apache_OpenOffice/deb/install/en-US/DEBS
unxlngx6.pro/Apache_OpenOffice/deb/install/de/DEBS
unxlngx6.pro/Apache_OpenOffice/deb/install/ru/DEBS
unxlngx6.pro/Apache_OpenOffice/rpm/install/en-US/RPMS
unxlngx6.pro/Apache_OpenOffice/rpm/install/de/RPMS
unxlngx6.pro/Apache_OpenOffice/rpm/install/ru/RPMS
I proceeded to move my freshly built DEBS packaging into my home directory
Shell
mv -iv unxlngx6.pro/Apache_OpenOffice/deb/install/en-US ~ | |
cd ~/en-US/DEBS/. |
And purged my current, perfectly working OO 4.1.3 RC1, with the command:
Shell
apt-get purge $(dpkg-query -l "*openoffice*" | grep "^ii" | cut -c 4-33) |
subsequently installing my very own build of Apache OpenOffice 4.1.3 thus:
Shell
dpkg -i openoffice*deb |
Huelmati!1 (i.e., Enjoy!)
Notes:
Apache OpenOffice Building Guide
1 Nahuatl, Mexico's language par excellence.
DISCLAIMER although due diligence has been applied, this resource is made available for testing/evaluation purposes on an AS IS basis. The procedure only reflects my own modifications, my limited testing, and the potential user who executes the procedures assumes all risks.
Please do not hold me or Metztli Information Technology (and/or its associates) responsible if the information provided here does not achieve the desired result. The information is provided AS IS and with the hope that it may be useful to the Internet community --especially those interested in Apache OpenOffice development on Debian.
Notwithstanding, There is no implicit or explicit guarantee that the information presented here is accurate --even though due diligence was exercised during the procedure. Accordingly, if an user(s) decide to implement the procedure or shell commands described here she, he, or them, do so at her, his, or their own risk. You have been forewarned.
I reserve the right to modify and/or even delete this post.