Building the latest version of Anjuta is quite difficult at the moment mainly if your distro hasn't switched to Gtk 3.0 yet. Here is some, I hope, useful advices. First, check if your are able to install it using pre-build GNOME 3 dependencies as described at anjuta site. If not, you can use JHBuild as described below.
One of the easiest solutions is to use JHBuild. JHBuild is a powerful tool to build the GNOME stack. As all major distributions currently don't ship the new GNOME 3.x libraries it is very difficult to build anjuta manually and jhbuild can be a great help.
JHBuild is included in the major distributions so please install with
(Ubuntu) $ apt-get install jhbuild
(Fedora/OpenSuSE) $ yum install jhbuild
Afterwards create a .jhbuildrc file in your home directory. You should use the file anjuta.jhbuildrc in anjuta project directory as template but be sure to adjust the paths. Details can be found in the JHbuild documentation.
- Build anjuta (whole stack, will rebuild everything)
jhbuild build anjuta
- Build only anjuta module (should only be necessary if you need to run autogen.sh, otherwise you can just build anjuta as you did before)
jhbuild buildone anjuta
- Build some parts of the stack
jhbuild build --start-at=<module to start with> anjuta
- Running anjuta
jhbuild run anjuta
- Starting a shell in JHBuild environment
JHBuild is doing everything automatically: checking dependencies, downloading them and building all this with additional flags if needed. The drawback is that it rebuilds almost everything even if it is not necessary. You can compile yourself only the needed packages.
pkg-config is used by almost all configure script to find the right libraries. It is looking for a file named library_name.pc in /usr/lib/pkgconfig. This is a text file giving the version of the installed library and the needed dependencies. By default all programs and libraries are installed in /usr/local, so .pc files are installed in /usr/local/lib/pkgconfig but this directory is not checked. You need to define the environment variable PKG_CONFIG_PATH to add new directory by example:
The new GSettings system used, in Gtk+3, need to find schemas files which are installed by default in /usr/local/share/glib-2.0/schemas when you install a program from sources. This directory is not checked by default. , so you need to define the environment variable GSETTINGS_SCHEMA_DIR, by example:
Libtool .la file
Most packages use libtool to find the dependencies needed by each library. These dependencies are stored in a file named libray_name.la in the same directory than the library.
The issue is that these files contains the absolute name of each dependency. If your program needs a new version of a library which is itself used by another system library, the linker will try to link with both versions of the library and will probably give an error.
One solution is to erase all .la files, they are not strictly necessary on Linux.
Another solution is to update all the .la files to make sure that all system libraries use the new version of the libraries if available. I have written a perl script here for doing this. You call it with the name of the directory where you have installed all local libraries typically /usr/local/lib, the script will find all libraries, get all dependencies and for all system dependencies it will copy the .la file from /usr/lib to /usr/local/lib and update the file to use the new libraries.