EnvironmentSetup/Linux

From OOo4Kids

Jump to: navigation, search

Back to Environment Setup

Please do not translate the page yet

This page is Linux dedicated.

Contents

File Systems

Here are some filesystem listed by compatibility:

Compatible for build: Ext3, Ext4, ReiserFS.

Might run into some problems: NTFS, UFS.

Not Compatible for build: Vfat.

Building OOo4Kids on Archlinux

This is the easiest build on Linux.

Here are the unofficial OOo4Kids PKGBUILD and its post-install script :

PKGBUILD (created : 31st July 2010)

ooo4kids.install (created : 31st July 2010)

Instructions :

Create the above files in an empty folder (as plain text files named PKGBUILD and ooo4kids.install).

Run makepkg -s (the -s option installs the missing dependencies if needed)


The binary packages this generates will soon be availaible on the [archlinux.fr official repository]

Check the sources, build and install OOo4Kids (Debian, Ubuntu, Fedora and Mandriva or Sugar)

Prerequisites

To build OOo4Kids on Linux (all distributions), some development tools are mandatory, but it is important to add what you will not need too.

Below, some parts you don't need to install

  • You don't need to install Java
  • You don't need to install Apache-Ant
  • You don't need to install Mozilla, nor download anything Mozilla

This said, below is listed what you need to install on Linux ....


Suggested packages

Note: apt-get is used below, on Debian and Ubuntu, but on Mandriva, you'll have to replace 'apt-get' with 'urpmi' (the need is similar). For Fedora, you'll have to replace 'apt-get' with 'yum'.

You will need at least followings packages. Feel free to copy/paste what you need ;-)

sudo apt-get install libarchive-zip-perl
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install libpam-dev
sudo apt-get install gperf
sudo apt-get install python-dev
sudo apt-get install curl
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install libxaw7-dev
sudo apt-get install libxrandr-dev
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install libgconf2-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libcupsys2-dev
sudo apt-get install libgstreamer0.10-dev
sudo apt-get install libgstreamer-plugins-base0.10-dev
sudo apt-get install libcups2-dev


Packages specific for Fedora -

sudo yum install cups-devel
sudo yum install gstreamer-devel
sudo yum install gstreamer-plugins-base-devel


Recommended tools

  • ccache

If you intend to build OpenOffice.org several times, you probably can benefit of ccache since it will speed up your future builds. The first time you make a build with ccache you won't notice it, but the next time the build will go up to five times faster.

To install it:

sudo apt-get install ccache

There are two ways to enable ccache - one is to set environment variables, the other way is to use symlinks.

Using environment variables:

export CC="ccache gcc"
export CXX="ccache g++"

Using the symlink approach:

# create a directory for the links 
mkdir ~/bin
# create the symlinks pointing to ccache with the name of the compiler
ln -s /path/to/ccache ~/bin/gcc
ln -s /path/to/ccache ~/bin/g++
ln -s /path/to/ccache ~/bin/cc
ln -s /path/to/ccache ~/bin/c++
# no all you need to enable ccache is to prepend ~/bin to your PATH
$ export PATH=~/bin:$PATH

for both methody, you can add the "export ..." lines to your ~/.profile - that way you don't need to manually set it when building. You can still temporarily disable ccache (export CCACHE_DISABLE=1) in case you don't want to use it.

Since OOo is rather huge, you should increase the cache-size to 1 GB or more

ccache -M 1G
  • subversion version 1.5.4 or later

Since OOo's source code is managed using Subversion currently, you also need the svn client to checkout sources (otherwise you would be bount to source-tarballs that aren't generated that frequently). You can either compile yourself or use the subversion universal binaries from the subversion project Version 1.5.4 or later is required because of important fixes related to the merge-feature.

To install it:

sudo apt-get install subversion

Build it

Checkout the source code

The goal of this step is to get the source code for OpenOffice 3.0 milestone 47. The total size is 4,4 Go. This can take a lot of time depending of your bandwidth connection. (i.e.: With my 1MO DSL it take me more than 4 hours)

Firstly, you need to install subversion package. On a debian-like OS :

apt-get install subversion

The command to use is :

svn checkout -r844 svn://svn.adullact.net/svnroot/ooo4kids1/trunk my_OOo4Kids

Will download the entier sources tree (1.2 GB). Count 15 GB reserved on the hard disk, for a full build ( 8 locales).

