Results 1 to 10 of 10

Thread: Having trouble updating glib2 and gtk+2

  1. #1
    Senior Member Shatter's Avatar
    Join Date
    Jan 2010
    Posts
    192

    Default Having trouble updating glib2 and gtk+2

    I've been trying to update a program in BT3b (TrueCrypt 5.1a) and as part of compiling requirements, I must have up-to-date gtk+ 2. So I went installing the latest package from source and figured I also need glib-2. The problem is that gtk+ 2 always fails to detect the new glib. I've installed glib-2 with the usual commands "configure, make, make install". The GLib-2.16.3 installed fine, but gtk+ refuses to recognise the new installation of glib.

    gtk+-2.12.10 configure script returns this error:
    checking for GLIB - version >= 2.13.5...
    *** 'pkg-config --modversion glib-2.0' returned 2.16.3, but GLIB (2.12.12)
    *** 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/ld.so.conf. Make sure you have run ldconfig if that is
    *** required on your system.
    *** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
    *** to point to the correct configuration files
    no
    I'm not too keen to poke around with system libs on my own as I don't want to break something. Could I get some help/hints for this one?

    Thanks.

  2. #2
    Senior Member streaker69's Avatar
    Join Date
    Jan 2010
    Location
    Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
    Posts
    3,535

    Default

    You need to find where your glib-2.0.pc file is located and in then add

    PKG_CONFIG_PATH=<path to file> to the end of your ./configure statement.

    for example, one that I just a couple minutes ago calling for the exact same thing my configure statement looks like this:

    ./configure --sbindir=/sbin --datarootdir=/usr/share --sysconfdir=/etc --enable-spoof-source PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --enable-dynamic-linking

    Do not copy that exactly as that was designed for a different program I'm compiling, but you can see where you need to add the path.
    A third party security audit is the IT equivalent of a colonoscopy. It's long, intrusive, very uncomfortable, and when it's done, you'll have seen things you really didn't want to see, and you'll never forget that you've had one.

  3. #3
    Senior Member Shatter's Avatar
    Join Date
    Jan 2010
    Posts
    192

    Default

    'whereis pkgconfig' returns 3 paths: /usr/lib/pkgconfig, /usr/local/lib/pkgconfig, /usr/share/pkgconfig
    configure with PKG_CONFIG_PATH=/usr/local/lib/pkgconfig returns the same error about glib, using the other two paths returns an error saying that no glib-2.0 was found.

  4. #4
    Senior Member streaker69's Avatar
    Join Date
    Jan 2010
    Location
    Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
    Posts
    3,535

    Default

    Quote Originally Posted by xCPPx View Post
    'whereis pkgconfig' returns 3 paths: /usr/lib/pkgconfig, /usr/local/lib/pkgconfig, /usr/share/pkgconfig
    configure with PKG_CONFIG_PATH=/usr/share/pkgconfig returns the same error about glib, using the other two paths returns an error saying that no glib-2.0 was found.
    locate glib-2.0.pc

    where ever you find that file, copy it into /usr/share/pkgconfig

    If you don't have locate then try

    find / | grep glib | grep pc <-- that one will take a while
    A third party security audit is the IT equivalent of a colonoscopy. It's long, intrusive, very uncomfortable, and when it's done, you'll have seen things you really didn't want to see, and you'll never forget that you've had one.

  5. #5
    Senior Member Shatter's Avatar
    Join Date
    Jan 2010
    Posts
    192

    Default

    And then?

    I forgot to mention that I already knew glib-2.0.pc was in /usr/local/lib/pkgconfig. Copied it to /usr/share/pkgconfig. At the moment gtk+ doesn't configure, same error as I posted above.

    EDIT: I just noticed you quoted my old reply before I modified it.
    I mistyped the location of PKG_CONFIG_PATH. I originally typed "/usr/share/pkgconfig", but the correct one is "/usr/local/lib/pkgconfig". Configuring gtk+ with PKG_CONFIG_PATH=/usr/local/lib/pkgconfig where glib-2.0.pc resides gives the error I posted in the first post. Sorry for causing the confusion.

  6. #6
    Senior Member streaker69's Avatar
    Join Date
    Jan 2010
    Location
    Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
    Posts
    3,535

    Default

    It looks like you have the old version of GLIB installed. Download the newest version, compile it and see if that fixes your problem.
    A third party security audit is the IT equivalent of a colonoscopy. It's long, intrusive, very uncomfortable, and when it's done, you'll have seen things you really didn't want to see, and you'll never forget that you've had one.

  7. #7
    Senior Member Shatter's Avatar
    Join Date
    Jan 2010
    Posts
    192

    Default

    Quote Originally Posted by streaker69 View Post
    It looks like you have the old version of GLIB installed. Download the newest version, compile it and see if that fixes your problem.
    I'm not sure I understand your suggestion. GLib-2.16.3 *is* the latest stable version according to gtk.org. You can see that I installed it from my first post:
    Quote Originally Posted by xCPPx
    I've installed glib-2 with the usual commands "configure, make, make install". The GLib-2.16.3 installed fine, but gtk+ refuses to recognise the new installation of glib.
    EDIT: Okay, I tried to configure gtk+ with 'configure LD_LIBRARY_PATH=/usr/local/lib' and it worked fine, but make errored out like this:
    grep: /usr/lib/libgobject-2.0.la: No such file or directory
    /usr/bin/sed: can't read /usr/lib/libgobject-2.0.la: No such file or directory
    libtool: link: `/usr/lib/libgobject-2.0.la' is not a valid libtool archive
    make[4]: *** [libgtk-x11-2.0.la] Error 1
    make[4]: Leaving directory `/root/prog/gtk+/gtk+-2.12.10/gtk'
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory `/root/prog/gtk+/gtk+-2.12.10/gtk'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/root/prog/gtk+/gtk+-2.12.10/gtk'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/prog/gtk+/gtk+-2.12.10'
    make: *** [all] Error 2
    Seems like some files are missing in /usr/lib. The files seem to be located in /usr/local/lib.

  8. #8
    Senior Member streaker69's Avatar
    Join Date
    Jan 2010
    Location
    Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
    Posts
    3,535

    Default

    Seems like some files are missing in /usr/lib. The files seem to be located in /usr/local/lib.
    If you have some files in one location and some in another location, obviously when you're compiling you can't point to both locations, but you can make it seem as though the files are in both locations when they're really not.

    You can make a symbolic link between /usr/lib and /usr/local/lib. That way no matter what you're installing it can find the files it needs.
    A third party security audit is the IT equivalent of a colonoscopy. It's long, intrusive, very uncomfortable, and when it's done, you'll have seen things you really didn't want to see, and you'll never forget that you've had one.

  9. #9
    Senior Member Shatter's Avatar
    Join Date
    Jan 2010
    Posts
    192

    Default

    OMG That actually made it to compile. Prior to your reply, I copied the missing files from /usr/local/lib to /usr/lib and make got past the problem above, but errored out a few lines below with some error regarding undefined procedures in a number of .c files. Now I deleted the previously copied files and made a few symbolic links instead. And whatda ya know? Gtk+ compiled!

    I'll try to compile TrueCrypt 5.1a now and see if I get any errors...
    EDIT: Compiles fine! Thanks for helping me out.

  10. #10
    Senior Member streaker69's Avatar
    Join Date
    Jan 2010
    Location
    Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
    Posts
    3,535

    Default

    Quote Originally Posted by xCPPx View Post
    OMG That actually made it to compile. Prior to your reply, I copied the missing files from /usr/local/lib to /usr/lib and make got past the problem above, but errored out a few lines below with some error regarding undefined procedures in a number of .c files. Now I deleted the previously copied files and made a few symbolic links instead. And whatda ya know? Gtk+ compiled!

    I'll try to compile TrueCrypt 5.1a now and see if I get any errors...
    EDIT: Compiles fine! Thanks for helping me out.
    You should have seen what I went through with compiling from source over the past week, it was much worse than this.

    Glad you got it to work.
    A third party security audit is the IT equivalent of a colonoscopy. It's long, intrusive, very uncomfortable, and when it's done, you'll have seen things you really didn't want to see, and you'll never forget that you've had one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •