minor revision encoded in SONAME in libpython.so

S

szager

I'm wondering why the SONAME in libpython.so has a minor revision
encoded in it; for example (on Linux):

$ readelf -d libpython2.6.so | grep SONAME
0x0000000e (SONAME) Library soname:
[libpython2.6.so.1.0]

Because of this, if I compile an app against this library (with '-L/
usr/lib -lpython2.6), the compiled app has a dependency in this
precise minor revision of libpython2.6.so:

$ readelf -d myApp | grep libpython
0x0000000000000001 (NEEDED) Shared library:
[libpython2.6.so.1.0]

So, for example, if I upgrade to libpython2.6.so.1.1, my app will not
be able to run. I am currently having this problem while integrating
a piece of third-party software that uses an embedded python
interpreter.

This is unusual for libraries of this kind. Typically, the SONAME
will contain only the major revision, on the assumption that all the
minor revisions conform to the same public API, and are nominally
interchangeable. Am I to assume that minor version iterations have
incompatible API's?

Thanks in advance for any guidance.
 
M

Martin v. Löwis

So, for example, if I upgrade to libpython2.6.so.1.1

How do you do that? There won't ever be such a library. They
will always be called libpython2.6.so.1.0.

So no, no minor revision gets encoded into the SONAME.

Regards,
Martin
 
S

szager

How do you do that? There won't ever be such a library. They
will always be called libpython2.6.so.1.0.

So no, no minor revision gets encoded into the SONAME.

Then what's the significance of the .1.0 at the end of the SONAME? Is
it just nipples for men? (I hope no one objects to my extending the
Monty Python theme to Time Bandits).
 
M

Martin v. Löwis

So no, no minor revision gets encoded into the SONAME.
Then what's the significance of the .1.0 at the end of the SONAME? Is
it just nipples for men? (I hope no one objects to my extending the
Monty Python theme to Time Bandits).

Some systems require that shared libraries have a version in their
SONAME, so we provide a version.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top