LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-24-2006, 06:41 AM   #1
pbhj
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Rep: Reputation: 32
glib-2 versus glib2 ... the same?


I've been doing some upgrading and this is really bugging me. I know I've suffered with this in the past ...

Are glib2 and glib-2 the same library packages?

With slackware I generally use swaret to upgrade my packages but will roll my own (and use checkinstall) if I can't find what I need.

However I always seem to get a conflict around these libraries.

I'm compiling the dev veresion of Screem-0.17.1 at the mo' and get this

checking for GLIB - version >= 2.5.6...
*** 'pkg-config --modversion glib-2.0' returned 2.9.0, but GLIB (2.8.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/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
configure: error:
*** GLIB 2.5.6 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/.


What gives ... I have glib-2.9 installed but can't find any 2.8.6 anywhere and I've tried removing .pc files and removing lines from ld.so.conf.
 
Old 04-24-2006, 02:18 PM   #2
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Did you compile (and make a package) glib v2 yourself? You should have glib-1.2.10 and glib2-2.x.x installed. I've acidentally done this when making packages myself. Forgot to have the v2 package name as "glib2" and it overwrote my glib v1 package.

ls /var/log/packages/glib*

What does that give you? The configure error is stating that you have a little bit of both 2.9.0 and 2.8.6 installed. I can tell that you rolled your own and screwed up somewhere. That or you didn't 'upgradepkg'...

Last edited by jong357; 04-24-2006 at 02:20 PM.
 
Old 04-24-2006, 03:06 PM   #3
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by pbhj
Are glib2 and glib-2 the same library packages?
Yep, but your build errors are due to you having a mis-match glib installation.

You will need to find ALL the places where glib2 is installed. The easiest way to do this is using this command:

$ find / -name glib-2.0.pc

Record the locations of all occurrences of that file and then you'll need to determine which one you want to keep and we can get your system setup to use that version.

Peace...
 
Old 04-24-2006, 06:47 PM   #4
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
This stuff is compiled on the disks with: ./configure --prefix=/usr

By default, the prefix is /usr/local when running just ./configure

So, basically you've got (at least) two installs and pkgconfig (a program to trace deps through) is getting confused.

I suggest always building apps that replace Slack defaults with --prefix=/usr and checkinstalling them (unless it's toolchain stuff, then, just don't mess with it!), and actually, so long as you checkinstall them there's no reason why you can't build everything with --prefix=/usr

Now you can follow tomdkat's instructions to locate your multiple installations and choose one to remove. Or, removepkg the bugger and try again.

Good luck,
- Piete.
 
Old 04-24-2006, 07:47 PM   #5
pbhj
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Original Poster
Rep: Reputation: 32
Thanks all for the assistance ... it's sorted now. There was a general question though ... it does seem that on the net there are glib-2 and glib2-2 packages are these different?

Anyway ...

I used removepkg on packages that were found via
Code:
ls /var/log/packages | grep glib
(but not all of them!)

I used
Code:
rm -i `locate glib | grep .pc`
to remove the pkg-config files

I also did some heavy pruning with
Code:
rm -rf
I was tentative as I know (I think) that glib is quite central to things and didn't want to mess up the system. But it all went fine and I then installed the latest glib2-2 from a slackware mirror instead of glib-2.9.0 that I made!!
 
Old 04-24-2006, 08:10 PM   #6
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by pbhj
Thanks all for the assistance ... it's sorted now. There was a general question though ... it does seem that on the net there are glib-2 and glib2-2 packages are these different?
The official name of the library is glib-2.0. "glib2-2" sounds like the name given by a particular Linux distro.

Glad you got it all worked out.

Peace...
 
Old 04-24-2006, 08:21 PM   #7
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Quote:
it does seem that on the net there are glib-2 and glib2-2 packages are these different?
I've done some reading around, and my take on it is as follows:

Yes and no.

I hope someone will come and clean this mess up, but, I'm going to give the explanation a shot:

Due to package naming conventions and the somewhat confusing manner in which GTK+ appears to have evolved there is actually no difference between the two things.

glib2 is version 2.x of the G library.
glib-2 is version 2.x of the G library

Between glib 1.x and 2.x, they seem to have a changed a lot of the way the system works. Instead of stopping development of 1.x and moving everything over to 2.x, "they" (mysterious, no?) have kept it going for legacy apps that still use the old way of doing things. Presumably these legacy apps could be rewritten for 2.x but no one's done it yet (could someone sort that out? Did I get it horribly wrong?).

Either way, package managers won't like seeing:

glib-2.10.3
glib-1.13.2

In their lists. Any fool can see that 2 is better than 1 (haha!) and a package manager will have a small fit trying to deal with that.

However, glib2-2.10.3 is plainly a whole different animal to glib-1.13.2

The same situation is true of gtk+ and gtk+2; although that's fairly obvious since gtk+ is linked against glib (and gtk+2 is linked against glib2 ... ).

Of course, it gets a little confusing when you start dealing with things like gtkmm, which only exists from 2.3 - should it be gtkmm2-2.3.1 ?

So, in closing - glib2-2.x.x is the same as glib-2.x.x and both are such a far development from glib-1.x.x that they are both maintained (I believe 1.x is considerably less active, for, I hope, obvious reasons).

Yeah, so, maybe that's true, maybe that's false. I'm sure a learned gtk developer will chew me out soon enough if it's wrong =)

- Piete.
 
Old 04-24-2006, 09:40 PM   #8
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by piete
Instead of stopping development of 1.x and moving everything over to 2.x, "they" (mysterious, no?) have kept it going for legacy apps that still use the old way of doing things.
The GTK developers have stopped development on glib and glib-1.2.10 is the last version they distributed. Some Linux distro maintainers might be making additional mods to glib-1.x, but the GTK developers, the official maintainers of glib, haven't worked on glib-1.x for a number of years now.

glib-2.x is in active development now.

Peace...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
glib2 v2.6.6-1 (Fedora) --> v2.8.6-1 (GST) Kropotkin Fedora 2 02-19-2006 08:29 AM
Upgrading glib2 jrdioko Linux - Software 10 06-04-2005 05:40 PM
problem in installing glib2.0.0? gobi_dgm Linux - Software 1 06-02-2005 09:36 AM
upgrade to glib2.3 wilsnyder Linux - Software 1 07-02-2003 05:07 PM
Cannot find glib after glib2 install spooge Linux - Newbie 0 06-04-2002 08:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration