From: "mpapis (Michal Papis)" Date: 2013-02-01T00:51:01+09:00 Subject: [ruby-core:51782] [ruby-trunk - Bug #7172] [[Ruby 1.9:]] fix rbconfig for --enable-load-relative (v2) Issue #7172 has been updated by mpapis (Michal Papis). So running: rvm install ruby-head --debug --movable Executes: autoreconf ./configure --disable-install-doc --prefix=/home/mpapis/.rvm/rubies/ruby-head --enable-shared --enable-load-relative --sysconfdir=/etc --with-opt-dir=/home/mpapis/.rvm/rubies/ruby-head --with-baseruby=/home/mpapis/.rvm/wrappers/ruby-1.9.3-p374/ruby make make install And this ends up with `/home/mpapis/.rvm/rubies/ruby-head/lib64/ruby/2.0.0/x86_64-linux/rbconfig.rb`: CONFIG["configure_args"] = " '--disable-install-doc' '--prefix=/home/mpapis/.rvm/rubies/ruby-head' '--enable-shared' '--enable-load-relative' '--sysconfdir=/etc' '--with-opt-dir=/home/mpapis/.rvm/rubies/ruby-head' '--with-baseruby=/home/mpapis/.rvm/wrappers/ruby-1.9.3-p374/ruby' 'CC=ccache gcc'" CONFIG["DLDFLAGS"] = "-L/home/mpapis/.rvm/rubies/ruby-head/lib -Wl,-R/home/mpapis/.rvm/rubies/ruby-head/lib " CONFIG["CPPFLAGS"] = " -I/home/mpapis/.rvm/rubies/ruby-head/include $(DEFS) $(cppflags)" CONFIG["LDFLAGS"] = "-L. -fstack-protector -rdynamic -Wl,-export-dynamic -L/home/mpapis/.rvm/rubies/ruby-head/lib -Wl,-R/home/mpapis/.rvm/rubies/ruby-head/lib " I understand that is not the usual use case, but any time some libs will be compiled in ruby prefix or using relative path to ruby prefix (assuming lib was copied along to ruby) - after moving ruby it will not be possible to find those libs. ---------------------------------------- Bug #7172: [[Ruby 1.9:]] fix rbconfig for --enable-load-relative (v2) https://bugs.ruby-lang.org/issues/7172#change-35748 Author: mpapis (Michal Papis) Status: Feedback Priority: Normal Assignee: nobu (Nobuyoshi Nakada) Category: build Target version: 2.0.0 ruby -v: 2.0.0dev continuation of http://bugs.ruby-lang.org/issues/6903 and http://bugs.ruby-lang.org/issues/7115 Checked with http://bugs.ruby-lang.org/projects/ruby-193/repository/entry/tool/mkconfig.rb and p286, there is still missing fix for rbconfig, it can be found here: https://github.com/wayneeseguin/rvm/blob/master/patches/ruby/1.9.3/p286/ruby-multilib.patch it does two things important for movable rubies: 1. https://github.com/wayneeseguin/rvm/blob/master/patches/ruby/1.9.3/p286/ruby-multilib.patch#L27-28 - properly detect libruby prefix on system with `lib64` 2. https://github.com/wayneeseguin/rvm/blob/master/patches/ruby/1.9.3/p286/ruby-multilib.patch#L36 - replace all occurrences of application prefix with `$(prefix)` so after moving ruby to other location final system paths are used instead of the build system paths, this solves number of issues, especially with compilation gem native extensions. -- http://bugs.ruby-lang.org/