Re: libtool versioning

2010-05-06 Thread Peter Rosin

Den 2010-05-06 19:45 skrev Jason Curl:

On 04/05/2010 20:41, Peter Rosin wrote:

Den 2010-05-04 20:00 skrev Ralf Wildenhues:

Ah, ok. Yes, you're right. Feel free to commit a patch to
s/removed/& or changed/ in 6.

Sorry I came in late for the discussion. Is it correct to interpret
"removed" as an interface has been removed, or an interface has been
changed so as to cause a binary incompatibility, so that bumping the
major version is the result to indicate it is not 100% binary compatible
with the previous version, and therefore may break a program that is
already compiled against this library?


Hi Jason,

's/removed/& or changed/' could have been spelled out in full as
's/removed/removed or changed/' if that clarifies the situation for
you?

So, both removing an interface and changing an interface
cause a binary incompatibility, so both actions need a major
version bump and age=0 (i.e. not compatible with previous
versions).

Cheers,
Peter

--
They are in the crowd with the answer before the question.
> Why do you dislike Jeopardy?


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-06 Thread Jason Curl

On 04/05/2010 20:41, Peter Rosin wrote:

Den 2010-05-04 20:00 skrev Ralf Wildenhues:

Errrm, is that really so? I tend to agree with Jef here...


I take it that your response is to my "... it will work" sentence, not
the paragraph below that.


Ah, indeed.

The algorithm *could* be interpreted such that e.g. the interface 
change
"int foo(void)" ->  "int foo(int)" is an interface addition of int 
foo(int)
and an interface remove of int foo(void), thus triggering both #5 
and #6.
But in that case "changed" need not be mentioned in #4 either. So, 
because

"changed" is mentioned in #4, it also needs to be explicitly mentioned
in #6.


Ah, ok.  Yes, you're right.  Feel free to commit a patch to
s/removed/&  or changed/  in 6.
Sorry I came in late for the discussion. Is it correct to interpret 
"removed" as an interface has been removed, or an interface has been 
changed so as to cause a binary incompatibility, so that bumping the 
major version is the result to indicate it is not 100% binary compatible 
with the previous version, and therefore may break a program that is 
already compiled against this library?


I've pushed the attached patch...

Cheers,
Peter

2010-05-05  Peter Rosin 

Clarify versioning algorithm documentation.
* doc/libtool.texi (Updating version info): Be explicit
about setting age to zero on interface change.
Reported by Jef Driesen 



___
http://lists.gnu.org/mailman/listinfo/libtool
   


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-06 Thread Jason Curl

Hi Ralf & Bob,

On 03/05/2010 19:58, Ralf Wildenhues wrote:

Hello,

* Matěj  Týč wrote on Mon, May 03, 2010 at 05:45:26PM CEST:
   

If I have understood correctly, the whole LTversion stuff has only one
purpose - to inform users what have they installed.
 

Wrong.  It provides a fairly portable abstraction of different
versioning schemes implemented in different operating systems/libc's.
By definition, libtool cannot do better than what the native system
provides.  In cases where the native system provides even less than what
the libtool versioning is able to express, such as w32, it has to resort
to library renaming to get even a chance of a kind of "versioning".
   
I have a similar problem as the author in developing libraries that can 
be compiled on Unix as well as Windows/Cygwin. I've implemented a 
solution to my problem, where I have a resource that specifies a version 
as well as a filename.


See, there are the following details that are typical for a Windows 
Resource (rsrc.rc.in):

VALUE "OriginalFilename", "@MYLIBFILENAME@"
VALUE "FileVersion", "@MYLIBVERSION@"
VALUE "ProductVersion", "@MYPROGVERSION@"

where MYLIBFILENAME is the "guessed" filename that libtool will generate 
(I can't get this directly from libtool, or a script, or conf files - 
instead I get the .la filename and this is not correct).


MYLIBVERSION is the version of the file. I don't use the MS version 
scheme, but use one similar to unix that works just as well: 
Major.Minor.Revision.Build. This can be different for each library in my 
package.

 - Major is the major version as used in Unix
 - Minor is the minor version as used in Unix
 - Revision is the revision as used in Unix
 - Build is my own value, usually obtained from SVN, or incremented and 
stored somewhere on each configure invocation
And it works for installers too. They can update my library when they 
need to (assuming I haven't inserted bugs and I've reviewed my code 
thoroughly enough for ABI breakages).


MYPROGVERSION is then the version given in AC_INIT.

Unfortunately, to get MYLIBFILENAME and MYLIBVERSION (a.b.c) I needed to 
implement a new macro that effectively copies the content of what's in 
libtool, duplicating it. I would have /loved/ to somehow pull this 
information instead from libtool. And I only need this information for 
cygwin/windows. I'm even happy to let libtool add a version to the end, 
like "libmyprog-1.dll" and "libmyprog-2.dll" if I change the ABI. I 
consider this a very useful feature.


I know a lot of talk has been going on about automatic versioning, this 
could be used to cover the case for the "build" setting used in Windows 
Resources. If anyone would like, I can post a template I've set up that 
works for both CVS and SVN (sorry, no GIT, ClearCase, etc.)



Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool

   




___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-05 Thread Peter Rosin

Den 2010-05-04 20:00 skrev Ralf Wildenhues:

Errrm, is that really so? I tend to agree with Jef here...


I take it that your response is to my "... it will work" sentence, not
the paragraph below that.


Ah, indeed.


The algorithm *could* be interpreted such that e.g. the interface change
"int foo(void)" ->  "int foo(int)" is an interface addition of int foo(int)
and an interface remove of int foo(void), thus triggering both #5 and #6.
But in that case "changed" need not be mentioned in #4 either. So, because
"changed" is mentioned in #4, it also needs to be explicitly mentioned
in #6.


Ah, ok.  Yes, you're right.  Feel free to commit a patch to
s/removed/&  or changed/  in 6.


I've pushed the attached patch...

Cheers,
Peter

2010-05-05  Peter Rosin  

Clarify versioning algorithm documentation.
* doc/libtool.texi (Updating version info): Be explicit
about setting age to zero on interface change.
Reported by Jef Driesen 


--
They are in the crowd with the answer before the question.
> Why do you dislike Jeopardy?
diff --git a/doc/libtool.texi b/doc/libtool.texi
index f73f5a7..bbc22f4 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -2927,8 +2927,8 @@ If any interfaces have been added since the last public 
release, then
 increment @var{age}.
 
 @item
-If any interfaces have been removed since the last public release, then
-set @var{age} to 0.
+If any interfaces have been removed or changed since the last public
+release, then set @var{age} to 0.
 @end enumerate
 
 @stro...@emph{never}} try to set the interface numbers so that they
___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-04 Thread Ralf Wildenhues
* Peter Rosin wrote on Tue, May 04, 2010 at 10:05:37AM CEST:
> Den 2010-05-03 22:03 skrev Ralf Wildenhues:
[...]
> >#  3. If the library source code has changed at all since the last 
> >update,
> ># then increment revision (`c:r:a' becomes `c:r+1:a').
> >#  4. If any interfaces have been added, removed, or changed since the 
> >last
> ># update, increment current, and set revision to 0.
> >#  5. If any interfaces have been added since the last public release, 
> >then
> ># increment age.
> >#  6. If any interfaces have been removed since the last public release,
> ># then set age to 0.
> 
> Shouldn't step #6 included "changed" as well as "removed"? If you
> change the interface (for example modifying function parameters),
> backwards compatibility is broken too. But only "removed" is listed
> here.
> >>>
> >>>Well, it is listed in step 4 already.
> >>
> >>Sure, but if interfaces have been changed, but not removed, the
> >>algorithm stops at step #4,
> >
> >Read the algorithm without any implicit stops in mind, and it will work.
> >
> >Anyway, your point is good that this is hard to understand, and we've
> >addressed that in git master.
> 
> Errrm, is that really so? I tend to agree with Jef here...

I take it that your response is to my "... it will work" sentence, not
the paragraph below that.

> The algorithm *could* be interpreted such that e.g. the interface change
> "int foo(void)" -> "int foo(int)" is an interface addition of int foo(int)
> and an interface remove of int foo(void), thus triggering both #5 and #6.
> But in that case "changed" need not be mentioned in #4 either. So, because
> "changed" is mentioned in #4, it also needs to be explicitly mentioned
> in #6.

Ah, ok.  Yes, you're right.  Feel free to commit a patch to
s/removed/& or changed/  in 6.

Thanks for perservering!
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-04 Thread Peter Rosin

Den 2010-05-03 22:03 skrev Ralf Wildenhues:

* Jef Driesen wrote on Mon, May 03, 2010 at 08:24:09PM CEST:

Yes, I have read the libtool manual, but it doesn't contain much
info about the resulting filename. Most of the info is about the
c:r:a scheme for input, not the output.


Yes, because the output file name is a per-system detail that you should
not have to care about.


#  1. Start with version information of `0:0:0' for each libtool library.
#  2. Update the version information only immediately before a public
# release of your software. More frequent updates are unnecessary, and
# only guarantee that the current interface number gets larger faster.
#  3. If the library source code has changed at all since the last update,
# then increment revision (`c:r:a' becomes `c:r+1:a').
#  4. If any interfaces have been added, removed, or changed since the last
# update, increment current, and set revision to 0.
#  5. If any interfaces have been added since the last public release, then
# increment age.
#  6. If any interfaces have been removed since the last public release,
# then set age to 0.


Shouldn't step #6 included "changed" as well as "removed"? If you
change the interface (for example modifying function parameters),
backwards compatibility is broken too. But only "removed" is listed
here.


Well, it is listed in step 4 already.


Sure, but if interfaces have been changed, but not removed, the
algorithm stops at step #4,


Read the algorithm without any implicit stops in mind, and it will work.

Anyway, your point is good that this is hard to understand, and we've
addressed that in git master.


Errrm, is that really so? I tend to agree with Jef here...

The algorithm *could* be interpreted such that e.g. the interface change
"int foo(void)" -> "int foo(int)" is an interface addition of int foo(int)
and an interface remove of int foo(void), thus triggering both #5 and #6.
But in that case "changed" need not be mentioned in #4 either. So, because
"changed" is mentioned in #4, it also needs to be explicitly mentioned
in #6.

Or what am I missing?

Cheers,
Peter

--
They are in the crowd with the answer before the question.
> Why do you dislike Jeopardy?


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-04 Thread Tor Lillqvist
>>> 

I am not a native English speaker, but I find the use of "may use" a
bit confusing in the added text. I would suggest changing some
instances of "may use" to "are able to use" and some to "might be
using". (It should be clear in what way I mean, I hope...) Hopefully
that will make the text even clearer.

--tml


___
http://lists.gnu.org/mailman/listinfo/libtool



Re: libtool versioning

2010-05-03 Thread Michel Briand

Jef Driesen  - Mon, 03 May 2010 20:24:09 +0200

>On 03/05/10 20:00, Ralf Wildenhues wrote:
>> Hello Jef,
>>
>> * Jef Driesen wrote on Mon, May 03, 2010 at 09:08:14AM CEST:
>>> On 02/05/10 03:33, Bob Friesenhahn wrote:
 On Sun, 2 May 2010, Jef Driesen wrote:

>> The git master version of Libtool is hopefully a bit easier to
>> understand, it has an alternate description added, which is similar to
>> yours:
>> 
>
>I find this a more intuitive description. I'm sure others will 
>appreciate it too!
>

Wow !

Nice new explanation. Congratulations Ralf ! That's a big job.



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-03 Thread Ralf Wildenhues
* Jef Driesen wrote on Mon, May 03, 2010 at 08:24:09PM CEST:
> Yes, I have read the libtool manual, but it doesn't contain much
> info about the resulting filename. Most of the info is about the
> c:r:a scheme for input, not the output.

Yes, because the output file name is a per-system detail that you should
not have to care about.

> >>>#  1. Start with version information of `0:0:0' for each libtool library.
> >>>#  2. Update the version information only immediately before a public
> >>># release of your software. More frequent updates are unnecessary, and
> >>># only guarantee that the current interface number gets larger faster.
> >>>#  3. If the library source code has changed at all since the last update,
> >>># then increment revision (`c:r:a' becomes `c:r+1:a').
> >>>#  4. If any interfaces have been added, removed, or changed since the last
> >>># update, increment current, and set revision to 0.
> >>>#  5. If any interfaces have been added since the last public release, then
> >>># increment age.
> >>>#  6. If any interfaces have been removed since the last public release,
> >>># then set age to 0.
> >>
> >>Shouldn't step #6 included "changed" as well as "removed"? If you
> >>change the interface (for example modifying function parameters),
> >>backwards compatibility is broken too. But only "removed" is listed
> >>here.
> >
> >Well, it is listed in step 4 already.
> 
> Sure, but if interfaces have been changed, but not removed, the
> algorithm stops at step #4,

Read the algorithm without any implicit stops in mind, and it will work.

Anyway, your point is good that this is hard to understand, and we've
addressed that in git master.

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-03 Thread Jef Driesen

On 03/05/10 20:00, Ralf Wildenhues wrote:

Hello Jef,

* Jef Driesen wrote on Mon, May 03, 2010 at 09:08:14AM CEST:

On 02/05/10 03:33, Bob Friesenhahn wrote:

On Sun, 2 May 2010, Jef Driesen wrote:


I'm trying to understand the libtool current:revision:age versioning scheme.
I think I understand how it works, but I noticed that filename of the shared
library seems to get different numbers (current-age.age.revision). Is that
expected?


The filename generation is dependent on the OS.  It is usually best
not to pay any attention to the filenames at all unless you are
switching from some other existing numbering scheme and need to avoid
a collision.  I keep these notes in my configure script (taken from
various libtool related documentation) so that I remember how things
work:


The reason why I found the filename confusing, is because in the
article I was looking at, they make it look like the libtool version
c:r:a ends up in the filename as "libfoo.so.c.r.a".

http://www.freesoftwaremagazine.com/books/agaal/building_shared_libraries_once_using_autotools


I'm adding John in Cc:, he should be able to say more about this.


I have seen this a couple of other places as well.


Like, the GNU Libtool manual?  Have you looked there?


Yes, I have read the libtool manual, but it doesn't contain much info 
about the resulting filename. Most of the info is about the c:r:a scheme 
for input, not the output.



As a newbe to the
libtool versionning scheme, it took me a while to figure out what
was really going on. Very confusing.


# Here are a set of rules to help you update your library version
# information:
#
#  1. Start with version information of `0:0:0' for each libtool library.
#  2. Update the version information only immediately before a public
# release of your software. More frequent updates are unnecessary, and
# only guarantee that the current interface number gets larger faster.
#  3. If the library source code has changed at all since the last update,
# then increment revision (`c:r:a' becomes `c:r+1:a').
#  4. If any interfaces have been added, removed, or changed since the last
# update, increment current, and set revision to 0.
#  5. If any interfaces have been added since the last public release, then
# increment age.
#  6. If any interfaces have been removed since the last public release,
# then set age to 0.


Shouldn't step #6 included "changed" as well as "removed"? If you
change the interface (for example modifying function parameters),
backwards compatibility is broken too. But only "removed" is listed
here.


Well, it is listed in step 4 already.


Sure, but if interfaces have been changed, but not removed, the 
algorithm stops at step #4, and you get:


c+1:0:a

But if an interface has been removed, you have to apply #6 and get:

c+1:0:O

But in both situations backwards compatibility has been broken. So I 
would think you have to apply step #6 in both cases.



Personally, I think the last three steps are easier to understand
when written as if cases, rather than steps:

1. Interface unchanged: C:R+1:A
2. Interface changed in a backwards compatible way: C+1:0:A+1
3. Interface changed and backwards compatibility is broken: C+1:0:0


The git master version of Libtool is hopefully a bit easier to
understand, it has an alternate description added, which is similar to
yours:



I find this a more intuitive description. I'm sure others will 
appreciate it too!



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-03 Thread Ralf Wildenhues
Hello,

* Matěj  Týč wrote on Mon, May 03, 2010 at 05:45:26PM CEST:
> If I have understood correctly, the whole LTversion stuff has only one
> purpose - to inform users what have they installed.

Wrong.  It provides a fairly portable abstraction of different
versioning schemes implemented in different operating systems/libc's.
By definition, libtool cannot do better than what the native system
provides.  In cases where the native system provides even less than what
the libtool versioning is able to express, such as w32, it has to resort
to library renaming to get even a chance of a kind of "versioning".

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-03 Thread Ralf Wildenhues
Hello Jef,

* Jef Driesen wrote on Mon, May 03, 2010 at 09:08:14AM CEST:
> On 02/05/10 03:33, Bob Friesenhahn wrote:
> >On Sun, 2 May 2010, Jef Driesen wrote:
> >
> >>I'm trying to understand the libtool current:revision:age versioning scheme.
> >>I think I understand how it works, but I noticed that filename of the shared
> >>library seems to get different numbers (current-age.age.revision). Is that
> >>expected?
> >
> >The filename generation is dependent on the OS.  It is usually best
> >not to pay any attention to the filenames at all unless you are
> >switching from some other existing numbering scheme and need to avoid
> >a collision.  I keep these notes in my configure script (taken from
> >various libtool related documentation) so that I remember how things
> >work:
> 
> The reason why I found the filename confusing, is because in the
> article I was looking at, they make it look like the libtool version
> c:r:a ends up in the filename as "libfoo.so.c.r.a".
> 
> http://www.freesoftwaremagazine.com/books/agaal/building_shared_libraries_once_using_autotools

