Issue #14002 has been updated by zdohnal (Zdenek Dohnal).


jeremyevans0 (Jeremy Evans) wrote:
> nobu (Nobuyoshi Nakada) wrote:
> > zdohnal (Zdenek Dohnal) wrote:
> > > 1) stop bumping teeny number of soname like it was done in the past (I don't see reason why bumping soname number - changing soname should indicate change API/ABI, which makes applications, which uses Ruby, non-functional, so these application needs to be rebuild with new Ruby). Or there weren't such changes between teeny releases in the past like they are now between 2.4.0 and 2.4.1, and 2.4.1 and 2.4.2?
> > 
> > I think there were no such changes.
> 
> There may not have been API changes, but there were definitely ABI changes between 2.4.1 and 2.4.2.  If you add a non-static function to the shared object, that's a minor bump.  Any removal of a non-static function from the shared object,  any change in the number, order, type, or size of arguments or change to the return type to a non-static function in the shared object, or any modification to the number, order, or size of members in a struct that is passed to or returned from a non-static function in the shared object, that is a major bump.
> 
> Between 2.4.1 and 2.4.2, there were at least the following ABI changes:
> 
> Added functions (minor bump):
> 
> ```diff
> +int rb_block_min_max_arity(int *max);
> +VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
> +        rb_block_call_func_t bl_proc, int min_argc, int max_argc,
> +        VALUE data2);
> ```
> 
> Modified function to add arguments (major bump):
> 
> ```diff
> -VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val);
> +VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc);
> ```

So similar changes weren't in previous teeny releases like 2.3.0., 2.3.1 etc., so last number in library name didn't change and stayed 0?

> 
> Now, you may say that external users should not be calling these functions.  And that's probably true, since they aren't in a public header file (no API change).  But that doesn't change the fact that the ABI did change between teeny versions.
> 
> If you want to keep a strict stable ABI (no change to the major or minor in the shared object filename), you cannot add, remove, or modify non-static functions.  This can make it infeasible or much more difficult to backport fixes, so can I understand why it would not be a high priority or even a worthwhile tradeoff.  All a strict stable ABI gives you is:
> 
> 1) any code linked against an earlier version will work with a later version (no major bumps, minor bumps are OK)
> 2) any code linked against a later version will work with an earlier version (no major or minor bumps)
> 
> Even if you are just concerned about functions that appear in public header files, there have been functions added to them in teeny versions, such as "VALUE rb_big_hash(VALUE)" added to ruby/intern.h in 2.3.2 (it switched from being static to being non-static in bignum.c at the same time).

What I would like Ruby to achieve is consistency - why have you started bumping last number in library name, when it wasn't done in the past? Was there an issue which raised it? If it wasn't, IMHO it is no need for change without reason, especially when it can break something, and stay with 'not bumping last number of library name between teeny releases'.

----------------------------------------
Bug #14002: libruby soname is changing in Ruby 2.4.x while it should always be libruby.so.2.4.0
https://bugs.ruby-lang.org/issues/14002#change-67218

* Author: vo.x (Vit Ondruch)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
* Backport: 2.3: UNKNOWN, 2.4: REQUIRED
----------------------------------------
Since the Ruby 2.4.x keeps ABI compatibility with Ruby 2.4.0 (I hope at least), the so name should keep the libruby.so.2.4.0 during the whole Ruby 2.4 lifetime. This always used to be true, while in Ruby 2.4, the soname is surprisingly changing (and it affects Fedora users [1]).

Actually this is not just about the soname, the RbConfig::CONFIG["TEENY"] value is impacted by this as well. This was always "0" since the patch releases were abandoned. But now it changes.

I tried to revert r53566, r53500 and r5347 but apparently, this was not enough :/


[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1499928



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>