Difference between revisions of "Ubuntu Build Instructions"

From Apache OpenOffice Wiki
Jump to: navigation, search
(addendum for hardy)
Line 1: Line 1:
 +
== Ubuntu 8.04 (LTS) Hardy ==
 +
 +
For Hardy, the list of recommended packages is different.  Here's the command that
 +
got one first-timer through the many configure errors:
 +
<pre>
 +
aptitude install \
 +
ant ant-optional automake1.9 bison build-essential cvs \
 +
dmake flex gcj gperf java-gcj-compat-dev kdebase-dev \
 +
libagg-dev libaltlinuxhyph-dev libarchive-zip-perl \
 +
libaudio-dev libboost-dev libcupsys2-dev \
 +
libcurl4-openssl-dev libdb4.6-dev libdb4.6-java libgcj7-dev \
 +
libgnomevfs2-dev libgstreamer-plugins-base0.10-dev \
 +
libgstreamer0.10-dev libgtk2.0-dev libhunspell-dev \
 +
libjpeg62-dev libldap2-dev libmono-dev libneon26-dev \
 +
libnss3-dev libpam0g-dev libpam-dev libpng12-dev \
 +
libportaudio-dev libpq-dev libsablot0-dev \
 +
libsane-dev libsndfile1-dev libsoap-lite-perl \
 +
libstartup-notification0-dev libstlport5.1-dev libwpd8-dev \
 +
libxaw-headers libxml2-dev libxul-dev mingw32 mozilla-dev \
 +
myspell-tools python-dev tcsh unixodbc-dev
 +
</pre>
 +
 +
=== First trial ===
 +
 +
You don't have to install all necessary packages at once, you can go through trial and error to gain more knowledge about the Ubuntu packaging:
 +
 +
<pre>
 +
./configure
 +
</pre>
 +
 +
Configure without any parameters gives you some errors probably. You can disable some parts, e.g. --disable-mozilla.
 +
