Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-22-2012, 05:23 PM
|
#1
|
|
Member
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 443
Rep:
|
why do libraries have varied named symlinks?
hello,
from the ncurses package
Code:
/lib64/libncurses.so
/lib64/libncurses.so.5
/lib64/libncurses.so.5.7
why is it that multiple symlinks exist for the same library with an apparently ascending version number ?
regards
|
|
|
|
06-22-2012, 05:35 PM
|
#2
|
|
Senior Member
Registered: Dec 2011
Location: UK
Distribution: Debian Sid + various in VMs.
Posts: 1,823
|
I'm willing to take an educated guess here:
Some applications are linked to the generic library name such as libncurses.so. I'd guess these are written using functions which are known to, or expected to, exist in all versions of the library the author expects to be in existence.
Some applications though might be written to use a specific function which appeared in, for example, libncurses.so.5 -- so they specify that version. obviously, though, this is a problem when the version is updated so simlinks are used until the relevant packages are likely to have been updated.
Sorry, I'm sure somebody who knows the exact process will be along soon, I just wanted to prove my ignorance.
|
|
|
1 members found this post helpful.
|
06-22-2012, 09:33 PM
|
#3
|
|
Senior Member
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 4,554
|
Exactly so!
Linux allows an application to either be "very specific" as to what library-version it wants, or very general. Let's say for the sake of example that you have versions 5.1, 5.7, and 4.9 of libcurses on your system, all at the same time. First of all, Linux is capable of handling that, "with grace and style." If an application simply asks for "libcurses," one of those symlinks will define what it will get. If it wants "libcurses 5" or "libcurses 4," ditto. And so on. The very-simple mechanism of symlinks provides the flexibility, and the loader cache (ldconfig) provides the speed.
|
|
|
1 members found this post helpful.
|
06-22-2012, 11:44 PM
|
#4
|
|
ELF Statifier author
Registered: Oct 2007
Posts: 648
Rep: 
|
Quote:
Originally Posted by entz
hello,
from the ncurses package
Code:
/lib64/libncurses.so
/lib64/libncurses.so.5
/lib64/libncurses.so.5.7
why is it that multiple symlinks exist for the same library with an apparently ascending version number ?
regards
|
libfoo.so used by ld during program build
libfoo.so.X used by ld-linux when shared library is loaded
libfoo.so.X.Y - don't know. May be to show user exactly what version is used
|
|
|
|
06-27-2012, 02:01 PM
|
#5
|
|
Member
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 443
Original Poster
Rep:
|
thanks guys for the help
much appreciated !
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:19 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|