Wednesday, 30 May 2007

Building Evolution 2.10

To give a detailed account of the problems I've had building Evolution 2.10 would take me days. Instead I'm going to post an annotated list of the steps I've taken. I have now managed to successfully build and run Evolution 2.10, but it has been something of a vanity project: I did it so that I could learn to do it. With Fedora 7 due out in a couple of days - with hopefully an updated version of Evolution that will work with Exchange - there was probably no actual necessity for me to do this. Still, I did learn a lot.

To build Evolution, we first need to build the modules Evolution depends on. The Evolution website tells us these are libsoup, gtkhtml and evolution-exchange. The recommended way to download the source files is via svn - the Subversion version control system. So in a terminal window we start out here:

svn checkout http://svn.gnome.org/svn/libsoup/tags/LIBSOUP_2_2_98 libsoup
cd libsoup
sh autogen.sh
no gnome-autogen.sh in
You need to install gnome-common from the GNOME CVS

We're in trouble straight away. So install gnome-common:
su
yum install gnome-common
exit

Try again:
sh autogen.sh
make
su
make install
exit

Download and build
gtkhtml:
cd ..
svn checkout http://svn.gnome.org/svn/gtkhtml/branches/gnome-2-18 gtkhtml
cd gtkhtml
sh autogen.sh
***Error***: You must have intltool >= 0.25 installed

Trouble again. Install intltool:
su
yum install intltool
exit

Try to build gtkhtml again:
sh autogen.sh
checking for intltool >= 0.35.5... 0.35.0 found
configure: error: Your intltool is too old. You need intltool 0.35.5 or later.

Oops! yum has installed an old version. So we need to remove it...
su
yum remove intltool
exit

Download and build the latest version of intltool:
cd ..
svn checkout http://svn.gnome.org/svn/intltool/trunk intltool
cd intltool
sh autogen.sh
make
su
make install
exit

Back to gtkhtml:
cd ../gtkhtml
sh autogen.sh

***Error***: some autoconf macros required to build gtkhtml
were not found in your aclocal path, or some forbidden
macros were found. Perhaps you need to adjust your
ACLOCAL_FLAGS?

Groan... To fix this I added the
ACLOCAL_FLAGS environment variable to my .bashrc file and set it to the aclocal directory which was installed by gnome-common. .bashrc is hidden in your home directory and sets variables for your bash terminal.

export ACLOCAL_FLAGS="-I /usr/local/share/aclocal"

Restart the terminal window and try to build gtkhtml again:
cd ../gtkhtml
sh autogen.sh
make
su
make install
exit

Now for Evolution itself. We don't want the new version of Evolution to clash with version 2.8 which is installed by Fedora. To do this we specify a new installation directory by using the --prefix configure parameter. We can pass this to configure via autogen.sh:


svn checkout http://svn.gnome.org/svn/evolution/branches/gnome-2-18 evolution
cd evolution
sh autogen.sh --prefix=/opt/evolution

But we get errors:
./configure: line 1354: GNOME_DOC_INIT: command not found
./configure: line 1359: syntax error near unexpected token `evolution,'
./configure: line 1359: `AM_INIT_AUTOMAKE(evolution, 2.10.2)'

To fix this, we update the
PKG_CONFIG_PATH environment varaible. We can do this in .bashrc again. gnome-common also created the /usr/local/lib/pkgconfig directory.

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Go again:
cd evolution
sh autogen.sh --prefix=/opt/evolution

checking for CAMEL_GROUPWISE... configure: error: Package requirements (camel-provider-1.2 libedataserver-1.2 >= 1.9.4 libegroupwise-1.2 >= 1.9.4) were not met:

Requested 'libedataserver-1.2 >= 1.9.4' but version of libedataserver is 1.8.3
Requested 'libegroupwise-1.2 >= 1.9.4' but version of libegroupwise is 1.8.3

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CAMEL_GROUPWISE_CFLAGS
and CAMEL_GROUPWISE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

This is seriously bad news. These libraries are installed by
evolution-data-server. The Evolution webpage didn't mention having to build evolution-data-server but it looks like we have no choice:

cd ..
svn checkout http://svn.gnome.org/svn/evolution-data-server/branches/gnome-2-18 evolution-data-server
cd evolution-data-server
sh autogen.sh --prefix=/opt/evolution-data-server
make
su
make install
exit

Amazingly it built! Update the PKG_CONFIG_PATH with the new libraries:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/evolution/lib/pkgconfig

Try Evolution again:
cd evolution
sh autogen.sh --prefix=/opt/evolution

checking for CAMEL_EXCHANGE... configure: error: Package requirements (libbonoboui-2.0 >= 2.4.2 libglade-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 gthread-2.0 gconf-2.0 camel-provider-1.2 libebook-1.2 >= 1.9.4 libedataserverui-1.2 libexchange-storage-1.2 >= 1.9.4 libecal-1.2) were not met:

Requested 'libexchange-storage-1.2 >= 1.9.4' but version of libexchange is 1.8.3

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

WHAT??! After a lot of messing around I noticed that the development packages for the installed versions of Evolution and evolution-data-server were also installed on the system. I removed these using the Package Manager (Add/Remove Software) and tried again.

cd evolution
sh autogen.sh --prefix=/opt/evolution
make
su
make install
exit

Success! All we need to do is add our path
/opt/evolution/lib/bonobo/servers to the /etc/bonobo-activation/bonobo-activation-config.xml configuration file (see here) and we're ready to run Evolution 2.10.

/opt/evolution/bin/evolution-2.10

Evolution even keeps your old settings.



Looking through this post, everything seems logical and straight-forward. In truth, it has taken me over a week to get to this point. It has been incredably frustrating. I have spent hours experimenting and googling. I've not found any clear instructions.

You may have noticed that despite building Evolution, I have not build evolution-exchange to allow me to connect Evolution to Exchange. This was the reason for building the updated version of Exchange in the first place. The reason I haven't built Evolution-Exchange is because I still don't know how to fix this error:

Download and attempt to build:
svn checkout http://svn.gnome.org/svn/evolution-exchange/branches/gnome-2-18 evolution-exchange
sh autogen.sh

checking for LIBEXCHANGE... configure: error: Package requirements (libsoup-2.2 evolution-shell-2.10 libedataserverui-1.2 libexchange-storage-1.2 libbonobo-2.0 libxml-2.0 gconf-2.0) were not met:

No package 'libexchange-storage-1.2' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBEXCHANGE_CFLAGS
and LIBEXCHANGE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

But, as far as I can tell,
libexchange-storage-1.2 is created by evolution-data-server...

No comments: