LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 02-24-2007, 06:06 PM   #1
PuppetZ
LQ Newbie
 
Registered: May 2005
Location: Barcelona
Distribution: Slackware 11
Posts: 15

Rep: Reputation: 0
ldconfig changes softlinks


Hello,

I have slackware v11.0 and I want to upgrade Glib from v2.6 to v2.12. I have installed without problems the last version but when i change the both symlinks /usr/lib/libglib-2.0.so.0 and /usr/lib/libglib-2.0.so to point to /usr/local/lib/libglib-2.0.so.0.1200.9 and i run ldconfig it changes ONE symlink and then it points to the old library.

It is the first time I try to upgrade a library. Can anyone tell me the way to solve it?

thanks,
 
Old 02-25-2007, 04:43 AM   #2
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 534

Rep: Reputation: Disabled
Hello
Look in the file /etc/ld.so.conf if there is the '/usr/local/lib' entry.
If not add it before '/usr/lib' and run ldconfig again.
I don't think you have to change the symlinks manually before doing that.
 
Old 02-25-2007, 09:02 AM   #3
PuppetZ
LQ Newbie
 
Registered: May 2005
Location: Barcelona
Distribution: Slackware 11
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by berbae
Hello
Look in the file /etc/ld.so.conf if there is the '/usr/local/lib' entry.
If not add it before '/usr/lib' and run ldconfig again.
I don't think you have to change the symlinks manually before doing that.
Yes, it is done. So if I print 'ldconfig -p' i get:

>ldconfig -p | grep glib
libglib-2.0.so.0 (libc6) => /usr/local/lib/libglib-2.0.so.0
libglib-2.0.so.0 (libc6) => /usr/lib/libglib-2.0.so.0
libglib-2.0.so (libc6) => /usr/local/lib/libglib-2.0.so
libglib-2.0.so (libc6) => /usr/lib/libglib-2.0.so

Both symlinks inside /usr/local are poiting at the right library (2.12). The other 2 point at 2.6..

Anyway, my problem is caused when I try to install GConf 2.16.0 and i run 'configure'. I get the following message:

checking for DEPENDENT... Requested 'glib-2.0 > 2.9.0' but version of GLib is 2.6.6

I have both libraries installed (2.6 and 2.12) and still I get the same error.


Thanks,
 
Old 02-25-2007, 04:06 PM   #4
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 534

Rep: Reputation: Disabled
The ./configure script uses the pkgconfig files to check the version of required programs.
Here it is the glib-2.0.pc file. It searches it using the PKG_CONFIG_PATH environment variable.
So to use the new GLib2 version you must tell the ./configure script where to look for the new glib-2.0.pc file, probably /usr/local/lib/pkgconfig directory :
Code:
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
./configure
 
Old 02-26-2007, 02:41 PM   #5
PuppetZ
LQ Newbie
 
Registered: May 2005
Location: Barcelona
Distribution: Slackware 11
Posts: 15

Original Poster
Rep: Reputation: 0
Thumbs up yep!

Thank you for your help berbae, it has worked.

I spent years using linux and I'm still a newbie...
 
Old 02-26-2007, 04:21 PM   #6
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 534

Rep: Reputation: Disabled
It's nice I could help you.
But what is the new thread you posted at 10:51 PM for ?
It has the title "Manually changing /pkgconf/*.pc files, it's that correct?"
NO it is not correct to change the *.pc manually, but rather you have to use the PKG_CONFIG_PATH environment variable to point to the right pkgconfig file. So the other thread is useless.

Last edited by berbae; 02-26-2007 at 04:26 PM.
 
Old 02-27-2007, 02:13 AM   #7
PuppetZ
LQ Newbie
 
Registered: May 2005
Location: Barcelona
Distribution: Slackware 11
Posts: 15

Original Poster
Rep: Reputation: 0
Hi,

I solved the last problem changing the PKG_CONFIG_PATH but this is a new one.

I have used PKG_CONFIG_PATH (pointing at /usr/local/lib/pkgconfig ) but ./configure was still telling me:

checking for GLIB - version >= 2.6.0...
*** 'pkg-config --modversion glib-2.0' returned 2.6.6, but GLIB (2.12.9)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib.

Look that both libraries are greater than 2.6.0. even so, configure stops it's execution so I thought changing the *.pc file will be the solution.


Thanks,
 
Old 02-27-2007, 04:34 AM   #8
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 534

Rep: Reputation: Disabled
Quote:
'pkg-config --modversion glib-2.0' returned 2.6.6
This means that it finds the old glib-2.0.pc file before the new one.
It's not normal if you set the PKG_CONFIG_PATH environment variable with '/usr/local/lib/pkgconfig' at the first place.
Now things seem to be a little mixed up.
Can you post the '/usr/lib/pkgconfig/glib-2.0.pc' and the '/usr/local/lib/pkgconfig/glib-2.0.pc' ?
If you can uninstall the old Glib2 and upgrade to the new one in /usr instead of /usr/local it would be easier. But it should also work with the two versions installed together if the new one takes precedence over the old one.
 
Old 02-27-2007, 05:04 AM   #9
PuppetZ
LQ Newbie
 
Registered: May 2005
Location: Barcelona
Distribution: Slackware 11
Posts: 15

Original Poster
Rep: Reputation: 0
Thank you berbae,

It was my fault. I have set the variable with /usr/local/lib/pkgconfig:/usr/lib/pkgconfig and it worked.

Before I did PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH but the variable was initially empty so the value of the variable was only '/usr/local/lib/pkgconfig' and maybe that was the problem (I supose) (see that now I have explicitly wrote the default pkgconfig path).



Thanks for your help again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
softlinks vs hardlinks irfanhab Linux - Newbie 4 02-06-2007 02:05 AM
Softlinks - cannot delete dajomu Red Hat 4 08-17-2005 02:36 PM
Crappy softlinks dajomu Linux - Newbie 4 08-16-2005 03:50 PM
where is ldconfig ? trutnev Red Hat 3 06-01-2005 12:05 PM
Proftpd + softlinks + no go? BlackRabbit Linux - Software 6 12-16-2003 08:20 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration