Project

General

Profile

Actions

Bug #9160

closed

configureに--with-rubylibprefixを指定するとrbconfigのprefixが空文字になる

Added by kimuraw (Wataru Kimura) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-11-26 trunk 40765) [x86_64-darwin13.0]
[ruby-dev:47819]

Description

=begin
== 現象

configureに--with-rubylibprefixを指定したとき、
RbConfig::CONFIG['prefix']および関連するbindirなどのprefixが空文字になってしまいます。

% ruby -rrbconfig -e 'p RbConfig::CONFIG["prefix"]'
""
% ruby -rrbconfig -e 'p RbConfig::CONFIG["bindir"]'
"/bin"
% ruby -rrbconfig -e 'p RbConfig.ruby'   
"/bin/ruby"

2.1.0-preview2とtrunk r43859で発生することを確認しています。
2.0.0-p353と1.9.3-p484では起きていません。

rbconfig.rbのはじめのほうでTOPDIRを定義しているところで

TOPDIR = File.dirname(__FILE__).chomp!("/usr/local/lib/ruby21/2.1.0/x86_64-darwin13.0")

のようにprefix付きになってしまうことが原因のようです。
configureで--with-rubylibprefxを指定しなかった場合は、
chomp!("/lib/ruby/...")のようにprefixを除いた文字列になっています。

== 再現手順

% ./configure --with-rubylibprefix=/usr/local/lib/ruby21
% make ruby
% grep -n TOPDIR ./rbconfig.rb
9:  TOPDIR = File.dirname(__FILE__).chomp!("/usr/local/lib/ruby21/2.1.0/x86_64-darwin13.0")
19:  CONFIG["prefix"] = (TOPDIR || DESTDIR + "/usr/local")
% 

=end


Files

configure.in.diff (1.51 KB) configure.in.diff kimuraw (Wataru Kimura), 12/14/2013 02:32 PM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #18373: Bundled gem (RBS, debug) extensions are not properly builtClosednobu (Nobuyoshi Nakada)Actions

Updated by kimuraw (Wataru Kimura) almost 11 years ago

configure.inへのパッチを作りました。
libdirと同じようにexec_prefixで置き換えを行うようにします。

Actions #2

Updated by nobu (Nobuyoshi Nakada) almost 11 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r44205.
Wataru, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


configure.in: unexpand exec_prefix in rubylibprefix

  • configure.in (rubylibprefix): replace exec_prefix as well as
    bindir and libdir. a patch by kimuraw (Wataru Kimura) at
    [ruby-dev:47852]. [Bug #9160]

Updated by nagachika (Tomoyuki Chikanaga) almost 11 years ago

  • Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: DONTNEED, 2.0.0: DONTNEED
Actions #4

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

  • Related to Bug #18373: Bundled gem (RBS, debug) extensions are not properly built added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0