Forum: Ruby-core [ruby-trunk - Bug #7860][Open] Passing --libdir to ./configure causes Gem.ruby to point to an incorr

Posted by cwgem (Chris White) (Guest)
on 2013-02-16 00:32
(Received via mailing list)
Issue #7860 has been reported by cwgem (Chris White).

----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860

Author: cwgem (Chris White)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Posted by Nobuyoshi Nakada (nobu)
on 2013-02-19 05:04
(Received via mailing list)
Issue #7860 has been updated by nobu (Nobuyoshi Nakada).

Category set to build
Status changed from Closed to Assigned
Assignee set to mame (Yusuke Endoh)
Target version set to 2.0.0

I think this will be necessary for 2.0.0.
revisions are r39267,39273,39294,39298,39313.
----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860#change-36590

Author: cwgem (Chris White)
Status: Assigned
Priority: Normal
Assignee: mame (Yusuke Endoh)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Posted by Nobuyoshi Nakada (nobu)
on 2013-02-19 05:14
(Received via mailing list)
Issue #7860 has been updated by nobu (Nobuyoshi Nakada).


And r39284,r39297.
----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860#change-36591

Author: cwgem (Chris White)
Status: Assigned
Priority: Normal
Assignee: mame (Yusuke Endoh)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Posted by Nobuyoshi Nakada (nobu)
on 2013-02-19 05:30
(Received via mailing list)
Issue #7860 has been updated by nobu (Nobuyoshi Nakada).


Sorry, patches for tool/mkconfig.rb are not necessary as long as libdir 
is under exec_prefix.

And the case libdir is outside exec_prefix is not supported in trunk.
TMP_RUBY_PREFIX would be needed to fix it.

----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860#change-36593

Author: cwgem (Chris White)
Status: Assigned
Priority: Normal
Assignee: mame (Yusuke Endoh)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Posted by mame (Yusuke Endoh) (Guest)
on 2013-02-19 13:29
(Received via mailing list)
Issue #7860 has been updated by mame (Yusuke Endoh).

Assignee changed from mame (Yusuke Endoh) to nobu (Nobuyoshi Nakada)

Too many!  Are they all essential?
Could you please show me one minimum and clean patch?

--
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860#change-36611

Author: cwgem (Chris White)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Posted by Nobuyoshi Nakada (nobu)
on 2013-02-19 14:18
(Received via mailing list)
Issue #7860 has been updated by nobu (Nobuyoshi Nakada).


The former 4 commits are needed, and the last is fix of commit miss in 
Changelog.

And, I've backported them for [Bug #7871].
Please revert it if wrong.
----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860#change-36613

Author: cwgem (Chris White)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Posted by mame (Yusuke Endoh) (Guest)
on 2013-02-20 07:17
(Received via mailing list)
Issue #7860 has been updated by mame (Yusuke Endoh).


> Please revert it if wrong.

Please don't try to get retrospective approval ;-(

r39320 seems very subtle (actually it caused cascading fixes on trunk).
I'm afraid if it affects other platforms.

Eric Hodel,
Do you understand the fix?  It is related to rubygems (according to this 
ticket).

Chris White, Jon Forums,
Can you check the current ruby_2_0_0 branch and make sure that your 
issue(s) is really fixed?

--
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860#change-36649

Author: cwgem (Chris White)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Posted by drbrain (Eric Hodel) (Guest)
on 2013-02-20 21:25
(Received via mailing list)
Issue #7860 has been updated by drbrain (Eric Hodel).


I don't know enough about autoconf to understand the fix.

I don't believe it will cause any problems with RubyGems though.
----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860#change-36684

Author: cwgem (Chris White)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Posted by jonforums (Jon Forums) (Guest)
on 2013-02-21 01:22
(Received via mailing list)
Issue #7860 has been updated by jonforums (Jon Forums).


> Chris White, Jon Forums,
> Can you check the current ruby_2_0_0 branch and make sure that your issue(s) is 
really fixed?

mame-san...ruby_2_0_0@39344 solves these recent issues on my 
`x86_64-linux` (ubuntu server 12.10) machine. I will build `i686-linux` 
later tonight and report back if any errors.

  * `exec_prefix` regression
  * `gem {install,update} --user-install` errors

----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860#change-36690

Author: cwgem (Chris White)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Posted by mame (Yusuke Endoh) (Guest)
on 2013-02-23 07:40
(Received via mailing list)
Issue #7860 has been updated by mame (Yusuke Endoh).


Oops, this caused #7915...
I'm now keen to revert the bunch of patches.  What do you think?

--
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860#change-36826

Author: cwgem (Chris White)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Posted by mame (Yusuke Endoh) (Guest)
on 2013-02-24 06:07
(Received via mailing list)
Issue #7860 has been updated by mame (Yusuke Endoh).

Status changed from Assigned to Closed

I talked with nobu, and he said he could not reproduce #7915.
I decided to leave the backport as is.  Sorry if my decision is wrong...

I'm closing this ticket.

--
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #7860: Passing --libdir to ./configure causes Gem.ruby to point to 
an incorrect ruby interpreter path
https://bugs.ruby-lang.org/issues/7860#change-36885

Author: cwgem (Chris White)
Status: Closed
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: build
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-16 trunk 39262) [x86_64-linux]


How I reproduce:

------------------------------------
# git clone git://github.com/ruby/ruby.git
# autoreconf
# ./configure --libdir=/usr/local/lib64
# make clean && make && make install
# /usr/local/bin/ruby -e 'puts Gem.ruby'
/bin/ruby
------------------------------------

The problem is how topdir is set with `tool/mkconfig.rb`. This is a diff 
between `./configure` and `./configure --libdir=/usr/local/lib64`:

------------------------------------------------------------------------------------------
--- /root/rbconfig.rb   2013-02-15 15:20:15.016942074 -0800
+++ /usr/local/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb 
2013-02-15 15:14:20.500932606 -0800
@@ -6,7 +6,7 @@
   RUBY_VERSION == "2.0.0" or
     raise "ruby lib version (2.0.0) doesn't match executable version 
(#{RUBY_VERSION})"

-  TOPDIR = 
File.dirname(__FILE__).chomp!("/lib/ruby/2.0.0/x86_64-linux")
+  TOPDIR = 
File.dirname(__FILE__).chomp!("/usr/local/lib64/ruby/2.0.0/x86_64-linux")
   DESTDIR = '' unless defined? DESTDIR
   CONFIG = {}
   CONFIG["DESTDIR"] = DESTDIR
@@ -35,7 +35,7 @@
   CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_VERSION_NAME)"
   CONFIG["UNIVERSAL_INTS"] = ""
   CONFIG["UNIVERSAL_ARCHNAMES"] = ""
-  CONFIG["configure_args"] = ""
+  CONFIG["configure_args"] = " '--libdir=/usr/local/lib64'"
   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
   CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
@@ -199,7 +199,7 @@
   CONFIG["DEFS"] = ""
   CONFIG["mandir"] = "$(datarootdir)/man"
   CONFIG["localedir"] = "$(datarootdir)/locale"
-  CONFIG["libdir"] = "$(exec_prefix)/lib"
+  CONFIG["libdir"] = "$(DESTDIR)/usr/local/lib64"
   CONFIG["psdir"] = "$(docdir)"
   CONFIG["pdfdir"] = "$(docdir)"
   CONFIG["dvidir"] = "$(docdir)"
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.