Bug 1499928 - rbconfig doesn't have config key for SONAME
Summary: rbconfig doesn't have config key for SONAME
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: ruby
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeroen van Meeuwen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-09 15:13 UTC by Ben Boeckel
Modified: 2018-05-29 11:54 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:54:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ben Boeckel 2017-10-09 15:13:09 UTC
Description of problem:
Vim doesn't detect that it has Ruby support because it is looking for /usr/lib64/libruby.so.2.4.1 but the current Ruby package provides /usr/lib64/libruby.so.2.4.2.

Version-Release number of selected component (if applicable):
vim-enhanced-8.0.1176-1.fc26.x86_64
ruby-libs-2.4.2-84.fc26.x86_64

Comment 1 Zdenek Dohnal 2017-10-09 17:36:30 UTC
Hi,

current Ruby in stable is 2.4.1, which VIM is built with. Ruby package has Provides: libruby.so.2.4()(64bit) , so looking even for lower version will work, when newer Ruby will become stable. If not, please give me steps how you found out this problem and how to reproduce it. However, I build and release VIm in every situation possible, so possible rebuild will be in week at least. For now closing as NOTABUG, feel free to reopen with more info.

Comment 2 Ben Boeckel 2017-10-09 20:23:05 UTC
My Ruby-using plugins started erroring out that `has('ruby')` was false. Using strace, it was trying to read the `.2.4.1` file. Seen here by using `strings`:

% strings =vim | grep libruby
libruby.so.2.4.1

Meanwhile, I have 2.4.2 (which I see now is currently in `updates-testing`), so it'd be nice if a new build of Vim could follow it soon after it lands (or be added to the build override set if possible).

I've fixed it locally by adding a symlink from the 2.4.1 path to the 2.4.2 library. Maybe Vim should store and try to load from the SONAME path instead of the SOVERSION path?

Comment 3 Vít Ondruch 2017-10-10 08:20:13 UTC
Hi, could you please be more specific about plugins you are use? I remember that command-t had such strict version checks:

https://github.com/wincent/command-t/issues/192

You probably want to use packaged vim-command-t instead ...

Comment 4 Ben Boeckel 2017-10-10 13:18:40 UTC
That isn't the problem. I also have LustyBuffer and LustyJuggler which didn't work due to a lack of Ruby support. Without the symlink I put into place, `has('ruby')` returns 0 because it is looking for a file which doesn't exist now that Ruby has bumped its minor version number.

Comment 5 Vít Ondruch 2017-10-11 11:13:56 UTC
It appears to me that the issue is the modified libruby soname. That simply should never happened. It should always be libruby.so.2.4.0 for Ruby 2.4.x. I reported this Ruby upstream [1].


[1] https://bugs.ruby-lang.org/issues/14002

Comment 6 Ben Boeckel 2017-10-11 12:03:45 UTC
The SONAME for libruby.so.2.4.2 *is* libruby.so.2.4. The SOVERSION is a different thing (the SONAME path is a symlink to the SOVERSION implementation of that SONAME). Vim should open it by SONAME, not SOVERSION.

Comment 7 Mamoru TASAKA 2017-10-11 12:58:43 UTC
As Ben says SONAME of libruby.so.2.4.2 is libruby.so.2.4 so there is no problem as long as SONAME stays as libruby.so.2.4 during ruby 2.4.x series and there is correct symlink.

Comment 8 Ben Boeckel 2017-10-11 13:26:42 UTC
Looking at Vim's configure code, it is asking RbConfig::CONFIG['LIBRUBY_SO'] for this path. I only see the SONAME under LIBRUBY_ALIASES (requiring a split on whitespace and taking the first entry AFAICT). I don't know of its cross-platform behavior. I'll try making a PR to Vim upstream.

Comment 9 Mamoru TASAKA 2017-10-11 13:28:30 UTC
Perhaps the reason for this is:
* vim compilation stage sets '-DDYNAMIC_RUBY_DLL=\"libruby.so.2.4.2\"' :
  see
  https://kojipkgs.fedoraproject.org//packages/vim/8.0.1184/1.fc28/data/logs/x86_64/build.log
  and
  https://github.com/vim/vim/blob/master/src/configure.ac#L1907

* and it comes from $ ruby -rrbconfig -e "puts RbConfig::CONFIG['LIBRUBY_SO']" :
  https://github.com/vim/vim/blob/master/src/configure.ac#L1905

* then the result is embedded to the vim code directly:
  https://github.com/vim/vim/blob/master/src/option.c#L2336

Apparently vim should use -DDYNAMIC_RUBY_DLL=\"libruby.so.2.4\" instead, however modifying configure seems a bit troublesome.

Comment 10 Ben Boeckel 2017-10-11 13:35:47 UTC
See https://github.com/vim/vim/pull/2199.

I looked at the other dynamic language support required by Vim and Perl has a similar issue in that `perl-devel` is actually required in order to use it since it loads `libperl.so` instead of `libperl.so.5.24`.

Comment 11 Vít Ondruch 2017-10-11 14:05:45 UTC
IMO, VIM is using the right variable from RbConfig and the content of the variable is wrong. You both says that the "libruby.so.2.4" is the SONAME, so why is it listed among aliases and not as LIBRUBY_SO. I would hold any action prior Ruby upstream provides their input.

Comment 12 Zdenek Dohnal 2017-10-11 14:35:12 UTC
I agree with Vít, this code is in VIM since version 7.3.678 and worked since then. Issue is raised by Ruby, because upstream moved from not bumping soname patch number through one minor release to bumping it even for patch release. Let's wait for Ruby upstream answer. If fix wouldn't be possible in Ruby, then it should be fixed in VIm (and in every other application, which uses rbconfig::CONFIG['LIBRUBY_SO'] for getting SONAME).

Comment 13 Zdenek Dohnal 2017-10-11 14:36:19 UTC
Until we get answer from Ruby upstream, moving this to Ruby people.

Comment 14 Ben Boeckel 2017-10-11 17:47:19 UTC
The latest summary is wrong. The soname doesn't contain the patch (or tweak as upstream calls it) version at all.

Comment 15 Zdenek Dohnal 2017-10-12 06:17:46 UTC
libruby-2.4.2.so - 2 is major release number, 4 is minor release number, 2 is patch release number.

Comment 16 Zdenek Dohnal 2017-10-12 11:09:21 UTC
Vim upstream accepted patch with splitting output of rbconfig[LIBRUBY_ALIAS]. I still think this should be at least solved in Ruby by adding config key, which will give you exact value libruby.so.$(major).$(minor) or libruby.so (such value as SONAME should be accessible directly, not by splitting output).
Until Ruby upstream clarifies it, I'll leave this summary as it is and bugzilla will stay opened.

Comment 17 Zdenek Dohnal 2017-10-16 15:15:19 UTC
Ruby upstream will stay with bumping teeny number, because changes between releases disrupt strict ABI (that's how Ruby upstream interprets reason, why teeny bump is needed).
Changing this bugzilla summary to "rbconfig doesn't have config key for SONAME"

Comment 18 Ben Boeckel 2017-10-16 17:14:04 UTC
OK, the summary is finally correct :) .

As a sidenote, Ruby isn't breaking ABI by adding functions; we'd be on libc.so.10000 otherwise by now. Mucking with internals also isn't a problem; as long as behavior for code compiled against a previous version still works, the ABI is maintained.

Anyways, the Vim patch is required anyways since a Ruby version with the SONAME key doesn't exist yet.

Comment 19 Zdenek Dohnal 2017-10-17 07:52:48 UTC
Vim will be rebuilt in next testing update, I'll send build here.

Comment 20 Vít Ondruch 2017-10-17 08:06:02 UTC
The patch was applied in Ruby trunk and is going to be backported into Ruby 2.4, it would be better to patch Ruby, wouldn't be? And possibly revert the vim upstream patch ...

Comment 21 Ben Boeckel 2017-10-17 14:22:13 UTC
The Vim patch is still required for older versions of Ruby. Vim should be patched to use the new key and if it isn't available, fallback to the old logic.

Comment 22 Zdenek Dohnal 2017-10-17 17:18:25 UTC
I should mention - Vim will be rebuilt with current version of Ruby in buildroot - it means with ruby-2.4.1 in F26, because there isn't newer version in buildroot for F26.

Comment 23 Fedora End Of Life 2018-05-03 08:31:55 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 24 Fedora End Of Life 2018-05-29 11:54:23 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.