Project

General

Profile

Bug #13931

correct install_name of libruby on macOS (libruby.2.5.0.dylib -> libruby.2.5.dylib)

Added by kimuraw (Wataru Kimura) almost 2 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-09-23 trunk 60002) [x86_64-darwin16]
[ruby-dev:<unknown>]

Description

ruby-dev:50256 で質問した件です。

ruby-2.4以降ではlibrubyのファイル名に実際のリリースバージョンのTEENYが反映されるようになったようですが
macOS上でlibrubyのinstall name(linuxでのsoname相当)がTEENYを含んだもののため、
rubyを2.4.1から2.4.2など更新すると以前のバージョンで作成した拡張ライブラリでLoadErrorが発生します。

linuxなどではsonameをTEENYを含まないものにしているようですので、
macOSでも同様にするのがよいと思います。

# ubuntu
$ uname -sr
Linux 3.16.0-4-amd64
$ objdump -p libruby.so.2.4.2 | grep SONAME
  SONAME               libruby.so.2.4
# macOS
$ uname -sr  
Darwin 16.7.0
$ otool -D libruby.2.4.2.dylib
libruby.2.4.2.dylib:
/Users/kimuraw/tmp_ruby/ruby24/lib/libruby.2.4.2.dylib # <= includes TEENY in "install name"

trunkと2.4で起きています。
2.3以前はlibrubyのファイル名のTEENYは常に"0"ですので問題ありません。

trunk r60002のconfigure.inへのパッチを添付します。


Files

configure.in.diff (672 Bytes) configure.in.diff kimuraw (Wataru Kimura), 09/23/2017 11:37 AM

Associated revisions

Revision 2c644a50
Added by nobu (Nobuyoshi Nakada) almost 2 years ago

configure.in: install_name without teeny

  • configure.in (RUBY_API_VERSION): remove teeny from install_name to allow link extension libraries for the same minor version. patched by kimuraw (Wataru Kimura) at [ruby-dev:50262]. [Bug #13931]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 60018
Added by nobu (Nobuyoshi Nakada) almost 2 years ago

configure.in: install_name without teeny

  • configure.in (RUBY_API_VERSION): remove teeny from install_name to allow link extension libraries for the same minor version. patched by kimuraw (Wataru Kimura) at [ruby-dev:50262]. [Bug #13931]

Revision 60018
Added by nobu (Nobuyoshi Nakada) almost 2 years ago

configure.in: install_name without teeny

  • configure.in (RUBY_API_VERSION): remove teeny from install_name to allow link extension libraries for the same minor version. patched by kimuraw (Wataru Kimura) at [ruby-dev:50262]. [Bug #13931]

Revision 60018
Added by nobu (Nobuyoshi Nakada) almost 2 years ago

configure.in: install_name without teeny

  • configure.in (RUBY_API_VERSION): remove teeny from install_name to allow link extension libraries for the same minor version. patched by kimuraw (Wataru Kimura) at [ruby-dev:50262]. [Bug #13931]

Revision 2aab471a
Added by usa (Usaku NAKAMURA) 10 months ago

merge revision(s) 60018: [Backport #13931]

    configure.in: install_name without teeny

    * configure.in (RUBY_API_VERSION): remove teeny from install_name
      to allow link extension libraries for the same minor version.
      patched by kimuraw (Wataru Kimura) at [ruby-dev:50262].
      [Bug #13931]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@65112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 65112
Added by usa (Usaku NAKAMURA) 10 months ago

merge revision(s) 60018: [Backport #13931]

configure.in: install_name without teeny

* configure.in (RUBY_API_VERSION): remove teeny from install_name
  to allow link extension libraries for the same minor version.
  patched by kimuraw (Wataru Kimura) at [ruby-dev:50262].
  [Bug #13931]

History

#1

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r60018.


configure.in: install_name without teeny

  • configure.in (RUBY_API_VERSION): remove teeny from install_name to allow link extension libraries for the same minor version. patched by kimuraw (Wataru Kimura) at [ruby-dev:50262]. [Bug #13931]

Updated by tmm1 (Aman Gupta) 12 months ago

  • Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: REQUIRED

Updated by usa (Usaku NAKAMURA) 10 months ago

  • Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: REQUIRED to 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE

ruby_2_4 r65112 merged revision(s) 60018.

#4

Updated by usa (Usaku NAKAMURA) 10 months ago

  • Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE to 2.3: WONTFIX, 2.4: UNKNOWN, 2.5: UNKNOWN

Also available in: Atom PDF