LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-02-2013, 12:36 AM   #1
dsm
LQ Newbie
 
Registered: Sep 2007
Posts: 3

Rep: Reputation: 0
Help with clarification on shared library naming convention


My understanding is that for shared libraries there is usually a set of symbolic links to facilitate applications finding the right version. For example

libfoo.so.1.1.1 (actual library)
libfoo.so.1.1 -> libfoo.so.1.1.1
libfoo.so.1 -> libfoo.so.1.1.1

My question is that for library libX.so.a.b.c are the symbolic links:
libX.so.a.b
libX.so.a
considered necessary and should be created by ldconfig ?

My experience is with compiling the GLEW library locally and then running make install but it only created the following:
libGLEW.so.1.9.0 (actual shared library)
libGLEW.so.1.9 -> libGLEW.so.1.9.0
libGLEW.so -> libGLEW.so.1.9.0

It's missing the
libGLEW.so.1 -> libGLEW.so.1.9.0
which I would think should exist as well.

Running ld config also does not create this libGLEW.so.1
Is this expected behavior ? If so what is the rule/explanation about this ?

Thanks
 
Old 07-02-2013, 12:51 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

I think you've got this kind of backward. The symbolic links are there for building against a library not running running against it.

You'll get the symbolic links from libFoo.so.x.y to libFoo.so.x and libFoo.so if you install the libFoo-dev package (libFoo.so.x.y will be in the libFoo package). At run time a given the program knows to look for the same libFoo.so.x.y that was used when it was built, but the build itself just looks for libFoo.so.

Evo2.
 
Old 07-02-2013, 01:13 AM   #3
dsm
LQ Newbie
 
Registered: Sep 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the reply,

So you are saying that in the case above there will never be any app that will try to look for libGLEW.so.1 ?

Or should I say is it illegal/against convention that an app can be linked to a library with only major version number such as libGLEW.so.1 instead of libGLEW.so.1.9 ?

How does ldconfig determine that only the libGLEW.so.1.9 symbolic link should be created and not libGLEW.so.1 ?
I just would like to find out the logic/reasoning behind it.

Thanks again
 
Old 07-02-2013, 01:42 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by dsm View Post
So you are saying that in the case above there will never be any app that will try to look for libGLEW.so.1 ?
Correct, this should not be needed by anything at runtime.

Quote:
Or should I say is it illegal/against convention that an app can be linked to a library with only major version number such as libGLEW.so.1 instead of libGLEW.so.1.9 ?
I think the changes between minor version numbers of libGLEW (eg 1.5 to 1.9) would mean that it makes no sense to specify just the major version number (ie just "1").


Quote:
How does ldconfig determine that only the libGLEW.so.1.9 symbolic link should be created and not libGLEW.so.1 ?
I just would like to find out the logic/reasoning behind it.
That is a good question and one that I don't know the answer to. But in the case of a the libglew(-dev) package on my Debian system there is also no libGLEW.so.1

Evo2.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
C - Function naming convention golmschenk Programming 10 02-16-2010 08:14 PM
shared library naming conventions? bjharker Linux - General 2 11-19-2009 08:40 AM
file naming convention soldan Linux - Newbie 13 05-15-2006 11:11 AM
usb naming convention hoover93 Linux - Hardware 5 10-19-2005 10:18 PM
mail server the naming naming convention problem kashan Linux - Newbie 0 07-16-2004 02:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:42 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration