I have looked more into the SONAME issue, and from what I can find SONAME
have to match for a library to be compatible. An executable build against
some shared object will have the SONAME of that shared object embedded as a
needed library. Adding the full version to the SONAME should then make an
executable build against libv8.so with SONAME=libv8.so.1.2.2 refuse to run
with a libv8.so with SONAME=libv8.so.1.2.3.
However I did some experiments and maybe we should name the actual shared
object file the same as the SONAME, as ldconfig otherwise creates symbolic
links (e.g. libv8.so.1.2.2 -> libv8.so).

Another option will be to have a SONAME versioning which is not related to
our internal version number like libc, where libc-2.8.90.so has a SONAME of
libc.so.6. I think it will be to cumbersome to have both a V8 version and a
binary compatability version/level besides that.

Yet another option is to use libv8-1.2.2.so for the filename
and libv8.so.1.2.2 as the SONAME, or maybe just libv8.so.1.2 as the SONAME
and then bumping minor version when binary compatibility is broken. Adding
to the API should not break it. ldconfig should then create one of the links
depending on the chosen SONAME.

  libv8.so.1.2.2 -> libv8-1.2.2.so
  libv8.so.1.2 -> libv8-1.2.2.so

I also found http://julipedia.blogspot.com/2005/10/c-templates-and-abi.html,
which raises the issue with templates, where some of the code resides in the
client application, so when linking with a prebuild shared library the
header files used should match that.

/Søren

On Tue, Apr 28, 2009 at 17:05, Kasper Lund <[email protected]> wrote:

>
> Does the SONAME setting require us to maintain binary compatibility
> across some versions? Maybe we should be a bit careful about how
> others interpret the numbers...
>
> Cheers,
> Kasper
>
> On Tue, Apr 28, 2009 at 4:33 PM,  <[email protected]> wrote:
> >
> > Reviewers: Mads Ager, Christian Plesner Hansen,
> >
> > Description:
> > Added better version information
> >
> > The current version is now held in src/version.cc in a number of defines
> > which needs to be modified when changing version.
> >
> > This version information is now read by the SCons build to support
> > setting the soname for a Linus shared library. This requires passing the
> > option soname=on to the SCons build.
> >
> > I did not update the xcode project.
> >
> > BUG=151
> >
> > Please review this at http://codereview.chromium.org/100104
> >
> > SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
> >
> > Affected files:
> >   M     SConstruct
> >   M     src/SConscript
> >   M     src/api.cc
> >   A     src/version.h
> >   A     src/version.cc
> >   M     test/cctest/SConscript
> >   A     test/cctest/test-version.cc
> >   M     tools/gyp/v8.gyp
> >   M     tools/visual_studio/v8_base.vcproj
> >   M     tools/visual_studio/v8_base_arm.vcproj
> >   M     tools/visual_studio/v8_cctest.vcproj
> >   M     tools/visual_studio/v8_cctest_arm.vcproj
> >
> >
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to