Tuesday, November 29, 2011

Compiling Zeitgeist data sources plugins on Fedora 15...

I'm constantly in search for some way that will help me organize myself. I tend to do many things at once and keeping track of all of them is hard. One of the possibilites I wanted to try for a long time now was Zeitgeist. Basically, Zeitgeist records all your activities and they can be viewed later with gnome-activity-journal application. This system isn't finished yet, for example, it lacks better integration with many applications. Also, better options to manipulate that data are necessary, but all in all, it sounds promising.

In Fedora 15 there are already packages for Zeitgeist as well as for gnome-activity-journal. But the problem is that plugins for Zeitgeist are not packaged. This means that on Fedora Zeitgeist tracks only opened documents, not, e.g., what Web pages you were surfing. So I decided to compile Zeitgeist data sources, and  while doing so I had some problems for which I saw posted questions on how to resolve them, but without any answers. So I decided to document what I had to do in order to get this package to work.


Before configuring and compiling package be certain that you have all appropriate development packages installed. Minimally those are:
  • libzeitgeist-devel
  • xulrunner-devel

Modifying system files

You'll need some editing of system files. I had a problem that pkg-config didn't recognize libxul. If you run the following command:
pkg-config --list-all
and you don't see libxul in the output than probably you have that same problem. It turned out that the problem were MPI files (if you didn't install any MPI libraries/tools you won't have that problem). In all of them pkg-config reported error and stopped further processing with a result that it didn't parse libxul file, and consequently, didn't report it's existence. This, further, confused ZDS configure script into thinking that there is no Firefox 4.0. Next, there is an error in configure script itself leading it to assume that Firefox 3.6 is installed! All wrong.

So, you need to edit the following files: mpich2-c.pc, mpich2-cxx.pc, mpich2-f77.pc, and mpich2-f90.pc. All of them are placed in /usr/lib64/pkgconfig directory. In each file you'll find an if statement:
if test "no" = yes; then
Remove that if statement, and also, remove string -l${plib} in line that starts with Lib:. If it happens that you don't have some of those files, just skip to the next one.

There was also a problem with libxul.pc file itself. In it you'll find the following line:
Version: 2
Which has a problem that pkgconfig doesn't treat that as 2.0 but strictly as 2. So, in ZDS configure script there is a requirement  that libxul is >= 2.0 which, for some strange reason, isn't true. Anyway, change the previos line to read as follows:
Version: 2.0
And that's for system changes.

Obtaining, patching and compiling the source

Grab Zeitgeist data sources (ZDS) tarball from the Launchpad site. I used version Also, unpack the source and enter into the newly created directory. All the directory references that follow are relative to that directory.

The only thing you need to patch is to tell that Firefox extension will work for Firefox versions greater than 4.0. To do that, open file firefox-40-libzg/extension/install.rdf and the line that reads:
change into
Next, you need to configure the source. Before configuration, you have to say to configure script to use additional switch when invoking C++ compiler that will turn on some extensions used in XUL (e.g. char16_t type):
export CXXFLAGS=-std=gnu++0x
Now, run configure, then make, and finally (as root user), make install:
make install
And that should be it!

Note for Fedora 16

After writing this post, I installed Fedora 16. The steps necessary to compile data sources are almost the same. But, there is already gedit-plugin available in Fedora repository. If this is a problem, or not, I don't know yet. In any case, you can disable gedit plugin during configuration process.

One additional thing I had a problem with was the following error message:
emacs: error while loading shared libraries: libotf.so.0: cannot open shared object file: No such file or directory
This error message will occur only if you have Emacs plugin enabled and you don't have libotf installed. This is some weird problem in which one package (I think some MPI package) reports that it provides libotf which makes Emacs' dependency satisfied. But this libotf isn't the one that Emacs expects (and can find for that matter) and thus Emacs can not start. Anyway, just install package libotf and that should be it.

No comments:

About Me

scientist, consultant, security specialist, networking guy, system administrator, philosopher ;)

Blog Archive