I'm adding John in Cc:, he should be able to say more about this.

> I have seen this a couple of other places as well.

Like, the GNU Libtool manual?  Have you looked there?

> As a newbe to the
> libtool versionning scheme, it took me a while to figure out what
> was really going on. Very confusing.
> 
> ># Here are a set of rules to help you update your library version
> ># information:
> >#
> >#  1. Start with version information of `0:0:0' for each libtool library.
> >#  2. Update the version information only immediately before a public
> ># release of your software. More frequent updates are unnecessary, and
> ># only guarantee that the current interface number gets larger faster.
> >#  3. If the library source code has changed at all since the last update,
> ># then increment revision (`c:r:a' becomes `c:r+1:a').
> >#  4. If any interfaces have been added, removed, or changed since the last
> ># update, increment current, and set revision to 0.
> >#  5. If any interfaces have been added since the last public release, then
> ># increment age.
> >#  6. If any interfaces have been removed since the last public release,
> ># then set age to 0.
> 
> Shouldn't step #6 included "changed" as well as "removed"? If you
> change the interface (for example modifying function parameters),
> backwards compatibility is broken too. But only "removed" is listed
> here.

Well, it is listed in step 4 already.

> Personally, I think the last three steps are easier to understand
> when written as if cases, rather than steps:
> 
> 1. Interface unchanged: C:R+1:A
> 2. Interface changed in a backwards compatible way: C+1:0:A+1
> 3. Interface changed and backwards compatibility is broken: C+1:0:0

The git master version of Libtool is hopefully a bit easier to
understand, it has an alternate description added, which is similar to
yours:


Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-03 Thread Gary V. Vaughan
On 3 May 2010, at 23:09, Bob Friesenhahn wrote:
> On Mon, 3 May 2010, Matěj  Týč wrote:
>>> 
>> 
>> If I have understood correctly, the whole LTversion stuff has only one
>> purpose - to inform users what have they installed.
> 
> More specifically, it provides libtool with the information needed to produce 
> a suitably numbered library to satisfy a purpose.  As you say, libtool does 
> not provide control over which versions of libraries are consumed in a link 
> since only the current version in the linker search path, or the version 
> indicated by a .la file, gets used.

Almost certainly (assuming you don't have a very customized installation), even 
though you might have several old versions of a library to support the 
applications you linked against it, you still have only one set of header files 
at any given time, and they will describe the API of the newest version of the 
library they pertain to.  And that is the library you want the compiler driver 
to find when it builds new software on your system, and the one you want the 
runtime linker to find next year when you've installed a newer version of that 
library, and replaced the headers with the ones that describe the API of that 
version.

Libtool is trying to make this happen automatically on as many systems as it 
can, as long as the people who develop and/or package libraries for your system 
maintain the libtool version numbers according to the rules in the Libtool 
manual.

Cheers,
-- 
Gary V. Vaughan (g...@gnu.org)

___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-03 Thread Bob Friesenhahn

On Mon, 3 May 2010, Matěj  Týč wrote:




If I have understood correctly, the whole LTversion stuff has only one
purpose - to inform users what have they installed.


More specifically, it provides libtool with the information needed to 
produce a suitably numbered library to satisfy a purpose.  As you say, 
libtool does not provide control over which versions of libraries are 
consumed in a link since only the current version in the linker search 
path, or the version indicated by a .la file, gets used.


I don't think that this makes libtool useless by any means.

Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-03 Thread Bob Friesenhahn

On Mon, 3 May 2010, Jef Driesen wrote:

#  6. If any interfaces have been removed since the last public release,
# then set age to 0.


Shouldn't step #6 included "changed" as well as "removed"? If you change the 
interface (for example modifying function parameters), backwards 
compatibility is broken too. But only "removed" is listed here.


Yes, "changed" is the same as "removed".  Square blocks don't fit in 
round holes.  Increment current and set age to 0.  Changing an 
interface is a big deal.


Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-03 Thread Matěj Týč
>> I'm trying to understand the libtool current:revision:age versioning
>> scheme. I think I understand how it works, but I noticed that filename of
>> the shared library seems to get different numbers
>> (current-age.age.revision). Is that expected?
>
> The filename generation is dependent on the OS.  It is usually best not to
> pay any attention to the filenames at all unless you are switching from some
> other existing numbering scheme and need to avoid a collision.  I keep these
> notes in my configure script (taken from various libtool related
> documentation) so that I remember how things work:
>

If I have understood correctly, the whole LTversion stuff has only one
purpose - to inform users what have they installed.
You can't tell to libtool like "link only with libfoo of LTversion >=
5" or something like that, neither you can "read" the version using an
AC macro or libtool itself.
So the whole LTversion concept looks quite attractive, but,
unfortunatelly, not so useful.
If this is correct, I could try some doc patch describing the actual
importance of LTversion stuff.
Regards,
Matěj


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-03 Thread Jef Driesen

On 02/05/10 03:33, Bob Friesenhahn wrote:

On Sun, 2 May 2010, Jef Driesen wrote:


I'm trying to understand the libtool current:revision:age versioning scheme.
I think I understand how it works, but I noticed that filename of the shared
library seems to get different numbers (current-age.age.revision). Is that
expected?


The filename generation is dependent on the OS.  It is usually best
not to pay any attention to the filenames at all unless you are
switching from some other existing numbering scheme and need to avoid
a collision.  I keep these notes in my configure script (taken from
various libtool related documentation) so that I remember how things
work:


The reason why I found the filename confusing, is because in the article 
I was looking at, they make it look like the libtool version c:r:a ends 
up in the filename as "libfoo.so.c.r.a".


http://www.freesoftwaremagazine.com/books/agaal/building_shared_libraries_once_using_autotools

I have seen this a couple of other places as well. As a newbe to the 
libtool versionning scheme, it took me a while to figure out what was 
really going on. Very confusing.



# Here are a set of rules to help you update your library version
# information:
#
#  1. Start with version information of `0:0:0' for each libtool library.
#  2. Update the version information only immediately before a public
# release of your software. More frequent updates are unnecessary, and
# only guarantee that the current interface number gets larger faster.
#  3. If the library source code has changed at all since the last update,
# then increment revision (`c:r:a' becomes `c:r+1:a').
#  4. If any interfaces have been added, removed, or changed since the last
# update, increment current, and set revision to 0.
#  5. If any interfaces have been added since the last public release, then
# increment age.
#  6. If any interfaces have been removed since the last public release,
# then set age to 0.


Shouldn't step #6 included "changed" as well as "removed"? If you change 
the interface (for example modifying function parameters), backwards 
compatibility is broken too. But only "removed" is listed here.


Personally, I think the last three steps are easier to understand when 
written as if cases, rather than steps:


1. Interface unchanged: C:R+1:A
2. Interface changed in a backwards compatible way: C+1:0:A+1
3. Interface changed and backwards compatibility is broken: C+1:0:0

If find this more intuitive because it's more similar with the typical 
major.minor.micro scheme, where minor and micro are equivalent with age 
and revision. Only the major number is really different from the libtool 
current number, because that last one is increased with every interface 
change.



One of the reasons why I would like to know the filename is that I'm also
building a Windows DLL (it's a cross platform library) where I would like to
include a version resource. And one of the fields in a Windows version
resource is the "OriginalFilename". It seems that dlls get filename
libfoo-x.dll, where x is the number current-age. Is that correct?


It is true that Windows does not support useful versioning and is not
able to select among DLLs based on an interface version.  It seems
that your analysis is correct.


Thanks for the info.



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning

2010-05-01 Thread Bob Friesenhahn

On Sun, 2 May 2010, Jef Driesen wrote:

I'm trying to understand the libtool current:revision:age versioning scheme. 
I think I understand how it works, but I noticed that filename of the shared 
library seems to get different numbers (current-age.age.revision). Is that 
expected?


The filename generation is dependent on the OS.  It is usually best 
not to pay any attention to the filenames at all unless you are 
switching from some other existing numbering scheme and need to avoid 
a collision.  I keep these notes in my configure script (taken from 
various libtool related documentation) so that I remember how things 
work:


# Libtool library revision control info
# See the libtool documentation under the heading "Libtool's versioning
# system" in order to understand the meaning of these fields
#
# current
#  The most recent interface number that this library implements.
# revision
#  The implementation number of the current interface.
# age
#  The difference between the newest and oldest interfaces that
#  this library implements. In other words, the library implements
#  all the interface numbers in the range from number current -
#  age to current.
#
# Here are a set of rules to help you update your library version
# information:
#
#  1. Start with version information of `0:0:0' for each libtool library.
#  2. Update the version information only immediately before a public
# release of your software. More frequent updates are unnecessary, and
# only guarantee that the current interface number gets larger faster.
#  3. If the library source code has changed at all since the last update,
# then increment revision (`c:r:a' becomes `c:r+1:a').
#  4. If any interfaces have been added, removed, or changed since the last
# update, increment current, and set revision to 0.
#  5. If any interfaces have been added since the last public release, then
# increment age.
#  6. If any interfaces have been removed since the last public release,
# then set age to 0.

One of the reasons why I would like to know the filename is that I'm also 
building a Windows DLL (it's a cross platform library) where I would like to 
include a version resource. And one of the fields in a Windows version 
resource is the "OriginalFilename". It seems that dlls get filename 
libfoo-x.dll, where x is the number current-age. Is that correct?


It is true that Windows does not support useful versioning and is not 
able to select among DLLs based on an interface version.  It seems 
that your analysis is correct.


Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-12 Thread Bob Friesenhahn

On Tue, 11 Aug 2009, Michel Briand wrote:


Does anyone uses "10" or "16" to refer to their ABI ? Hum... So those
numbers have to be managed somewhere...

If developers and users are ok with X.Y.Z then the CURRENT, REVISION
and AGE is a different scheme to learn and to implement in the build
system: that need to be managed in parallel. That's to say that if dev
makes some changes in ABI and bumps the version up (say X.Y.Z+1),
someone has to think about the weird libtool thing and update the
libtool's versioning, making substractions and the like...


I am failing to understand the problem.  I use libtool to manage the 
versioning and the only way I would know what the final library name 
became (for a particular OS) is to do a build and look.


Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Vincent Torri



On Wed, 12 Aug 2009, Ralf Wildenhues wrote:


* Vincent Torri wrote on Wed, Aug 12, 2009 at 07:15:16AM CEST:

On Wed, 12 Aug 2009, Ralf Wildenhues wrote:

* Vincent Torri wrote on Wed, Aug 12, 2009 at 12:33:47AM CEST:


if i'm not mistaken, you can compute le libtool versioning from the
version of the software. If the version of the software is X.Y.Z,
the libtool version can be computed with : (X+Y).Z.Y


No, it can not, for two reasons: 1) the version of the software and the
shared library version are completely unrelated; 2) you are thinking in
terms of GNU/Linux shared library versioning only, not seeing that there
are other systems.

This thread is all about why your statement is wrong.  Please read it.


i've read it. But the way we change X, Y and Z follows exactly the
libtool versioning 
(http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info)
with the formula above.


What does that have to do with it?  That statement is completely
unrelated to what you said before.

Example showing why your first statement above is wrong:

I have a package called foo, at version 2.13.


we use a micro version number, not only a major and minor version 
numbers; so all you say below is unrelated to what i described above:


AC_INIT([eet], [1.2.2], [enlightenment-de...@lists.sourceforge.net])
AC_PROG_LIBTOOL
VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"


Vincent Torri


It consists of a lot of
junk, plus two shared libraries created with libtool, libfoo and
libbar.  libfoo is currently at the Libtool version triple 3:27:0,
libbar is currently at the Libtool version triple 17:105:1.

With our foo next release, 2.14, libfoo will probably have 3:28:0,
libbar will probably have 18:3:2.

All of this is very much conforming to the link you posted.  But it has
*nothing* to do with the version of the package (2.13 resp 2.14 here).
And I have not said a word about the soname of the libraries on
GNU/Linux (which is what you are trying to get the computation from).

The fact that, on GNU/Linux, the version triple 17:105:1 might cause a
library with soname libfoo.so.16 to be created, is a detail that I don't
care about.  I am aware of it, and distros might have to deal with it,
but I am just as aware that on other systems, the *same* triple might
cause a library with soname libfoo.so.17.1 to be created, or with DLL
name libfoo-16.dll or what not else.

--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
Message délivré par le serveur de messagerie de l'Université d'Evry.

___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Ralf Wildenhues
* Vincent Torri wrote on Wed, Aug 12, 2009 at 07:15:16AM CEST:
> On Wed, 12 Aug 2009, Ralf Wildenhues wrote:
> >* Vincent Torri wrote on Wed, Aug 12, 2009 at 12:33:47AM CEST:
> >>
> >>if i'm not mistaken, you can compute le libtool versioning from the
> >>version of the software. If the version of the software is X.Y.Z,
> >>the libtool version can be computed with : (X+Y).Z.Y
> >
> >No, it can not, for two reasons: 1) the version of the software and the
> >shared library version are completely unrelated; 2) you are thinking in
> >terms of GNU/Linux shared library versioning only, not seeing that there
> >are other systems.
> >
> >This thread is all about why your statement is wrong.  Please read it.
> 
> i've read it. But the way we change X, Y and Z follows exactly the
> libtool versioning 
> (http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info)
> with the formula above.

What does that have to do with it?  That statement is completely
unrelated to what you said before.

Example showing why your first statement above is wrong:

I have a package called foo, at version 2.13.  It consists of a lot of
junk, plus two shared libraries created with libtool, libfoo and
libbar.  libfoo is currently at the Libtool version triple 3:27:0,
libbar is currently at the Libtool version triple 17:105:1.

With our foo next release, 2.14, libfoo will probably have 3:28:0,
libbar will probably have 18:3:2.

All of this is very much conforming to the link you posted.  But it has
*nothing* to do with the version of the package (2.13 resp 2.14 here).
And I have not said a word about the soname of the libraries on
GNU/Linux (which is what you are trying to get the computation from).

The fact that, on GNU/Linux, the version triple 17:105:1 might cause a
library with soname libfoo.so.16 to be created, is a detail that I don't
care about.  I am aware of it, and distros might have to deal with it,
but I am just as aware that on other systems, the *same* triple might
cause a library with soname libfoo.so.17.1 to be created, or with DLL
name libfoo-16.dll or what not else.


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Vincent Torri



On Wed, 12 Aug 2009, Ralf Wildenhues wrote:


* Vincent Torri wrote on Wed, Aug 12, 2009 at 12:33:47AM CEST:


if i'm not mistaken, you can compute le libtool versioning from the
version of the software. If the version of the software is X.Y.Z,
the libtool version can be computed with : (X+Y).Z.Y


No, it can not, for two reasons: 1) the version of the software and the
shared library version are completely unrelated; 2) you are thinking in
terms of GNU/Linux shared library versioning only, not seeing that there
are other systems.

This thread is all about why your statement is wrong.  Please read it.


i've read it. But the way we change X, Y and Z follows exactly the libtool 
versioning 
(http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info) 
with the formula above.


Vincent Torri


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Ralf Wildenhues
* Vincent Torri wrote on Wed, Aug 12, 2009 at 12:33:47AM CEST:
> 
> if i'm not mistaken, you can compute le libtool versioning from the
> version of the software. If the version of the software is X.Y.Z,
> the libtool version can be computed with : (X+Y).Z.Y

No, it can not, for two reasons: 1) the version of the software and the
shared library version are completely unrelated; 2) you are thinking in
terms of GNU/Linux shared library versioning only, not seeing that there
are other systems.

This thread is all about why your statement is wrong.  Please read it.

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Charles Wilson
Michel Briand wrote:

>> libavutil49-0.4.9-3.pre1.8994.2plf2008.0
>>  ABI=49, pkgver=0.4.9
>>
> 
> Please give me the way to learn those ABI number you cite.

libavutil49-0.4.9-
 ^^
is usually used by the distribution (Red Hat? Debian?) to indicate that
this package (.rpm? .deb?) contains the shared runtime library of
libavutil with SOVERSION 49. That is, it probably contains a "real" file
named

libavutil.so.49.x.y

and closely related items, such as the runtime symlink needed by ld.so
for on-demand loading:

libavutil.so.49 -> libavutil.so.49.x.y

It usually does NOT contain the *linktime* symlink needed by ld when
compiling clients with -lavutil:

libavutil.so -> libavutil.so.49.x.y

because that's in the libavutil-devel-0.4.9- package.

