Hello,

I have rewritten the Compiling from Evolution from SVN guide.

It's heavily based on the old manual, but I've tried to add more
information and to remove old / deprecated information.

Feel free to edit this and to use it like you want.

Henning Habighorst / liam 
This guide is heavily based on the "Compile Evolution from SVN guide".

I wanted to port this to the new GIT interface and correct or improve some 
things.

Prerequisites

sudo make install magic

Most distributions have already added the necessary steps to use sudo. It's 
common to use the group "wheel" to give users the permission to use sudo.

You can check this in "/etc/sudoers". For editing, visudo is recommended - but 
not necessary. Just be careful! 

"%wheel ALL=(ALL) ALL" - would be the necessary line to give users of the group 
wheel the permission to use sudo with every command.

"usermod -a -G wheel username" for example adds the group wheel to username.

Dependencies...

Evolution < 2.29 : glib2 , gtk+ , libbonobo & libbonoboui , gtkhtml , gconf, 
libglade, libgnomecanvas,
libgnome & libgnomeui, libxml , shared-mime-info, nss & nspr [for ssl]

Evolution-Data-Server <= 2.29 : additionally libsoup , gnome-keyring , sqlite , 
libical 

Evolution >= 2.29 : the same as < 2.29 plus unique, except 
libbonobo/libbonoboui/libgnome/libgnomeui 

Every distribution has it's own packaging system.

Like this, you need to find out for yourself how to install these packages - 
please be aware that in most cases you'll need to install the -dev packages!

Debugging

You'll might wonder why we start with debugging before building. Well, because 
building influences debugging...

There is an simple explanation for this : Usually, you want to have a fast 
software - so the distributions use the compiler to optimize the software while 
building...

This is indeed something good - if you just want to run the software. If you 
want to debug the software it's pretty bad.

Optimizing means that information gets stripped away that's necessary for 
debugging - the devs get a backtrace that contains information which is not 
useful or not human readable.

So we should be careful while building - this is especially an warning to those 
who use source based distributions!

My Shell config file contains the following two entries :

export CFLAGS="-O0 -ggdb"
export CXXFLAGS="${CFLAGS}"

These cflags/cxxflags will tell the compiler to turn off optimization and to 
turn on debugging code.

I would recommend that you'll transfer this in your .bashrc or whatever you use.

Please install the -dbg packages, if your distribution ships them! These are 
required for proper debugging!

If you are using a source based distribution, turn off stripping at least for 
the dependencies! See "!strip" Feature in ArkLinux BuildSystem, Gentoo : 
http://www.gentoo.org/proj/en/qa/backtraces.xml etc!

Before the actual build takes place

Prepare a build-directory

mkdir -p ~/sources/gnome
cd ~/sources/gnome

I guess you are not an developer on gnome, like this we use the anonymous GIT 
access :

The server is "git://git.gnome.org/".

Now it depends on what you want to have :

evolution | evolution-data-server | gtkhtml | libsoup | evolution-mapi | 
evolution-exchange 

The general checkout command is "git clone git://git.gnome.org/MODULE_NAME" 
where MODULE_NAME is one of the above.

evolution-mapi / evolution-exchange are optional!

Please fetch now evolution | evolution-data-server | gtkhtml | libsoup !

A few notes before building :

I build with the usual prefix /usr/local. Therefore everything that's written 
here depends on this prefix.[ as it is the usual prefix, I don't need to set 
--prefix=/usr/local. If you want another prefix, please append the --prefix 
option to autogen.sh! ]

The following might be necessary to run evolution after building or influences 
building too : 
[ replace BASE_VERSION with the version of evolution... ]

export CPUS="-jX" 
        --> defines that make uses X jobs.

export 
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:$PKG_CONFIG_PATH"
        --> tells pkg-config where to look for his configuration files

export 
LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/evolution/BASE_VERSION:$LD_LIBRARY_PATH"
        --> directories in which to search for shared libraries

export 
PATH="/usr/local/bin:/usr/local/libexec:/usr/local/libexec/evolution/BASE_VERSION/$PATH"
        --> sets the PATH variable 

For evolution < 2.29 :

export 
BONOBO_ACTIVATION_PATH="/usr/local/lib/bonobo/servers:$BONOBO_ACTIVATION_PATH"

(or edit /etc/bonobo-activation/bonobo-activation-config.xml [or wherever 
bonobo-activation-config.xml lies] to include 
<item>/usr/local/lib64/bonobo/servers</item> ! [leave the rest like it is!] )

Doing libsoup

pushd libsoup
./autogen.sh
make $CPUS
make install
popd

Doing gtkhtml

pushd gtkhtml
./autogen.sh
make $CPUS
make install
popd

Doing evolution-data-server ( with gnome-keyring support enabled )
( < 2.27.4 : add --enable-nss=yes --enable-smime=yes , > 2.27.4 : add 
--enable-ssl --enable-smime )

pushd evolution-data-server
./autogen.sh --enable-gnome-keyring=yes 
make $CPUS
make install
popd

Doing evolution ( with NNTP / IPV6 / Test-Component enabled / All Plugins 
enabled / SSL & SMIME )
( < 2.27.4 : add --enable-nss=yes --enable-smime=yes , > 2.27.4 : add 
--enable-ssl --enable-smime )

pushd evolution

