From: WATANABE Hirofumi Date: 1999-06-26T00:12:20+09:00 Subject: [ruby-dev:7231] Re: -Wl,-rpath on Linux (Re: Ruby 1.3.4-990625) わたなべです. ttate@jaist.ac.jp writes: :make testは成功しますが、これだとmake installでこけます。 :そこで、 :export LD_PRELOAD=$PWD/libruby-1.3.so :とすればmake installもうまくいきます。 わたしも LD_PRELOAD 作戦がいいかなと思います. で test のときだけ使うようにする. def Object.method_added(x) print x.id2name, send(x) end def Just() ' ' end def another() ' ' end def Ruby() ' ' end def hacker() ',' end -- わたなべひろふみ --- rubytest.rb.orig Tue Apr 20 17:41:55 1999 +++ rubytest.rb Fri Jun 25 22:13:20 1999 @@ -1,10 +1,15 @@ #! ./miniruby -I. +require 'rbconfig' +include Config + x = ENV["LD_LIBRARY_PATH"] x = x ? x+":." : "." ENV["LD_LIBRARY_PATH"] = x -require 'rbconfig' -include Config +if /linux/ === RUBY_PLATFORM and File.exist? CONFIG['LIBRUBY_SO'] + ENV["LD_PRELOAD"] ||= "" + ENV["LD_PRELOAD"] += " ./#{CONFIG['LIBRUBY_SO']}" +end $stderr.reopen($stdout)