Launch the configure

...and the configure command line is :

 ./configure --disable-binfilter \
             --disable-odk \
             --with-lang="ar de es fi fr it nb nl pl zh-CN zh-TW" \
             --disable-vba \
             --disable-mozilla \
             --with-system-python \
             --with-system-libxml \
             --enable-cups \
             --disable-fontconfig \
             --disable-gnome-vfs \
             --with-use-shell=bash \
             --with-java=no \
             --with-OOo4Kids \
             --disable-gtk \
             --enable-presenter-extra-ui

... and so on !

The bootstrap (compilation of dmake)

Just type the following command in /path/to/DEV300_m47

./bootstrap

Source the compilation environment

Use the following command under linux Intel:

source LinuxX86Env.Set.sh

Use the following command under linux PowerPC:

source LinuxPPCEnv.Set.sh

Check if all is ok with:

set | grep OOo4Kids 

You should have:

OOo4Kids=YES

build

cd instsetoo_native

If your machine is 1GHz / 1GB or RAM :

build --all -P3 # and go buy coffee, beer .. and come back ~ 10 hours later

And if you are the lucky owner of an i7 920 + 6GB of RAM + SSH hard disk ;-) prefer :

build --all -P6 -- -P6 -- -P6 -- -P6 #(for me, the build took 50 minutes with cold ccache, 28 minutes with hot ccache, both for 8 locales)


Now you know, and it is up to you to imagine the right value if your machine is between both machines above ;-)

Build and install on Puppy Linux

Install ccache (optionnal, but extremely usefull)

Download it there :

http://linux.softpedia.com/get/Programming/Compilers/ccache-10054.shtml

decompress it, cd ccache-2.4

./configure && make && make install

+ add in your ~/.bashrc :

CC="ccache gcc"

CXX="ccache g++"

export CC CXX

=> and at every new terminal you'll open, CC will contain ccache gcc and CXX will contain ccache g++


The installation is the same as the other, excepted that you'll have to manually install the tools below.

Missing (from devx_412.sfs image disk): Archive:zip , gperf, gconf, Linux pam

To install Archive zip

  • Open a terminal
  • Create a new dir :

mkdir devel

  • Change for the new dir

cd devel

If you are behind a firewall set FTP_PASSIVE to 1.

$ export FTP_PASSIVE="1"

To start the CPAN module, type :

$ perl -MCPAN -e shell

Then, in the prompt, type :

> Install Archive::Zip