./autogen.sh --enable-nntp=yes --enable-ipv6=yes --enable-test-component=yes 
--enable-plugins=all
make $CPUS
make install
popd

Optionally: Doing evolution-exchange / evolution-mapi (only for exchange 
support, mapi uses OpenChange while evolution-exchange uses Outlook Web Access )

pushd evolution-exchange
./autogen.sh 
make $CPUS
make install
popd

Optionally: Doing evolution-webcal

pushd evolution-webcal
./autogen.sh
make $CPUS
sudo make install
popd

Optionally: Doing evolution-mapi

samba4 (see http://wiki.samba.org/index.php/Samba4 for further information)

Download and extract the snapshot from http://www.samba.org/samba/ftp/samba4/ !
pushd samba-4.0.0*/source4
./autogen.sh
./configure 
make $CPUS
make install

openchange (see http://www.openchange.org for further information)

Get the latest code from their subversion repository :
svn co https://websvn.openchange.org/openchange/trunk openchange
pushd openchange
./autogen.sh
./configure --with-samba=/usr/local
make $CPUS
sudo make install
popd

evolution-mapi

pushd evolution-mapi/
./autogen.sh 
make $CPUS 
make install
popd

Upgrading

You should already know that you are checking out unstable code... Don't you?
So you should keep it up - if a problem occures and you want to file a bug, 
please upgrade before the packages evolution-data-server / evolution.

There shouldn't be a need to upgrade the other packages [ except you are using 
exchange and therefore need evolution-exchange / exchange-mapi ] like libsoup / 
gtkhtml , but if you need to, it's the same as upgrading evolution / 
evolution-data-server!

And when a major version change happens - don't forget to update your shell 
configuration files! We've set a few pathes that need these versions!

cd ~/sources/gnome/

Upgrading evolution-data-server

Quote of the Compiling Evolution from SVN manual : The desktop-integration 
efforts of the last few years caused that a few applications are also using 
e-d-s. Examples are recent versions of gnomemeeting and the panelapplet Clock. 
Note that if you make your e-d-s unstable, by installing a bleeding edge SVN 
version, you're also making other parts of your desktop unstable. But then 
again, and I repeat myself, thats the way developers like it!

pushd evolution-data-server (see notes above, this is for version > 2.27.4!)
sudo make uninstall
make distclean
git pull
./autogen.sh --enable-ssl --enable-smime --enable-gnome-keyring=yes 
make $CPUS
make install
popd

Upgrade evolution (see notes above, this is for version > 2.27.4!)

pushd evolution
sudo make uninstall
make distclean
git pull
./autogen.sh --enable-ssl --enable-smime --enable-nntp=yes --enable-ipv6=yes 
--enable-test-component=yes --enable-plugins=all
make $CPUS
make install
popd

As you can see it is basically the same as building and installing, just that 
you should uninstall your old version before pulling fresh code ( this prevents 
stale files etc ) and running a make distclean to delete all already built 
files ( prevents build errors etc ) before you actually get the fresh code by 
running git pull.

A few git hints...

Applying patches from Bugzilla is quite easy. Download the patch, apply it with 
patch -p0 < patch .

git diff is your friend in everything that has to do with diffing from HEAD or 
patches :

Few examples : 

git diff --no-prefix --check
        -> check for whitespace ( someone will definitely love you ;) )

git diff --no-prefix > patch
        -> creates a patch
        
git diff file
        -> shows difference from HEAD to file

git log is your friend if you want to know what was recently changed.

See git COMMAND --help for further informations!

Normal operation

If you have done the changes to your shell configuration files, you should be 
able to simply start evolution by running evolution ;)

If there are errors, please check your shell configuration file!

Especially when version < 2.29 is used, BONOBO_ACTIVATION_PATH is definitely 
needed to run fine!

Debugging

In order to debug Evolution or it's components works just as expected. You can 
easily attach a running process with e.g. gdb.

Debugging a running Evolution process
 gdb -p `pidof evolution`

Debugging a running evolution-data-server process

 gdb -p `pidof evolution-data-server`


Create launchers on your panel

Quote from the old manual :"I probably don't have to explain how to do this. 
Nevertheless it's a great idea to force yourself to actually sometimes do a 
debugging session when that fscking Evolution from cvs is crashing and being 
very unstable."

Fire up your favorite editor :
editor ~/Desktop/evolution-debug.desktop

Insert the following text. Then save the file. (Taken from the old manual)
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=gnome-terminal -e evolution
Icon=gnome-spider.png
Terminal=false
Name=Debug evolution
GenericName=Debug evolution
Comment=Debug evolution

gdb :

You have (if you use the launcher) a terminal that you can use like any other 
terminal.

Simply open a new tab when evolution for example freezes, type gdb -p `pidof 
evolution` and then the fun can begin.

See http://projects.gnome.org/evolution/bugs.shtml 

Again I remind you of what I've written before the Building section : Please 
install the dbg packages if your distribution ships them or stop stripping your 
binaries! Build evolution with the CFLAGS I've mentioned! Only then you can 
have a meaningful backtrace!

Making evolution your default E-mail client

gconftool-2 --set --type string /desktop/gnome/url-handlers/mailto/command 
"/opt/gnome2/bin/evolution %s"

_______________________________________________
Evolution-list mailing list
Evolution-list@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-list

Reply via email to