LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 11-18-2009, 11:06 AM   #1
bjharker
LQ Newbie
 
Registered: Jan 2006
Distribution: Fedora 8 & 11, CentOS 5, Debian Etch, Slackware 12.2
Posts: 26

Rep: Reputation: 15
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!
 
Old 11-18-2009, 12:23 PM   #2
ShadowCat8
Member
 
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261

Rep: Reputation: 52
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*
lrwxrwxrwx 1 root root    15 Jan 20  2009 /lib/libbz2.so -> libbz2.so.1.0.5
lrwxrwxrwx 1 root root    15 Jan 20  2009 /lib/libbz2.so.1 -> libbz2.so.1.0.5
lrwxrwxrwx 1 root root    15 Jan 20  2009 /lib/libbz2.so.1.0 -> libbz2.so.1.0.5
-rwxr-xr-x 1 root root 66736 Jan 20  2009 /lib/libbz2.so.1.0.5
tech7 ~ #
HTH.
 
Old 11-19-2009, 08:40 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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
.....

Last edited by knudfl; 11-19-2009 at 08:46 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The Naming Conventions nodisk Linux - Newbie 6 12-15-2005 05:15 AM
Java Naming Conventions logosys Programming 0 11-10-2005 08:21 PM
variable naming conventions patpawlowski Programming 6 02-25-2004 01:49 PM
Naming conventions ??? bigjohn Linux - Newbie 1 12-07-2003 10:25 AM
File Naming Conventions mooreted Linux - Software 4 08-23-2003 10:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:19 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