GTk/Glib 2.2 Install Problem

I'm a bit new to Linux, and am having a problem installing GTK+2.2 (have tried the latest 2.4 several times which has resulted in a OS reinstall ).

I have downloaded the following source packages:

I first built pkg-config with no problems. I then built glib as directed (./configure, make and make install) and set the environment variable PKG_CONFIG_PATH.

I can then execute pkg-config --cflags --libs glib-2.0 and get the output

-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -L/usr/local/lib -lglib-2.0

I then try and install atk but this fails at the configure stage. It reports

  checking for GLIB - version >= 2.0.0...
  *** 'pkg-config --modversion glib-2.0' returned 2.2.3, but GLIB (2.0.6)
  *** was found! If pkg-config was correct, then it is best
  *** to remove the old version of GLib. You may also be able to fix
  the error
  *** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
  *** /etc/ Make sure you have run ldconfig if that is
  *** required on your system.
  *** If pkg-config was wrong, set the environment variable
  *** to point to the correct configuration files

It would seem that the test application in the configure script is linking against the wrong version of GLIB.

I built and ran the following test program (cut down version of whats in configure)

  #include <glib.h>
  #include <stdio.h>
  #include <stdlib.h>

  main ()
          printf("%d.%d.%d\n", glib_major_version, glib_minor_version,
    return 1;

and used ldd with the following output

  ldd test1
 => /usr/lib/ (0x40021000)
 => /usr/lib/ (0x4008c000)
 => /lib/ (0x4013e000)
 => /lib/ (0x4015f000)
 => /lib/ (0x40167000)
          /lib/ => /lib/ (0x40000000)

which is the old library (I checked the file date and time). WHy is it linking against the old library in /usr/lib rather than /usr/local/lib ? How do I remove the old version of the library ? I tried removing them temporarliy, the source compiled and linked but failed to run correctly as it couldn't find the library. Does this mean that the program always built against the right libraries but loaded the wrong ones at execution - am I misising an environment variable for searching for libraries?

Have also tried running ldconfig -n /usr/local/lib and have alseo tried editing /etc/ with no difference?

Any help would be appreciated.


jason healy optusnet com au

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]