If configure requests for a file you can use the [http://packages.ubuntu.com/ Ubuntu package content search] to get to know which
 +
package provides such file.
 +
 +
=== With Mozilla ===
 +
 +
The commandline to configure is also a bit different, e.g.
 +
<pre>
 +
./configure --with-distro=UbuntuHardy --with-system-mozilla=xulrunner
 +
</pre>
 +
The --with-system-mozilla=xulrunner option seems to fix the configure error
 +
<pre>
 +
checking for libxul-xpcom ... Package libxul-xpcom was not found in the pkg-config search path.
 +
</pre>
 +
This may be related to https://bugs.launchpad.net/ubuntu/hardy/+source/openoffice.org-l10n/+bug/194551
 +
 +
=== Patches ===
 +
 +
Recent developer builds may need additional patches to build properly. You should have a look at the Subversion repository at
 +
<pre>
 +
svn://svn.services.openoffice.org/ooo/patches/buildbot
 +
</pre>
 +
 +
where patches of the OOo Buildbots can be found.
 +
 +
== Build using ooo-build on Ubuntu 5.10 Breezy ==
 +
 +
<font color="red">The instructions below are outdated and need a refresh!</font>
 +
 
This tutorial will assume a stock [http://www.ubuntu.com/download Ubuntu] 5.10 (Breezy) system as a starting point.
 
This tutorial will assume a stock [http://www.ubuntu.com/download Ubuntu] 5.10 (Breezy) system as a starting point.
 
(See below for Hardy instructions.)
 
(See below for Hardy instructions.)
Line 119: Line 178:
 
</pre>
 
</pre>
  
 
==Hardy==
 
For Hardy, the list of recommended packages is different.  Here's the command that
 
got one first-timer through the many configure errors:
 
<pre>
 
aptitude install \
 
ant ant-optional automake1.9 bison build-essential cvs \
 
dmake flex gcj gperf java-gcj-compat-dev kdebase-dev \
 
libagg-dev libaltlinuxhyph-dev libarchive-zip-perl \
 
libaudio-dev libboost-dev libcupsys2-dev \
 
libcurl4-openssl-dev libdb4.6-dev libdb4.6-java libgcj7-dev \
 
libgnomevfs2-dev libgstreamer-plugins-base0.10-dev \
 
libgstreamer0.10-dev libgtk2.0-dev libhunspell-dev \
 
libjpeg62-dev libldap2-dev libmono-dev libneon26-dev \
 
libnss3-dev libpam0g-dev libpam-dev libpng12-dev \
 
libportaudio-dev libpq-dev libsablot0-dev \
 
libsane-dev libsndfile1-dev libsoap-lite-perl \
 
libstartup-notification0-dev libstlport5.1-dev libwpd8-dev \
 
libxaw-headers libxml2-dev libxul-dev mingw32 mozilla-dev \
 
myspell-tools python-dev tcsh unixodbc-dev
 
</pre>
 
 
 
The commandline to configure is also a bit different, e.g.
 
<pre>
 
./configure --with-distro=UbuntuHardy --with-system-mozilla=xulrunner
 
</pre>
 
The --with-system-mozilla=xulrunner option seems to fix the configure error
 
<pre>
 
checking for libxul-xpcom ... Package libxul-xpcom was not found in the pkg-config search path.
 
</pre>
 
This may be related to https://bugs.launchpad.net/ubuntu/hardy/+source/openoffice.org-l10n/+bug/194551
 
  
 
==See also==
 
==See also==

Revision as of 11:32, 29 October 2008

Ubuntu 8.04 (LTS) Hardy

For Hardy, the list of recommended packages is different. Here's the command that got one first-timer through the many configure errors:

aptitude install \
ant ant-optional automake1.9 bison build-essential cvs \
dmake flex gcj gperf java-gcj-compat-dev kdebase-dev \
libagg-dev libaltlinuxhyph-dev libarchive-zip-perl \
libaudio-dev libboost-dev libcupsys2-dev \
libcurl4-openssl-dev libdb4.6-dev libdb4.6-java libgcj7-dev \
libgnomevfs2-dev libgstreamer-plugins-base0.10-dev \
libgstreamer0.10-dev libgtk2.0-dev libhunspell-dev \
libjpeg62-dev libldap2-dev libmono-dev libneon26-dev \
libnss3-dev libpam0g-dev libpam-dev libpng12-dev \
libportaudio-dev libpq-dev libsablot0-dev \
libsane-dev libsndfile1-dev libsoap-lite-perl \
libstartup-notification0-dev libstlport5.1-dev libwpd8-dev \
libxaw-headers libxml2-dev libxul-dev mingw32 mozilla-dev \
myspell-tools python-dev tcsh unixodbc-dev

First trial

You don't have to install all necessary packages at once, you can go through trial and error to gain more knowledge about the Ubuntu packaging:

./configure

Configure without any parameters gives you some errors probably. You can disable some parts, e.g. --disable-mozilla. If configure requests for a file you can use the Ubuntu package content search to get to know which package provides such file.

With Mozilla

The commandline to configure is also a bit different, e.g.

./configure --with-distro=UbuntuHardy --with-system-mozilla=xulrunner

The --with-system-mozilla=xulrunner option seems to fix the configure error

checking for libxul-xpcom ... Package libxul-xpcom was not found in the pkg-config search path.

This may be related to https://bugs.launchpad.net/ubuntu/hardy/+source/openoffice.org-l10n/+bug/194551

Patches

Recent developer builds may need additional patches to build properly. You should have a look at the Subversion repository at

svn://svn.services.openoffice.org/ooo/patches/buildbot

where patches of the OOo Buildbots can be found.

Build using ooo-build on Ubuntu 5.10 Breezy

The instructions below are outdated and need a refresh!

This tutorial will assume a stock Ubuntu 5.10 (Breezy) system as a starting point. (See below for Hardy instructions.)

Obtaining ooo-build

One may obtain the stable 2.0.2 version of ooo-build via CVS with the following commands:

export CVSROOT=':pserver:anonymous@anoncvs.gnome.org:/cvs/gnome'
cvs login
cvs -z3 checkout -P ooo-build
cvs update -Pd -r ooo-build-2-0-2

You should then enter the ooo-build directory and run ./autogen.sh --with-distro=Ubuntu. Most likely you'll also want to add the --disable-kde flag (unless you're using Kubuntu).

Additional Required Packages

Packages may be obtained as follows:

 sudo apt-get install package_name [additional_package(s)]

Alternatively, you may use the Synaptic Package Manager to install missing packages.

To obtain the source, you need:

  • cvs

To complete autogen.sh, you need:

  • automake1.9
  • build-essential
  • libpam0g-dev
  • libpng12-dev
  • flex
  • bison
  • libgtk2.0-dev

For make to finish its configuration stage, you need:

  • tcsh
  • libcupsys2-dev
  • java-gcj-compat-dev
  • libarchive-zip-perl
  • libjpeg62-dev
  • libxml2-dev
  • python-dev
  • libdb4.3-dev
  • libdb4.3-java-dev
  • libcurl3-dev (on 7.10/gutsy: libcurl4-gnutls-dev)
  • unixodbc-dev
  • libldap2-dev
  • mozilla-dev
  • libnss-dev
  • libsane-dev
  • libxaw-headers
  • libaudio-dev
  • libsndfile1-dev
  • libneon24-dev
  • libgnomevfs2-dev
  • kdebase-dev (KDE only?)
  • libstartup-notification0-dev
  • ant
  • libdbus-glib-1-dev (Ubuntu version is not high enough! 0.36.2 < 0.60)
  • firefox-dev (if --with-firefox used)
  • libxul-dev (if --with-firefox used)
  • libgstreamer0.10-dev
  • libgstreamer-plugins-base0.10-dev
  • gperf
  • libxslt1-dev

Far into the main build commencing section, you'll realize you need these:

  • libbonobo2-dev
  • libxaw7-dev

Necessary ./configure Flags

  • --disable-gtk — This has to be disabled, otherwise make will get hung up on the dbus-glib-1 version 0.60 requirement. The highest version of that package available for Ubuntu is 0.36.2.

Failed patches

Some of the patches listed in ooo-build/patches/src680/apply may not apply successfully. You can try to comment them out in the apply file, but this is an experimental solution...

Tips

A shell script like the one below will alert your attention upon completion of the quite lengthy build process. Run it after ./download completes in place of make.

#!/bin/bash
echo "Starting 'make' wrapper..."
cd ~/ooo-build
/usr/bin/time --quiet -f %E make
echo "Compilation finished."
mplayer -really-quiet ~/Music/My_Music_File.mp3

For the purpose of this tutorial, save the file as make_wrapper.sh. To make it executable, type chmod 744 make_wrapper.sh.

Development Environment Preparation Script

Note: User interaction is required first to enter a password for apt-get, and again much later to hit Enter when prompted for a CVS password.

#!/bin/bash
echo "Starting Ubuntu ooo-build preparations..."

sudo apt-get -y install cvs automake1.9 build-essential libpam0g-dev libpng12-dev flex bison libgtk2.0-dev \
tcsh libcupsys2-dev java-gcj-compat-dev libarchive-zip-perl libjpeg62-dev libxml2-dev python-dev libdb4.3-dev \
libdb4.3-java-dev libcurl3-dev unixodbc-dev libldap2-dev mozilla-dev libnss-dev libsane-dev libxaw-headers \
libaudio-dev libsndfile1-dev libneon24-dev libgnomevfs2-dev libstartup-notification0-dev ant

export CVSROOT=':pserver:anonymous@anoncvs.gnome.org:/cvs/gnome'
cvs login
cvs -z3 co -P ooo-build
cvs up -Pd -r ooo-build-2-0-2

echo "Preparations complete."

cd ~/ooo-build
./autogen.sh --with-distro=Ubuntu --disable-kde
./download

#Now comment out failing patch:
cp patches/src680/apply patches/src680/apply~
sed 's/^ubuntu-dictionary\.diff/#&/' <patches/src680/apply~ >patches/src680/apply
rm patches/src680/apply~

make
#Or if you want an audible alert,
#~/make_wrapper.sh


See also

Personal tools