Difference between revisions of "Documentation/Building Guide AOO/Step by step Linux"

From Apache OpenOffice Wiki
Jump to: navigation, search
(All this is just a preparation of the development system)
Line 10: Line 10:
  
 
This version limits itself to either relatively recent versions of operating systems, or systems in which the OpenOffice PMC are activity using. A historical version of the step-by-step instructions for different platforms can be found [[Documentation/Building_Guide_AOO/Old_step_by_step|here]].
 
This version limits itself to either relatively recent versions of operating systems, or systems in which the OpenOffice PMC are activity using. A historical version of the step-by-step instructions for different platforms can be found [[Documentation/Building_Guide_AOO/Old_step_by_step|here]].
 +
 +
= Preparation of the development system =
  
 
Releases are built using CentOS and Fedora virtual machines.
 
Releases are built using CentOS and Fedora virtual machines.
 
However, any modern distribution should be able to build {{AOO}}.
 
However, any modern distribution should be able to build {{AOO}}.
  
=CentOS 5 for AOO 4.1.x =
+
==CentOS 5 for AOO 4.1.x==
  
 
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.
 
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.
Line 20: Line 22:
 
A 32-bit VM is used to build 32-bit releases. A 64-bit VM is used to build 64-bit releases.
 
A 32-bit VM is used to build 32-bit releases. A 64-bit VM is used to build 64-bit releases.
  
==Setup a VM==
+
===Setup a VM===
  
 
KVM given here as example for the 64-bit distribution.
 
KVM given here as example for the 64-bit distribution.
Line 40: Line 42:
 
Our community builds are actually done on a VMware Fusion VM. Build times are mostly sensitive to the number of CPUs and allocated RAM; our setup is a 8 core VM with 24GB of memory.
 
Our community builds are actually done on a VMware Fusion VM. Build times are mostly sensitive to the number of CPUs and allocated RAM; our setup is a 8 core VM with 24GB of memory.
  
==Setup repositories and packages==
+
===Setup repositories and packages===
  
 
EPEL is needed for dpkg (to build DEBs):
 
EPEL is needed for dpkg (to build DEBs):
Line 85: Line 87:
 
This leaves out Ant and Perl.
 
This leaves out Ant and Perl.
  
==Download Ant==
+
===Download Ant===
  
 
Ant 1.7.1 is now available in the CentOS repositories:
 
Ant 1.7.1 is now available in the CentOS repositories:
Line 98: Line 100:
 
  $ ln -s apache-ant-1.9.15 ant
 
  $ ln -s apache-ant-1.9.15 ant
  
==Install OpenSSL==
+
===Install OpenSSL===
  
 
The OpenSSL version included with CentOs does not support the TLS versions required for today's https connections.
 
The OpenSSL version included with CentOs does not support the TLS versions required for today's https connections.
Line 112: Line 114:
 
  # ldconfig
 
  # ldconfig
  
==Install Perl modules==
+
===Install Perl modules===
  
 
We can no longer use the system Perl and standard packages on CentOS 5, which are too old, so we will need to build newer versions.
 
We can no longer use the system Perl and standard packages on CentOS 5, which are too old, so we will need to build newer versions.
Line 134: Line 136:
 
Make sure that /usr/local/bin/perl is in your $PATH and is used before any other versions.
 
Make sure that /usr/local/bin/perl is in your $PATH and is used before any other versions.
  
==Configure==
+
===Configure===
  
 
The scripts at https://svn.apache.org/viewvc/openoffice/devtools/build-scripts/ are used to prepare the release builds.
 
The scripts at https://svn.apache.org/viewvc/openoffice/devtools/build-scripts/ are used to prepare the release builds.
  
=CentOS 7 and Fedora 19 for AOO 4.2.x and later=
+
==CentOS 7 and Fedora 19 for AOO 4.2.x and later==
  
 
Although CentOS 5 was our reference environment for build through the 4.1.x series, as it is a very old environment, it is not a viable system to use for building AOO 4.2.x and later, mainly due to some dependencies no longer being available for CentOS5 (such as ''gstreamer-1.x''). Not to say that you can't do so, but we have switched to CentOS 7 for our reference build of 64-bit releases. Other than that, the actual setups and builds for both OSs are strikingly similar.
 