=> answer to all questions (default values are ok) => build the Perl module => install ( don't forget make install)

To install libpam

FIXME

ftp://ftp.kernel.org/pub/linux/libs/pam/pre/library/

  • decompress Linux-PAM-0.99.9.0.tar.gz (up to date today)

configure, make , make install


To install gperf

  • download gperf gperf-3.0.4.tar.gz ( january 2010 )

URL : http://www.gnu.org/software/gperf/#TOCdownloading

  • decompress the archive

cd gperf-3.0.4 ./configure make make install

To install gconf

install GConf-2.25 or inferior. The reason is simple :

gconf is only used at configure time, and recent GConf need glib-2.16 while glib on the dev system is 2.14 only. So use more recent GConf will never work, unless you manually define the GHashTableIter iter (introduced and defined in glib-2.16 ).


URL : http://ftp.gnome.org/pub/gnome/sources/GConf/2.25/GConf-2.25.2.tar.gz


http://www.linuxfromscratch.org/blfs/view/svn/gnome/GConf.html

..but :

There are some missing dependencies (yes, it sucks)


checking for DEPENDENT... configure: error: Package requirements (glib-2.0 > 2.14.0 gmodule-2.0 >= 2.7.0 gobject-2.0 >= 2.7.0 ORBit-2.0 >= 2.4.0 dbus-1 >= 1.0.0 dbus-glib-1 >= 0.74) were not met:


  • No package 'ORBit-2.0' found
  • No package 'dbus-1' found
  • No package 'dbus-glib-1' found


=> everything is mandatory, so better install it  :-/

Orbit-2.0 installation

In fact, after the configure Orbit-2.0 seems to be ok (means most of Orbit-2.0 dependencies are satisfied by default in the devx_421.sfs )

To download Orbit-2.0 : http://www.linuxfromscratch.org/blfs/view/svn/gnome/ORBit2.html


To install Orbit-2.0 :

./configure --prefix=/usr && make && make install

dbus-1 installation

Follow the instructions below : http://www.linuxfromscratch.org/blfs/view/cvs/general/dbus.html

Download : http://dbus.freedesktop.org/releases/dbus/dbus-1.2.16.tar.gz

create dbus directory cp dbus-1.2.16.tar.gz into dbus cd bdus tar zxvf dbis-1.2.16.tar.gz cd dbus-1.2.16

./configure --prefix=/usr && make && make install

dbus-glib-1 installation

Get it: http://dbus.freedesktop.org/releases/dbus-glib/

Compile and install it:

./configure --prefix=/usr && make && make install


Uff !! .... Now we can install GConf :

cd GConf-2.25.2 ./configure --prefix=/usr --without-openldap && make && make install

NOTE : openldap sucks too ...

Checkout the sources

mkdir devel

cd devel


svn co -r844 svn://svn.adullact.net/svnroot/ooo4kids1/trunk OOo4Kids1.0

=> will create OOo4Kids1.0 containing all the sources, ready for configure.

configure

...and the configure command line is : (typed from inside OOo4Kids )

 ./configure --disable-binfilter \
             --disable-odk \
             --with-lang="de es en-US fr it nl pl zh-CN" \
             --disable-vba \
             --disable-mozilla \
             --with-system-python \
             --with-system-libxml \
             --enable-cups \
             --disable-fontconfig \
             --disable-gnome-vfs \
             --with-use-shell=bash \
             --with-java=no \
             --with-OOo4Kids \
             --with-package-format=installed \
             --disable-gtk \
             --enable-presenter-extra-ui

build

./bootstrap # will build dmake (only once)

cd instsetoo_native

build --all -P3 # and go buy coffee, beer .. and come back ~ 10 hours later

Install OOo4Kids

Test the result

No that the compilation is finish, you would probably want to try launch your OOo4kids :)

For the record, to install OOo4Kids, you must download the right archives contained in a .tar.gz, that you mus decompress in a dedicated folder. Further information below.


Install on Debian or Ubuntu

.deb is the archive extension name on those distributions.


highly experimental, only for developers

  • To install all the .deb :
    • put all the .deb in one directory (decompress the archive containing all the .debs)
    • copy the OOo4Kids-debian-menus_1.0-10_all.deb present in the desktop-integration directory, in the current doirectory :
cp desktop-integration/OOo4Kids-debian-menus_1.0-10_all.deb .

( dont forget the final dot !! )

  • enter (as root) the command:
dpkg -i *.deb

(will install everything smoothly)

  • To uninstall everything :
    • Enter the following command (as root):
apt-get --purge remove ooo4kids1.0-core01
    • ... same for the menus :
apt-get --purge remove OOo4Kids-debian-menus

Thanks to itais  ;-)

Install on Mandriva

.rpm is the archive extension name on those distributions.


Tested with:

  • Mandriva GLinux 2009.1 (mipsel architecture)
  • Mandriva one 2010 32 bits
  • Mandriva one 2010.1 beta 2 32 bits
  • Please list the Mandriva releases on which the following instructions did the work

To install:

  • Download the archive containing the RPM packages
  • Open a terminal and run the following commands from the directory where the archive was saved:
tar xvzf OOo4Kids*.tar.gz
cd fr/RPMS
cp desktop-integration/OOo4Kids0.9-mandriva-menus-0.9-07.noarch.rpm ./
  • Finally, as root, still from the fr/RPMS directory:
urpmi *.rpm

To uninstall (as root):

urpme OOo4Kids0.9-core01
urpme OOo4Kids0.9-mandriva-menus

(the menu integration package does not depend on the core installation)

Install on Fedora /Red Hat

To install:

  • Download the archive containing the RPM packages
  • Open a terminal and run the following commands from the directory where the archive was saved:
tar xvzf OOo4Kids*.tar.gz
cd fr/RPMS
cp desktop-integration/OOo4Kids0.9.5-redhat-menus-0.9-07.noarch.rpm ./
  • Finally, as root, still from the fr/RPMS directory:
rpm -ivh *.rpm

To uninstall (as root):

rpm -e OOo4Kids0.9.5-core01
rpm -e OOo4Kids0.9.5-redhat-menus

(the menu integration package does not depend on the core installation)

Personal tools