Education ClassRoom/Practice

From Apache OpenOffice Wiki
Jump to: navigation, search


Since we use subversion, some parts are obsolete, and need to be updated

Objective : create exercices, to practice tools used for development

TODO : define a list of items

Join the Project

Login and accounts

Find a page or a document

  • Find the web page for your own locale in project ( e.g. )
  • Find the Coding Guidelines on the Wiki ( and read it ... )
  • Find the page about cws ( Child Workspace )
  • Find mailing list archive
  • Subscribe to mailing list if you didn't yet
  • Extract mails 10 to 14 from any mailing list

Bonsai use

  • Discover Bonsai
  • Visualize changes in a cws

1) Go to

We'll try to do a request :)

2) Don't modify Module (must be All files in the repository ) Remark : note the name "repository "

3) In the Field "Branch" replace HEAD with cws_dev300_aquavcl07

4) in the field "Date" check "Since the beginning of time "

5) do not modify the other fields

6) Click "Run Query"

=> all the changes in the code, based on DEV300_m9 ( we'll explain later) are on the page !!

7) To see the diff for any commit, click in the Rev. columns. Back to retrieve the current page.

Strongly advised : 8) Look carefully at other changes, what information you can obtain here.

Remark: Bonsai helps when you are searching for changes in the code, author date .. precise information about CODE

LXR use

[Complete me]

Checkout the code


- we suppose you have some bash knowledge, and some programming skills

- your .cvsrc file is ok (else ask on )

Now, open a terminal, use bash, and do :

0 ) create the environment

If you don't have a proxy, do , (in a terminal) :

export CVSROOT=""

There is a proxy, and nothing works using the line above, do, (in a terminal) :

Let the proxy be ( name ) , and the open port 1234, then just do :

export CVSROOT=":pserver;proxy=;"

And if you ignore the IP address of the gateway, but you know its name, do, (in a terminal) :

export CVSROOT=":pserver;;"

IMPORTANT : is just a fake name, as example. Please replace it with the one in your network :)

... it should work now (else, contact your sys admin).

For the next step, create TMP dir (command: mkdir TMP )

cd TMP

1) checkout vcl module from DEV300_m31

cvs co -r DEV300_m31 dtrans

Question: what happens ?

Download all tree :

mkdir DEV300_m31

cd DEV300_m31

cvs -4 co -r DEV300_m31 OpenOffice2

( -z4 is optional )

-> once done ( can be very long), and if no error occurs, you got all source code from DEV300_m31 Milestone !!

Create a patch

2) Modify one file, do "cvs up" , and comment on the result

3) using grep , retrieve the name of the milestone in the sources

4) checkout vcl from a cws under development

cvs -z4 co -r cws_dev300_aquavcl07 vcl

5) retrieve the cwsname in the sources

6) analyse the list of the subdirectories vcl contains

7) modify the code in vcl/source/gdi/sallayout.cxx

(write whatever you want, respecting C++ syntax prefered ;)

8) create a diff with the repository

change directory outside of vcl

in the current dir ( TMP ) , do :

cvs diff -u vcl > my_pretty_patch.diff

9) What does contain the patch ?

Apply and Reverse a patch

  • Simulate a patch application
  • Apply it for true

10) How reverse your changes ?

11) Be sure you have enough place on your hard disk ( count 2GB )

Fix a build breaker (most common breakages )

A) Building

Note: add your own experience here !

Building on Ubunutu 7.10

Ubuntu version : 7.10 - Gutsy Gibbon

Estimated time for the cnofiguration: 1h30

1) Download source code

install subversion : sudo apt-get install subversion

Command line for the download : svn checkout svn://

2) Java

Prefer the Sun JDK

Version of the installed Java (mini 1.5.0 ) Command line to check : java -version

In config_office tcsh was not found

Solution it to use the following option : --with-use-shell=bash

Archive::Zip is missing :

checking for required Perl modules... Can't locate Archive/ in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at -e line 1. BEGIN failed--compilation aborted at -e line 1. configure: error: Failed to find some modules

Solution :

apt-cache search archive | grep perl


libarchive-zip-perl - Module for manipulation of ZIP archives

Solution sudo apt-get install libarchive-zip-perl

Cups : checking for cups/cups.h... no configure: error: cups/cups.h could not be found. libcupsys2-dev or cups???-dev

Solution: sudo apt-get install libcupsys2-dev

pam :

checking for security/pam_appl.h... no configure: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?

Solution: sudo apt-get install libpam0g-dev

javac: checking for javac... no configure: error: javac not found set with_jdk_home


Install Sun Java 1.5.0 from the URL below:

JDK2 installed in /usr/local, means the following option is mandatory :


Gperf: checking for gperf... no configure: error: gperf not found but needed. Install it.

Solution: sudo apt-get install gperf


checking whether to build the ODK... yes

checking for external/unowinreg/unowinreg.dll... configure: WARNING: not found, will be cross-built using mingw32

Looking at external/unowinreg, the readme invites to download unowinreg.dll at

cd ../DEV300_m39/external/unowinreg/



gtk+ stuff :

checking whether freetype is available... checking for pkg-config... /usr/bin/pkg-config checking for freetype2 >= 2.0 ... Package freetype2 was not found in the pkg-config search path

Solution : install all the gtk+ stuff (first is freetype )

sudo apt-get install libfreetype6-dev

Mozilla :

checking for mozilla-source-1.7.5.tar.gz... not found checking for mozilla-source-1.7.5.tar.bz2... not found configure: error: Mozilla source archive not found. Please copy mozilla-source-1.7.5.tar.bz2 or mozilla-source-1.7.5.tar.gz to moz/download/. The archives can be found here:

use prebuilt-archives downloadable from

For Linux:


checking X11/Xaw/Label.h usability... no checking X11/Xaw/Label.h presence... no checking for X11/Xaw/Label.h... no configure: error: Xaw include headers not found

Solution :

sudo apt-get install libxaw6-dev


checking fontconfig/fontconfig.h usability... no checking fontconfig/fontconfig.h presence... no checking for fontconfig/fontconfig.h... no configure: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?

Solution: sudo apt-get install libfontconfig1-dev


checking for X11/extensions/Xrandr.h... no configure: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?

Solution: sudo apt-get install libxrandr-dev


checking for bison... no configure: error: no bison found in $PATH, install bison

Solution: sudo apt-get install bison

Flex: checking for flex... no configure: error: no flex found in $PATH, install flex

Solution: sudo apt-get install flex


checking whether to enable GConf support... yes checking for gconf-2.0 ... Package gconf-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gconf-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gconf-2.0' found configure: error: Library requirements (gconf-2.0 ) not met; consider adjusti

Solution: sudo apt-get install libgconf2-dev


checking for gnome-vfs-2.0 >= 2.6.0 ... Package gnome-vfs-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gnome-vfs-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gnome-vfs-2.0' found configure: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; cons

Solution: sudo apt-get install libgnome-vfs-dev

WARNING: not available -> use the --disable-gnome-vfs option solved the issue

libgtk+-2.0 missing:

Solution: sudo apt-get install libgtk2.0-dev

Ant missing:

checking for ant.cmd... no configure: error: Ant not found - Make sure it's in the path or use --with-ant-home

Solution Download apache-ant from (e.g.) :

Install the decompressed archive in /usr/local

use : --with-ant-home=/usr/local/apache-ant-1.7.1

Install ccache :

sudo apt-get install ccache

edit the ~/.bashrc and add the lines :

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

save, close and open a new term => ccache will be detected at the next configure

Final configure command line ( experimental, will be completed) :


And configure is successfull :-)

Bootstrap :


./bootstrap # builds dmake

either :


or :

cd instsetoo_native

build --all -P4

Starts the build

See you tomorrow :)

Missing modules

e.g. missing alias in DEV300_m13 : hyphen module is not checked, causing missing headers, never delivered and then, a breakage in lingucomponent because of undefined functions/methods and so on

Solution: check out hyphen

export CVSROOT=""

Note: there is another solution for experimented devs, using tunnel

cvs co -r DEV300_m13 hyphen

Missing Files
Missing headers
(deprecated) gcc parser issues

B) Hacking

Syntax Errors
Missing headers
Multi inclusions
Linking issues
Personal tools