Although CentOS 5 was our reference environment for build through the 4.1.x series, as it is a very old environment, it is not a viable system to use for building AOO 4.2.x and later, mainly due to some dependencies no longer being available for CentOS5 (such as ''gstreamer-1.x''). Not to say that you can't do so, but we have switched to CentOS 7 for our reference build of 64-bit releases. Other than that, the actual setups and builds for both OSs are strikingly similar.
Line 144: Line 146:
 
32-bit releases are built on Fedora 19 VMs. Refer to [[#32 bit hints|this paragraph]] for more information
 
32-bit releases are built on Fedora 19 VMs. Refer to [[#32 bit hints|this paragraph]] for more information
  
==Setup a VM==
+
===Setup a VM===
  
 
We have had good results installing CentOS 7 x86_64 under both VirtualBox and VMware. Our community builds are actually done on a VMware Fusion VM. Build times are mostly sensitive to the number of CPUs and allocated RAM; our setup is a 8 core VM with 24GB of memory. We recommend CentOS 7.5
 
We have had good results installing CentOS 7 x86_64 under both VirtualBox and VMware. Our community builds are actually done on a VMware Fusion VM. Build times are mostly sensitive to the number of CPUs and allocated RAM; our setup is a 8 core VM with 24GB of memory. We recommend CentOS 7.5
  
==Setup repositories and packages==
+
===Setup repositories and packages===
  
 
EPEL is needed for dpkg (to build DEBs) and for ccache (to speed up repeated builds, optional but recommended):
 
EPEL is needed for dpkg (to build DEBs) and for ccache (to speed up repeated builds, optional but recommended):
Line 199: Line 201:
 
This leaves out Ant and Perl.
 
This leaves out Ant and Perl.
  
==Download Ant==
+
===Download Ant===
  
 
The version of Ant installed via yum can cause configure to fail, so a manual download is needed. Ant will live in ~/ant and we need to download it manually.
 
The version of Ant installed via yum can cause configure to fail, so a manual download is needed. Ant will live in ~/ant and we need to download it manually.
Line 208: Line 210:
 
  $ ln -s apache-ant-1.9.15 ant
 
  $ ln -s apache-ant-1.9.15 ant
  
==Install Perl modules==
+
===Install Perl modules===
  
 
We can use the system Perl and standard packages on CentOS 6, see https://bz.apache.org/ooo/show_bug.cgi?id=127120
 
We can use the system Perl and standard packages on CentOS 6, see https://bz.apache.org/ooo/show_bug.cgi?id=127120
Line 224: Line 226:
 
   $ sudo cpan File::Path
 
   $ sudo cpan File::Path
  
==Build and Packaging tools==
+
===Build and Packaging tools===
  
 
Download, configure, build and install dmake and epm
 
Download, configure, build and install dmake and epm
Line 240: Line 242:
 
Note: if you get <code>Error: ERROR: More than one new package in directory</code> at the end of the build, you may have to use an older EPM. In that case, just add <code>--with-epm-url=http://sourceforge.net/projects/oooextras.mirror/files/epm-3.7.tar.gz</code> to the options you pass to <code>./configure</code>.
 
Note: if you get <code>Error: ERROR: More than one new package in directory</code> at the end of the build, you may have to use an older EPM. In that case, just add <code>--with-epm-url=http://sourceforge.net/projects/oooextras.mirror/files/epm-3.7.tar.gz</code> to the options you pass to <code>./configure</code>.
  
==32 bit hints==
+
===32 bit hints===
  
===Fedora19===
+
====Fedora19====
  
 
Fedora19 is the Fedora release on which RHEL7 (and thus CentOS7) is based. The 32bit version of Fedora19 is much more stable as a build platform for AOO for 32bit Linux platforms, and is compatible with CentOS7.
 
Fedora19 is the Fedora release on which RHEL7 (and thus CentOS7) is based. The 32bit version of Fedora19 is much more stable as a build platform for AOO for 32bit Linux platforms, and is compatible with CentOS7.
Line 248: Line 250:
 
The community builds of AOO 4.2.x and later are built on Fedora19.
 
The community builds of AOO 4.2.x and later are built on Fedora19.
  
===CentOS7===
+
====CentOS7====
  
 
Alternatively, you can also use CentOS 7.
 
Alternatively, you can also use CentOS 7.
Line 257: Line 259:
 
  $ wget http://ftp.gnu.org/gnu/tar/tar-1.30.tar.gz
 
  $ wget http://ftp.gnu.org/gnu/tar/tar-1.30.tar.gz
  
==Configure==
+
===Configure===
  
 
The scripts at https://svn.apache.org/viewvc/openoffice/devtools/build-scripts/ are used to prepare a release build.
 
The scripts at https://svn.apache.org/viewvc/openoffice/devtools/build-scripts/ are used to prepare a release build.
  
=Ubuntu 16.04=
+
==Ubuntu 16.04==
 
  {{DraftPage|EN}}
 
  {{DraftPage|EN}}
 
The process to build {{AOo|EN}} is currently undergoing experimentation. As steps are firmed up they will be added here.
 
The process to build {{AOo|EN}} is currently undergoing experimentation. As steps are firmed up they will be added here.
Line 271: Line 273:
 
Draft: With Version 4.2 we start to update the build enviroment to Ubuntu 18.04 and Debian 9. You can follow [https://wiki.openoffice.org/wiki/User:Mechtilde/AOOBauen AOOBauen]
 
Draft: With Version 4.2 we start to update the build enviroment to Ubuntu 18.04 and Debian 9. You can follow [https://wiki.openoffice.org/wiki/User:Mechtilde/AOOBauen AOOBauen]
  
=Ubuntu 18.04=
+
==Ubuntu 18.04==
 
  {{DraftPage|EN}}
 
  {{DraftPage|EN}}
 
The process to build {{AOo|EN}} is currently undergoing experimentation. As steps are firmed up they will be added here.
 
The process to build {{AOo|EN}} is currently undergoing experimentation. As steps are firmed up they will be added here.

Revision as of 18:21, 14 January 2021


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

This version limits itself to either relatively recent versions of operating systems, or systems in which the OpenOffice PMC are activity using. A historical version of the step-by-step instructions for different platforms can be found here.

Preparation of the development system

Releases are built using CentOS and Fedora virtual machines. However, any modern distribution should be able to build Apache OpenOffice.

CentOS 5 for AOO 4.1.x

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.

A 32-bit VM is used to build 32-bit releases. A 64-bit VM is used to build 64-bit releases.

Setup a VM

KVM given here as example for the 64-bit distribution.

 $ wget -O /tmp/CentOS-5.iso http://mirror.nsc.liu.se/centos-store/5.11/isos/x86_64/CentOS-5.11-x86_64-netinstall.iso
 $ fallocate -l 61440M /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 mirror.nsc.liu.se and CentOS directory /centos-store/5.11/os/x86_64
    • Partitioning: 60000M for /, rest swap (you will need ~55 GBytes for a full build with all languages and langpacks)
    • Setup Base system only
  • Reboot the VM and configure it

Our community builds are actually done on a VMware Fusion VM. Build times are mostly sensitive to the number of CPUs and allocated RAM; our setup is a 8 core VM with 24GB of memory.

Setup repositories and packages

EPEL is needed for dpkg (to build DEBs):

 $ wget http://archives.fedoraproject.org/pub/archive/epel/5/i386/epel-release-5-4.noarch.rpm
 $ sudo rpm -ivh epel-release-5-4.noarch.rpm
 $ sudo yum update -y

Now you can install all dependencies:

 $ sudo yum install \
       gcc \
       expat-devel \
       openssl-devel \
       autoconf \
       gcc-c++ \
       cups-devel \
       pam-devel \
       java-1.6.0-openjdk-devel \
       rpm-build \
       dpkg \
       fakeroot \
       gperf \
       freetype-devel \
       libX11-devel \
       libXt-devel \
       fontconfig-devel \
       libXrandr-devel \
       bison \
       flex \
       GConf2-devel \
       gnome-vfs2-devel \
       gtk2-devel \
       gstreamer-devel \
       gstreamer-plugins-base-devel \
       mesa-libGLU-devel \
       git \
       ccache

Configure ccache:

 $ ccache -M 2G

This leaves out Ant and Perl.

Download Ant

Ant 1.7.1 is now available in the CentOS repositories:

 $ sudo yum install ant17 ant17-apache-regexp

However, this will still cause configure to fail, so a manual download is needed. Ant will live in ~/ant and we need to download it manually.

$ cd
$ wget http://mirrors.nxnethosting.com/apache//ant/binaries/apache-ant-1.9.15-bin.tar.bz2
$ tar xvf apache-ant-1.9.15-bin.tar.bz2
$ ln -s apache-ant-1.9.15 ant

Install OpenSSL

The OpenSSL version included with CentOs does not support the TLS versions required for today's https connections.

As root:

# cd /usr/local/src
# wget https://www.openssl.org/source/openssl-1.0.2a.tar.gz
# tar xzf openssl-1.0.2a.tar.gz
# cd openssl-1.0.2a
# ./config -fpic shared; make
# make install
# echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
# ldconfig

Install Perl modules

We can no longer use the system Perl and standard packages on CentOS 5, which are too old, so we will need to build newer versions.

Be root, then:

 # cd /usr/local/src
 # wget http://www.cpan.org/src/5.0/perl-5.14.4.tar.gz
 # tar xvf perl-5.14.4.tar.gz
 # cd perl-5.14.4
 # export OPENSSL_PREFIX=/usr/local/ssl
 # ./configure.gnu ; make
 # make install
 # /usr/local/bin/perl -MCPAN -e shell
      [ reply "yes" to all questions to carry out cpan's autoconfiguration ]
  cpan[1]> force install Archive::Zip
  cpan[2]> install XML::Parser LWP::UserAgent Digest::SHA Digest::MD5 LWP::Protocol::https
  cpan[3]> exit
 #

Make sure that /usr/local/bin/perl is in your $PATH and is used before any other versions.

Configure

The scripts at https://svn.apache.org/viewvc/openoffice/devtools/build-scripts/ are used to prepare the release builds.

CentOS 7 and Fedora 19 for AOO 4.2.x and later

Although CentOS 5 was our reference environment for build through the 4.1.x series, as it is a very old environment, it is not a viable system to use for building AOO 4.2.x and later, mainly due to some dependencies no longer being available for CentOS5 (such as gstreamer-1.x). Not to say that you can't do so, but we have switched to CentOS 7 for our reference build of 64-bit releases. Other than that, the actual setups and builds for both OSs are strikingly similar.

32-bit releases are built on Fedora 19 VMs. Refer to this paragraph for more information

Setup a VM

We have had good results installing CentOS 7 x86_64 under both VirtualBox and VMware. Our community builds are actually done on a VMware Fusion VM. Build times are mostly sensitive to the number of CPUs and allocated RAM; our setup is a 8 core VM with 24GB of memory. We recommend CentOS 7.5

Setup repositories and packages

EPEL is needed for dpkg (to build DEBs) and for ccache (to speed up repeated builds, optional but recommended):

 $ sudo yum install epel-release
 $ sudo yum update -y

Now you can install all dependencies:

 $ sudo yum install \
       gcc \
       expat-devel \
       openssl-devel \
       autoconf \
       gcc-c++ \
       cups-devel \
       pam-devel \
       java-1.7.0-openjdk-devel \
       rpm-build \
       dpkg \
       fakeroot \
       gperf \
       freetype-devel \
       libX11-devel \
       libXt-devel \
       fontconfig-devel \
       libXrandr-devel \
       bison \
       flex \
       GConf2-devel \
       gnome-vfs2-devel \
       gtk2-devel \
       gstreamer-devel \
       gstreamer-plugins-base-devel \
       gstreamer1-devel \
       gstreamer1-plugins-base-devel \
       mesa-libGLU-devel \
       wget \
       subversion \
       ccache \
       glib2-devel \
       dbus-glib-devel \
       perl \
       ORBit2-devel

Configure ccache to use at least 2 GBytes:

 $ ccache -M 2G

This leaves out Ant and Perl.

Download Ant

The version of Ant installed via yum can cause configure to fail, so a manual download is needed. Ant will live in ~/ant and we need to download it manually.

$ cd
$ wget http://mirrors.nxnethosting.com/apache//ant/binaries/apache-ant-1.9.15-bin.tar.bz2
$ tar xvf apache-ant-1.9.15-bin.tar.bz2
$ ln -s apache-ant-1.9.15 ant

Install Perl modules

We can use the system Perl and standard packages on CentOS 6, see https://bz.apache.org/ooo/show_bug.cgi?id=127120

 $ sudo yum install \
       cpan \
       perl-libwww-perl \
       perl-Archive-Zip \
       perl-Digest-SHA \
       perl-XML-Parser \
       perl-Crypt-SSLeay \
       perl-Env \
       perl-LWP-Protocol-https
 $ sudo cpan File::Path

Build and Packaging tools

Download, configure, build and install dmake and epm

$ wget https://github.com/jimjag/dmake/archive/v4.13.1/dmake-4.13.1.tar.gz
$ # extract the archive, then
$ cd dmake-4.13.1
$ ./configure --prefix=/usr/local; make install


$ wget https://github.com/jimjag/epm/archive/v5.0.0/epm-5.0.0.tar.gz
$ # extract the archive, then
$ cd epm-5.0.0
$ ./configure --prefix=/usr/local ; make install

Note: if you get Error: ERROR: More than one new package in directory at the end of the build, you may have to use an older EPM. In that case, just add --with-epm-url=http://sourceforge.net/projects/oooextras.mirror/files/epm-3.7.tar.gz to the options you pass to ./configure.

32 bit hints

Fedora19

Fedora19 is the Fedora release on which RHEL7 (and thus CentOS7) is based. The 32bit version of Fedora19 is much more stable as a build platform for AOO for 32bit Linux platforms, and is compatible with CentOS7.

The community builds of AOO 4.2.x and later are built on Fedora19.

CentOS7

Alternatively, you can also use CentOS 7.

There is not a EPEL release for CentOS 7 32bit, so you'll need to download, build and install dpkg and GNUtar directly. You may also need fakeroot (or pseudo):

$ wget ftp://ftp.de.debian.org//debian/pool/main/d/dpkg/dpkg_1.19.3.tar.xz
$ wget http://ftp.gnu.org/gnu/tar/tar-1.30.tar.gz

Configure

The scripts at https://svn.apache.org/viewvc/openoffice/devtools/build-scripts/ are used to prepare a release build.

Ubuntu 16.04

Editing.png This page is in a DRAFT stage.

The process to build Apache OpenOffice is currently undergoing experimentation. As steps are firmed up they will be added here.

  • Updated Install requirements. OpenJDK 6 or 7 is not available for Ubuntu 16.04:
 sudo apt-get install openjdk-8-jdk fakeroot

Draft: With Version 4.2 we start to update the build enviroment to Ubuntu 18.04 and Debian 9. You can follow AOOBauen

Ubuntu 18.04

Editing.png This page is in a DRAFT stage.

The process to build Apache OpenOffice is currently undergoing experimentation. As steps are firmed up they will be added here.

Ensure that the required package repositories are activated:

 $ sudo add-apt-repository universe
 $ sudo apt update

Install build dependencies:

 $ 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-8-jdk liblablgl-ocaml-dev

Install git

 $ sudo apt-get install git

Create folder for source (this is a suggested location, replace <yourusername> with your user name)

 $ sudo mkdir /source
 $ sudo chown <yourusername> /source
 $ cd /source
 $ git clone https://gitbox.apache.org/repos/asf/openoffice.git
 $ cd openoffice/
 $ git checkout <branch>

Please replace <branch> with the branch you want to compile e.g. AOO419 or AOO42X

Personal tools