The libavutil49-0.4.9- package may also contain a postinstall
script to run ldconfig appropriately.  The point is, what you've been
calling the "major version" (here, 49) is the ABI number, properly
speaking, or in libtool terms, the *interface* major version [*], not
the *package* major version. (that's "0" from "0.4.9" above).

[*] but even that's cheating, because we usually don't like to talk
about "major/minor/patch" with regards to API/ABI.  We prefer these
compatibility indications current, revision, age because it's a more
appropriate vocabulary.  'age' tells you how many of the previous ABI's
before current, that 'current' is compatible with.  'revision' tells you
how many internal code modifications have occured on the implementation
of the 'current' ABI, but which have had zero impact on the public ABI
itself.  Therefore, in this context, ABI "major" version is just "the
earliest ABI instance prior to 'current' with which 'current' is
backwards-compatible."  That is,
  7:3:2  --> "major" is 5, and
curr = 7 is compatible with 5
   6 is compatible with 5
   5 is compatible with 5
  so the SONAME for all three -version-infos would be libfoo.so.5.
and that's why libtool "major" interface numbers skip.  If we follow the
rules with an ABI change, the next -version-info would be
  8:0:0
whose "major" is 8 --> libfoo.so.8

because interfaces #7 and #6 were backwards-compatible with #5, so we
skip them.

"minor" and "patch" don't *explicitly* tell you any of these things.
and "major" only tells you about ABI compatibility if the project
managers are very careful.

> I've looked into many OSS and found in Makefile.am only 2 cases :
> 
> - version-info 1:0:0 (the guys there didn't want to bother with
>   libtool versioning apparently... ;))
> 
> - version-info with the X.Y.Z version "back crafted" to make
>   the soname version read the same as X.Y.Z

You're not looking in the right places. 

Sure, there are a lot of misconfigured projects out there. But almost
all of the GNU projects Do It Right.  Hunt around here:

http://ftp.gnu.org/pub/gnu/

> Practice usually prevails in software.

And when you have the opportunity at the beginning of a project, to do
detailed upfront design, so that "in practice" you don't end up "in the
ditch", is better.

It's real easy to write a quick and dirty makefile that builds 'project
bar' on linux.  then, you start hacking around with various make rules
to ensure that it builds on BSD. Then Darwin.  Then, God help you, you
try to hack around your custom makefile to get it to work on win32 (and
I'm just talking build system, not actual code porting here).

And then you try to retrofit it with VPATH so that out-of-sourcedir
builds work.

The you try to fix the Makefile to support cross-builds.

OR

leverage decades of work from the automake team, and write a Makefile.am
once, up front, even when all you care about is linux, that looks like:

bin_PROGRAMS = bar
bar_SOURCES = bar.c helper.c
man_MANS = bar.1

and it basically works unchanged when you decide to worry about other
platforms.  Now, if you're really smart and experienced, you could
hand-code a Makefile that does all these things up front, the right way,
so that it works later on BSD and win32 and with VPATH and crossbuilds.
 But it is HARD.  Three lines of Makefile.am is EASY. And the payoff is
huge.

Similarly, if you're really smart and work hard, you could hand-craft
rules to build your shared library, and even special case for the
wild-and-wacky cygwin/mingw DLL issues.  Or, you could just use libtool.

Ditto, you could think really hard about how to ensure proper ABI
numbering and compatibility, and explicitly tie those values to your
package version numbers (thus linking the two).  Or, you could rely on
the effort for supporting shared library builds on 129 different $hosts
that has been expended over 15 or more years by people smarter than both
of us put together. (Fer instance, did you know it is *illegal* to have
a SOVERSION of zero on IRIX? libfoo.so.0 won't work. libtool knows this,
and computes ABI major as 'current - age + 1' for that platform.  So,
how would you package libfoo-0.1.1.tar.gz on IRIX, if y

Re: libtool versioning and ABI

2009-08-11 Thread Daniel Herring

On Wed, 12 Aug 2009, Michel Briand wrote:

Please give me the way to learn those ABI number you cite.

I've looked into many OSS and found in Makefile.am only 2 cases :

- version-info 1:0:0 (the guys there didn't want to bother with
 libtool versioning apparently... ;))

- version-info with the X.Y.Z version "back crafted" to make
 the soname version read the same as X.Y.Z


Here's a counter example.  Download
ftp://ftp.gnu.org/pub/gnu/gnutls/gnutls-2.8.2.tar.bz2

looking in gnutls-2.8.2/lib/Makefile.am, we find
""
libgnutlsxx_la_LDFLAGS = -no-undefined \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
""

These are defined in gnutls-2.8.2/lib/m4/hooks.m4 as
""
  # Library code modified:  REVISION++
  # Interfaces changed/added/removed:   CURRENT++   REVISION=0
  # Interfaces added: AGE++
  # Interfaces removed:   AGE=0
  AC_SUBST(LT_CURRENT, 40)
  AC_SUBST(LT_REVISION, 9)
  AC_SUBST(LT_AGE, 14)

  # Used when creating the Windows libgnutls-XX.def files.
  DLL_VERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
  AC_SUBST(DLL_VERSION)
""


I don't know how other packages do this, but if you want to learn, try 
this.

- look at *.so.* in /usr/lib, /usr/local/lib, etc
- find ones with unexpected numbers
- look at those packages to see how they do it
- GNU packages are more likely to do it the libtool way than others

These things are easy to find; I'd never read the gnutls build scripts 
before nor even known what TLS stood for.


Later,
Daniel


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Vincent Torri



On Wed, 12 Aug 2009, Michel Briand wrote:


I've looked into many OSS and found in Makefile.am only 2 cases :

- version-info 1:0:0 (the guys there didn't want to bother with
 libtool versioning apparently... ;))

- version-info with the X.Y.Z version "back crafted" to make
 the soname version read the same as X.Y.Z


if i'm not mistaken, you can compute le libtool versioning from the 
version of the software. If the version of the software is X.Y.Z, the 
libtool version can be computed with : (X+Y).Z.Y


Of course the version of the software must be correctly updated.

Vincent Torri


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Michel Briand
Sorry for my last post : too quick answer :))

Charles Wilson  - Tue, 11 Aug 2009 16:45:58
-0400

>Michel Briand wrote:
>
>> Thank you, but, sorry, I'm not convinced. Remember what I said a
>> few mails ago: that's all of interface contract = same concept as
>> your...
>> 
>> Does anyone uses "10" or "16" to refer to their ABI ? Hum... So those
>> numbers have to be managed somewhere...
>
>Yes.  Here are a few libraries on my linux box:
>
>libalsa2-1.0.15-0.rc1.4mdv2008.0  ABI=2, pkgver=1.0.15
>libamarok0-scripts-1.4.7-9mdv2008.0   ABI=0, pkgver=1.4.7
>libamrnb2-6.1.0.3-1plf2008.0  ABI=2, pkgver=6.1.0.3
>libao2-0.8.8-2mdv2008.0   ABI=2, pkgver=0.8.8
>libapplewm7-1.0.0-5mdv2008.0  ABI=7, pkgver=1.0.0
>libavformats51-0.4.9-3.pre1.8994.2plf2008.0
>  ABI=51, pkgver=0.4.9
>libavutil49-0.4.9-3.pre1.8994.2plf2008.0
>  ABI=49, pkgver=0.4.9
>

Please give me the way to learn those ABI number you cite.

I've looked into many OSS and found in Makefile.am only 2 cases :

- version-info 1:0:0 (the guys there didn't want to bother with
  libtool versioning apparently... ;))

- version-info with the X.Y.Z version "back crafted" to make
  the soname version read the same as X.Y.Z

Yes it's bad practice as suggested by the libtool documentation.
But whatever... it's common practice. It's not like the Bible ;)...
Practice usually prevails in software.

>Pick a number.  Increment X. Increment Y. Increment Z.  do whatever you
>want. It's NOT a technical decision.
>

Hum. I'm certain that it is :).



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Michel Briand
The whole story is that I never wanted to use libtool in the first
place.

And, now, I know why :).



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Charles Wilson
Michel Briand wrote:

> Thank you, but, sorry, I'm not convinced. Remember what I said a
> few mails ago: that's all of interface contract = same concept as
> your...
> 
> Does anyone uses "10" or "16" to refer to their ABI ? Hum... So those
> numbers have to be managed somewhere...

Yes.  Here are a few libraries on my linux box:

libalsa2-1.0.15-0.rc1.4mdv2008.0  ABI=2, pkgver=1.0.15
libamarok0-scripts-1.4.7-9mdv2008.0   ABI=0, pkgver=1.4.7
libamrnb2-6.1.0.3-1plf2008.0  ABI=2, pkgver=6.1.0.3
libao2-0.8.8-2mdv2008.0   ABI=2, pkgver=0.8.8
libapplewm7-1.0.0-5mdv2008.0  ABI=7, pkgver=1.0.0
libavformats51-0.4.9-3.pre1.8994.2plf2008.0
  ABI=51, pkgver=0.4.9
libavutil49-0.4.9-3.pre1.8994.2plf2008.0
  ABI=49, pkgver=0.4.9

and that's just the liba*'s. Managing those numbers is part of
maintaining a library, and you do it in the Makefile[.am],
documentation, and (.spec|.deb|pkglist).  It's just part of the job.

In case you're wondering, here's the contents of
libavformats51-0.4.9-3.pre1.8994.2plf2008.0:

/usr/lib/libavformat.so.51<< SONAME, S = 51
/usr/lib/libavformat.so.51.12.1   << derived from -version-info. None
 of these numbers has anything to
 do with "0.4.9".
The -version-info 63:1:12 is managed completely independently of the
decision-making process for "hey, should we call this release 0.4.9 or
2.7.1? (except, of course, for the politeness aspect that (a) totally
random version numbers are stupid and something only Microsoft
w95/w98/Me/2k/XP/Vista/7 does, not a FOSS thing, and (b) it's nice to
*increment* (net "set equal to a specific value") the major version
number of the package when the SONAME changes due to internal ABI breakage.

> If developers and users are ok with X.Y.Z then the CURRENT, REVISION
> and AGE is a different scheme to learn and to implement in the build
> system: that need to be managed in parallel.

Yes, that's exactly what were trying to help you understand.  With the
exception of the "niceness" aspect above, *package* numbers are
basically marketing, even in FOSS. However, library interface numbers
are wholly TECHNICAL. If you change the code in /this way/ then the
library interface changes /that way/, according to specific rules; these
rules may then also drive a change in the SONAME.

> That's to say that if dev
> makes some changes in ABI and bumps the version up (say X.Y.Z+1),
> someone has to think about the weird libtool thing and update the
> libtool's versioning, making substractions and the like...

No, you've got it exactly backwards.  (Now, what happens during ongoing
CVS/git/hg/bzr development is different; the "rules" only apply for
actual releases.  Otherwise you just get way too many version number
changes for no purpose.  The point of library versioning is to foster
interoperatability across compatible *public* interfaces of your library
to *outside* clients.  So, really, you basically apply the rules below
during the runup to an actual release.  But, in principle:

If a developer changes the ABI, then the -version-info does NOT change
as X.Y.Z+1.  The developer must modify the -version-info according to
these rules:

== from libtool documentation 

  1. Start with version information of `0:0:0' for each libtool library.

  2. Update the version information only immediately before a public
 release of your software.  More frequent updates are unnecessary,
 and only guarantee that the current interface number gets larger
 faster.

  3. If the library source code has changed at all since the last
 update, then increment REVISION (`C:R:A' becomes `C:r+1:A').

  4. If any interfaces have been added, removed, or changed since the
 last update, increment CURRENT, and set REVISION to 0.

  5. If any interfaces have been added since the last public release,
 then increment AGE.

  6. If any interfaces have been removed since the last public release,
 then set AGE to 0.

   *_Never_* try to set the interface numbers so that they correspond
to the release number of your package. This is an abuse that only
fosters misunderstanding of the purpose of library versions.

*[ed: Read that paragraph again.  Go ahead.  I'll wait here.]

== from libtool documentation 

Okay, so you've done all that.  And now your team decides that it's time
to cut a release.  You need to pick the *package* version number.  This
is marketing (modulo the "nice" bump-majver-if-abi-changed behavior).

Pick a number.  Increment X. Increment Y. Increment Z.  do whatever you
want. It's NOT a technical decision.

> And no matter the operating system : on most the .so will have no
> number at all.

No, that's wrong.  The .so is just the linktime pointer that is found
when you link some client using -lfoo.  It points to the actual library,
which is (as 

Re: libtool versioning and ABI

2009-08-11 Thread Michel Briand

Charles Wilson  - Tue, 11 Aug 2009
14:50:33 -0400

>Michel Briand wrote:
>> This last variable is crafted
>
>"crafted"? This is your mistake.
>
>> to reflect the usual versioning. I.e. if
>> I want the version to 1.22.5,
>
>Why? Why do you CARE what the internal ABI version number is?  It's just
>a tag; you shouldn't care WHAT it is, only that it changes ONLY when it
>actual has to, to reflect binary (in)compatibility.  libfoo.so.27.1.2 is
>part of foo-3.1.2.  Big deal.  There's no need that it MUST be
>libfoo.so.3.1.2 with SONAME "libfoo.so.3"
>
>> I must put 23:5:22 in the _LTVERSION
>> variable (effectively doing substractions ;^^).
>
>No, you must change your GNU/Linux/ELF-centric thinking about shared
>libraries.
>

Please..

[...]

>
>   foo-1.7.2-version-info 15:2:5   SONAME libfoo.so.10  S = 10
>make one ABI-breaking change, and the "rules" say that version info becomes
>-version-info 16:0:0   SONAME libfoo.so.16  S = 16
>It's good manners to release this new version as
>   foo-2.0.0
>(not foo-16.0.0)

So ... that was a practical concern of me : how to manage those 2
parallel versioning systems ;)

>
>And your typical linux distribution would package the results as
>
>old:
>libfoo-devel-1.7.2--
>libfoo10-1.7.2--
>foo-1.7.2--
>
>new:
>libfoo-devel-2.0.0--
>libfoo16-2.0.0--
>foo-2.0.0--
>
>See? No relation between "1.7.2" and "10", nor between "2.0.0" and "16".
>
>--
>Chuck

Thank you, but, sorry, I'm not convinced. Remember what I said a
few mails ago: that's all of interface contract = same concept as
your...

Does anyone uses "10" or "16" to refer to their ABI ? Hum... So those
numbers have to be managed somewhere...

If developers and users are ok with X.Y.Z then the CURRENT, REVISION
and AGE is a different scheme to learn and to implement in the build
system: that need to be managed in parallel. That's to say that if dev
makes some changes in ABI and bumps the version up (say X.Y.Z+1),
someone has to think about the weird libtool thing and update the
libtool's versioning, making substractions and the like...

And no matter the operating system : on most the .so will have no
number at all.

Crafted: yes, crafted. Since I use X.Y.Z as a comprehensive label for
devs and users, I have to craft the C:R:A to reflect that...

So any practical method ?



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Charles Wilson
Michel Briand wrote:
> This last variable is crafted

"crafted"? This is your mistake.

> to reflect the usual versioning. I.e. if
> I want the version to 1.22.5,

Why? Why do you CARE what the internal ABI version number is?  It's just
a tag; you shouldn't care WHAT it is, only that it changes ONLY when it
actual has to, to reflect binary (in)compatibility.  libfoo.so.27.1.2 is
part of foo-3.1.2.  Big deal.  There's no need that it MUST be
libfoo.so.3.1.2 with SONAME "libfoo.so.3"

> I must put 23:5:22 in the _LTVERSION
> variable (effectively doing substractions ;^^).

No, you must change your GNU/Linux/ELF-centric thinking about shared
libraries.

==
7.4 Managing release information


Often, people want to encode the name of the package release into the
shared library so that it is obvious to the user which package their
programs are linked against.  This convention is used especially on
GNU/Linux:

 trick$ ls /usr/lib/libbfd*
 /usr/lib/libbfd.a   /usr/lib/libbfd.so.2.7.0.2
 /usr/lib/libbfd.so
 trick$

   On `trick', `/usr/lib/libbfd.so' is a symbolic link to
`libbfd.so.2.7.0.2', which was distributed as a part of
`binutils-2.7.0.2'.

Unfortunately, this convention conflicts directly with libtool's
idea of library interface versions, because the library interface
rarely changes at the same time that the release number does, and the
library suffix is never the same across all platforms.
==

Basically, you are accustomed to a particular quirk of ELF DSOs and the
way Linux distributors have been packaging them.  But that "quirk" is
NOT a fundamental part of the idea of shared libraries -- and they do
not work that way on many, many platforms.

The SONAME should distinguish the major (ABI breaking) versions of the
library.  When FOSS projects are *careful*, many times this does, in
fact, correspond with actual major releases of the package itself.
(e.g. foo-2.x.y breaks binary compatibility with foo-1.x.y).

They are not always careful.

And, just because ABI compatibility is preserved on one specific class
of system (32bit GNU/Linux) does not mean that 1.x+1.y or even 1.x.y+1
doesn't break ABI compatibility on some other system.

ABI version != package version. Stop thinking that they are. (It is, of
course, good manners to *bump* the major package version when you
deliberately modify the ABI.  But just because "change package version
from X.Y.Z to X+1.Y.Z, whenever SONAME S changes", that doesn't mean
that X = S.  In fact, if you are using libtool, many times the SONAME
will jump by more than one:

   foo-1.7.2-version-info 15:2:5   SONAME libfoo.so.10  S = 10
make one ABI-breaking change, and the "rules" say that version info becomes
-version-info 16:0:0   SONAME libfoo.so.16  S = 16
It's good manners to release this new version as
   foo-2.0.0
(not foo-16.0.0)

And your typical linux distribution would package the results as

old:
libfoo-devel-1.7.2--
libfoo10-1.7.2--
foo-1.7.2--

new:
libfoo-devel-2.0.0--
libfoo16-2.0.0--
foo-2.0.0--

See? No relation between "1.7.2" and "10", nor between "2.0.0" and "16".

--
Chuck


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Ralf Wildenhues
* Michel Briand wrote on Tue, Aug 11, 2009 at 07:53:50PM CEST:
> Yes non-Linux system will have a different scheme. But if libtool wants
> to help I'm sure a little more documentation could easier the task :).

> # create shared lib
> mylib_la_LDFLAGS = -version-info $(MYLIB_LTVERSION)
> 
> This last variable is crafted to reflect the usual versioning. I.e. if
> I want the version to 1.22.5, I must put 23:5:22 in the _LTVERSION
> variable (effectively doing substractions ;^^).

But you are fooling yourself and your users that your version is 1.22.5,
because it isn't.  It only comes out that way on GNU/Linux.  You cannot
have the same version number on different systems while using
-version-info, the other systems' semantics simply can not all be mapped
to the same set of numbers (within the scheme that Libtool uses).

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Michel Briand

Ralf Wildenhues  - Tue, 11 Aug 2009 19:34:09
+0200

>Hello Michel,
>
>* Michel Briand wrote on Thu, Aug 06, 2009 at 12:46:00AM CEST:
>> Personally I've always seen interface as a contract.
>> A contract between a library writer and library user.
>
>Yes.
>
>> Why does libtool want to interfere with this ... has always made me
>> scratching my head
>
>libtool allows you to exploit the versioning capabilities of the runtime
>linkers on different systems.  Not all the world is a GNU/Linux box, and
>some non-glibc runtime linkers have different versioning semantics.
>
>> Since it's a contract, ABI changes fall into the contract agreement. So
>> why bother with complex versionning and error-prone version
>> manipulations with substraction
>
>*You* the developer that uses libtool shouldn't ever need to use
>subtraction.  libtool does that for you.
>
>> The difficult, and somehow messy, scheme of libtool versioning is
>> boring and uneasy : developers do not understand this different way
>> that overlap with the classical, natural and contractual scheme (X.Y.Z
>> that one can still use with the -release flag) ; and this create
>> additional work to handle package version (official, classical) in
>> parallel with libtool -version-info scheme.
>> 
>> Or I'm completely wrong but the documentation lacks some clues
>> about what is this all about ;)))
>
>Yes, you are wrong.  You are simply doing non-GNU/Linux users a
>disservice, by effectively disabling library versioning capabilities for
>them.  I'm not sure how to best explain that to you.
>

Hum... ^^

Yes non-Linux system will have a different scheme. But if libtool wants
to help I'm sure a little more documentation could easier the task :).

Currently I use on some projects the following Makefile.am snippet:

MYLIB_VERSION=$(...)
MYLIB_LTVERSION=$(...)

# update .c file with MYLIB_VERSION for runtime checking...

# create shared lib
mylib_la_LDFLAGS = -version-info $(MYLIB_LTVERSION)

This last variable is crafted to reflect the usual versioning. I.e. if
I want the version to 1.22.5, I must put 23:5:22 in the _LTVERSION
variable (effectively doing substractions ;^^).

Any way more simple ?

Cheers,
Michel




___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Ralf Wildenhues
Hello Joseph,

* Joseph Garvin wrote on Wed, Aug 05, 2009 at 11:32:31PM CEST:
> I read a description of libtool's versioning here:
> 
> http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
> 
> What's confusing to me is that this way of handling versioning doesn't seem
> to pay attention to ABI. It mentions bumping numbers for interface changes
> (API) but not for changing size of data structures, editing the contents of
> inline functions, etc.

The term "interfaces" is defined in the node 'info Libtool Interfaces'.
It currently doesn't mention inline functions or data structures.  A
patch to list them would be good; but especially for C, warnings should
be added that you should better just refrain from exposing data objects
directly to your users at all: it's better to use an opaque handle, that
way you don't have to deal with an incompatible change if you change
your object layout or contents.  Furthermore, on w32, the automatic
dll exporting feature of binutils ld doesn't work with data objects, so
you can easily run into ugly troubles there.  (Never mind that libltdl
is doing this, too, which was a big mistake.)

Also, in C (unlike in C++), inline functions are a bit of a problem
because of the various inline semantics, so I would recommend against
them, too.

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-11 Thread Ralf Wildenhues
Hello Michel,

* Michel Briand wrote on Thu, Aug 06, 2009 at 12:46:00AM CEST:
> Personally I've always seen interface as a contract.
> A contract between a library writer and library user.

Yes.

> Why does libtool want to interfere with this ... has always made me
> scratching my head

libtool allows you to exploit the versioning capabilities of the runtime
linkers on different systems.  Not all the world is a GNU/Linux box, and
some non-glibc runtime linkers have different versioning semantics.

> Since it's a contract, ABI changes fall into the contract agreement. So
> why bother with complex versionning and error-prone version
> manipulations with substraction

*You* the developer that uses libtool shouldn't ever need to use
subtraction.  libtool does that for you.

> The difficult, and somehow messy, scheme of libtool versioning is
> boring and uneasy : developers do not understand this different way
> that overlap with the classical, natural and contractual scheme (X.Y.Z
> that one can still use with the -release flag) ; and this create
> additional work to handle package version (official, classical) in
> parallel with libtool -version-info scheme.
> 
> Or I'm completely wrong but the documentation lacks some clues
> about what is this all about ;)))

Yes, you are wrong.  You are simply doing non-GNU/Linux users a
disservice, by effectively disabling library versioning capabilities for
them.  I'm not sure how to best explain that to you.

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-05 Thread Bob Friesenhahn

On Thu, 6 Aug 2009, Michel Briand wrote:

Personally I've always seen interface as a contract.
A contract between a library writer and library user.


The API is the compile-time contract and the ABI is the run-time 
contract.


Since it's a contract, ABI changes fall into the contract agreement. 
So why bother with complex versionning and error-prone version 
manipulations with substraction


This is supposed to make things easier.


The difficult, and somehow messy, scheme of libtool versioning is
boring and uneasy : developers do not understand this different way
that overlap with the classical, natural and contractual scheme (X.Y.Z
that one can still use with the -release flag) ; and this create
additional work to handle package version (official, classical) in
parallel with libtool -version-info scheme.


The goal is to allow libraries to be updated without needing to 
rebuild all applications which link against a library with that name. 
There is also a goal to allow incompatable libraries to live side by 
side so that applications which need different libraries can live on 
the same system.



Or I'm completely wrong but the documentation lacks some clues
about what is this all about ;)))


Libtool did not invent these issues.  Different operating systems 
provide varying capabilities and methods for dealing with library 
versions.


Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-05 Thread Michel Briand

Joseph Garvin  - Wed, 5 Aug 2009 17:02:18
-0500

>On Wed, Aug 5, 2009 at 4:46 PM, Bruce Korb  wrote:
>
>> On Wed, Aug 5, 2009 at 2:32 PM, Joseph Garvin
>> wrote:
>> > I read a description of libtool's versioning here:
>> >
>> >
>> http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
>> >
>> > What's confusing to me is that this way of handling versioning doesn't
>> seem
>> > to pay attention to ABI. It mentions bumping numbers for interface
>> changes
>> > (API) but not for changing size of data structures, editing the contents
>> of
>> > inline functions, etc.
>>
>> Those surely sound like rule 4 to me:
>> > If any interfaces have been added, removed, or changed since
>> > the last update, increment current, and set revision to 0.
>>
>> changing structures or funtional interfaces (inline functions),
>> surely is an interface change.
>
>
>From an OOP standpoint private members are hidden implementation details,
>and aren't usually considered to be part of the 'interface' (public members
>and member functions) to a class, thus my confusion. Different community,
>different parlance.
>
>... But that still doesn't make sense. If I only add (don't remove functions
>or change existing signatures) to my interfaces, I still bump the current
>number according to that rule. But adding to an interface doesn't
>necessarily break ABI. So if current-bumps indicate ABI changes, I'm telling
>people ABI has broken when it actually hasn't. I don't understand.

Personally I've always seen interface as a contract.
A contract between a library writer and library user.

Why does libtool want to interfere with this ... has always made me
scratching my head

Since it's a contract, ABI changes fall into the contract agreement. So
why bother with complex versionning and error-prone version
manipulations with substraction

The difficult, and somehow messy, scheme of libtool versioning is
boring and uneasy : developers do not understand this different way
that overlap with the classical, natural and contractual scheme (X.Y.Z
that one can still use with the -release flag) ; and this create
additional work to handle package version (official, classical) in
parallel with libtool -version-info scheme.

Or I'm completely wrong but the documentation lacks some clues
about what is this all about ;)))

My 2 cents.





___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-05 Thread Bob Friesenhahn

On Wed, 5 Aug 2009, Joseph Garvin wrote:


... But that still doesn't make sense. If I only add (don't remove functions
or change existing signatures) to my interfaces, I still bump the current
number according to that rule. But adding to an interface doesn't
necessarily break ABI. So if current-bumps indicate ABI changes, I'm telling
people ABI has broken when it actually hasn't. I don't understand.


If you only add new interfaces while preserving existing interfaces 
then you should increment 'current' as well as 'age'.  This indicates 
that you support version 'current' as well older ones spanning. 
'current-age'.


Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-05 Thread Bob Friesenhahn

On Wed, 5 Aug 2009, Bruce Korb wrote:


Those surely sound like rule 4 to me:

If any interfaces have been added, removed, or changed since
the last update, increment current, and set revision to 0.


changing structures or funtional interfaces (inline functions),
surely is an interface change.


Actually, it also needs to include rule 6 in order to work.  The end 
result should be a new 'current' version with 'age' set to 0.


Inline functions become part of the user's application/library so they 
don't normally count as part of the API, but they might still be 
exposed if the compiler fails to inline them, in which case they do 
become part of the API.


Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-05 Thread Joseph Garvin
On Wed, Aug 5, 2009 at 4:46 PM, Bruce Korb  wrote:

> On Wed, Aug 5, 2009 at 2:32 PM, Joseph Garvin
> wrote:
> > I read a description of libtool's versioning here:
> >
> >
> http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
> >
> > What's confusing to me is that this way of handling versioning doesn't
> seem
> > to pay attention to ABI. It mentions bumping numbers for interface
> changes
> > (API) but not for changing size of data structures, editing the contents
> of
> > inline functions, etc.
>
> Those surely sound like rule 4 to me:
> > If any interfaces have been added, removed, or changed since
> > the last update, increment current, and set revision to 0.
>
> changing structures or funtional interfaces (inline functions),
> surely is an interface change.


>From an OOP standpoint private members are hidden implementation details,
and aren't usually considered to be part of the 'interface' (public members
and member functions) to a class, thus my confusion. Different community,
different parlance.

... But that still doesn't make sense. If I only add (don't remove functions
or change existing signatures) to my interfaces, I still bump the current
number according to that rule. But adding to an interface doesn't
necessarily break ABI. So if current-bumps indicate ABI changes, I'm telling
people ABI has broken when it actually hasn't. I don't understand.
___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and ABI

2009-08-05 Thread Bruce Korb
On Wed, Aug 5, 2009 at 2:32 PM, Joseph Garvin wrote:
> I read a description of libtool's versioning here:
>
> http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
>
> What's confusing to me is that this way of handling versioning doesn't seem
> to pay attention to ABI. It mentions bumping numbers for interface changes
> (API) but not for changing size of data structures, editing the contents of
> inline functions, etc.

Those surely sound like rule 4 to me:
> If any interfaces have been added, removed, or changed since
> the last update, increment current, and set revision to 0.

changing structures or funtional interfaces (inline functions),
surely is an interface change.


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Libtool versioning for the Git repository

2008-10-08 Thread Jeremiah Wilson
All right, I'll try doing that. Thank you.



- Original Message 
From: Eric Blake <[EMAIL PROTECTED]>
To: libtool@gnu.org
Sent: Wednesday, October 8, 2008 3:32:27 PM
Subject: Re: Libtool versioning for the Git repository

Jeremiah Wilson  yahoo.com> writes:

[your formatting is messed up in this reply, because you didn't send plain text]

> 
> 
> I think that instead of having the more recent version at the end of the 
version string, it should be in front of the parentheses.So, instead of:
> libtool (GNU libtool 1.3016 2008-10-05) 2.2.7a
> I propose: libtool 2.2.7a (GNU libtool 1.3016 2008-10-05)

Unfortunately, this proposal violates GNU Coding Standards:
http://www.gnu.org/software/automake/manual/standards.html#g_t_002d_002dversion

> The reason for this is that certain programs(Gnash BZR repository, Subversion 
SVN repository, etc.) appear to look inside the parentheses for the libtool 
version,

I suggest reporting that as a bug to those programs, then.

-- 
Eric Blake






___
http://lists.gnu.org/mailman/listinfo/libtool


  ___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Libtool versioning for the Git repository

2008-10-08 Thread Eric Blake
Jeremiah Wilson  yahoo.com> writes:

[your formatting is messed up in this reply, because you didn't send plain text]

> 
> 
> I think that instead of having the more recent version at the end of the 
version string, it should be in front of the parentheses.So, instead of:
> libtool (GNU libtool 1.3016 2008-10-05) 2.2.7a
> I propose: libtool 2.2.7a (GNU libtool 1.3016 2008-10-05)

Unfortunately, this proposal violates GNU Coding Standards:
http://www.gnu.org/software/automake/manual/standards.html#g_t_002d_002dversion

> The reason for this is that certain programs(Gnash BZR repository, Subversion 
SVN repository, etc.) appear to look inside the parentheses for the libtool 
version,

I suggest reporting that as a bug to those programs, then.

-- 
Eric Blake





___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Libtool versioning for the Git repository

2008-10-08 Thread Ralf Wildenhues
Hi Jeremiah,

thanks for the report.  I was not aware of this.

* Jeremiah Wilson wrote on Wed, Oct 08, 2008 at 08:49:47PM CEST:
> I think that instead of having the more recent version at the end of
> the version string, it should be in front of the parentheses.
> 
> So, instead of: libtool (GNU libtool 1.3016 2008-10-05) 2.2.7a
> 
> I propose: libtool 2.2.7a (GNU libtool 1.3016 2008-10-05)
> 
> The reason for this is that certain programs(Gnash BZR repository,
> Subversion SVN repository, etc.) appear to look inside the parentheses
> for the libtool version, which subsequently causes the autogen script
> to either fail or use the version of libtool inside the parentheses.

Can you post an example failure that is caused by this, including
package this happens with, commands called, and output copy'n'pasted?

Thanks!
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and sonames

2007-10-28 Thread Ralf Wildenhues
* Andreas Metzler wrote on Sun, Oct 28, 2007 at 01:28:54PM CET:
> 
> Are there libtool-supported archs whose versioning will break if we do
> this
> num   c   r   a
> 2.1.1 22  1   9
> 2.1.2 14  0   0
> 
> instead of
> num   c   r   a
> 2.1.1 22  1   9
> 2.1.2 23  0   0
> 
> (I know it would work on linux, resulting in libgnutls.so.14.)

I think on FreeBSD it will cause a backward jump from libgnutls.so.22 to
libgnutls.so.14.

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and sonames

2007-10-28 Thread Andreas Metzler
Ralf Wildenhues <[EMAIL PROTECTED]> wrote:
> * Andreas Metzler wrote on Sun, Oct 28, 2007 at 09:34:25AM CET:
>> [...] However, the way libtool
>> tries to represent this information in sonames (on Linux) is rather
>> strange, it goes straight from libgnutls.so.13 to libgnutls.so.23. Is
>> this huge jump just bug or is there a reason for it?

> The reason for it is simplicity in the version number calculation.
> There is no requirement for version numbers to be consecutive except
> for "consecutive looks nicer" and the finite number space.  I assume
> its pressure to be far lower than the incompatible change a different
> version number calculation would make.

Hello,
Thanks for the explanation.

> The way libtool computes them, it even causes different major version
> numbers on different systems, so the above jump is even specific to the
> linux version_type and not all types.

I have somehow managed the evade the real question:

Are there libtool-supported archs whose versioning will break if we do
this
num c   r   a
2.1.1   22  1   9
2.1.2   14  0   0

instead of
num c   r   a
2.1.1   22  1   9
2.1.2   23  0   0

(I know it would work on linux, resulting in libgnutls.so.14.)
thanks, cu andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool versioning and sonames

2007-10-28 Thread Ralf Wildenhues
Hello Andreas,

* Andreas Metzler wrote on Sun, Oct 28, 2007 at 09:34:25AM CET:
> 
> [...] However, the way libtool
> tries to represent this information in sonames (on Linux) is rather
> strange, it goes straight from libgnutls.so.13 to libgnutls.so.23. Is
> this huge jump just bug or is there a reason for it?

The reason for it is simplicity in the version number calculation.
There is no requirement for version numbers to be consecutive except
for "consecutive looks nicer" and the finite number space.  I assume
its pressure to be far lower than the incompatible change a different
version number calculation would make.

The way libtool computes them, it even causes different major version
numbers on different systems, so the above jump is even specific to the
linux version_type and not all types.

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool