shared library naming conventions?
Hi all-
Yesterday I spend most of the day installing and configuring some drivers and other software for a custom system. After finally getting everything up and running, I am now curious about the following: Why are shared libraries in Linux named like libfoobar.so.6? What's with the .6? I've found that a lot of my install/configure issues over the years could be fixed by doing something like "ln -s libfoobar.so.6 libfoobar.so" Is there some overarching reason why every shared library doesn't simply have a .so extension? It seems like a lot of problems could be avoided, but hey, what do I know? Any perspectives? Thanks! |
Well, there is a certain amount of slotting/versioning that is done with the shared libraries with those numbers so other software that depends on the library can tell if the library is a compatible version. And, if your system is up-to-date with all the linking done, you should have the links set for you by the installer, the installing package or whatever utility your distribution has for checking the sanity of your libraries. (In Gentoo, it's 'revdep-rebuild'.)
And for the links, when everything is set, I end up with stuff like: Code:
tech7 ~ # ls -l /lib/libbz2.so* |
Example:
Real name : libfoobar.so.6.10 so name : libfoobar.so.6 Real name : libfoobar.so.6.20 so name : libfoobar.so.7 Then it is your decision, which version to be libfoobar.so Or it can be decided by the program, you compile. http://tldp.org/HOWTO/Program-Librar...libraries.html § 3.1.1 http://www.linuxquestions.org/questi...9/?highlight#2 ..... |
All times are GMT -5. The time now is 10:26 AM. |