Bug #6903

Updated by nobu (Nobuyoshi Nakada) almost 10 years ago

 Trying to build ruby with `--enable-load-relative` on system where libraries are by default stored in lib64. 

 This leads to this error on most ruby operations, with minimal example `ruby -e 'p :a'`: 

     <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError) 
       	     from <internal:gem_prelude>:1:in `<compiled>' 

 It works when I prefix it with `RUBYLIB`: 

     RUBYLIB=/home/mpapis/.rvm/rubies/ruby-1.9.3-p194/lib64/ruby/:/home/mpapis/.rvm/rubies/ruby-1.9.3-p194/lib64/ruby/1.9.1/:/home/mpapis/.rvm/rubies/ruby-1.9.3-p194/lib64/ruby/1.9.1/x86_64-linux/ /home/mpapis/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -e 'p :a' 

 So the `lib64` path was not respected, I have prepared the attached patch and compiled using it but it did not helped. 

 The only thing I could use to fix it was compiling using additional configure flag: 


 so the default detected `lib64` was overwritten and it all worked fine. 

 The check for the libdir is: `gcc -print-multi-os-directory` 

 Under this address should be a link to vagrant box for system that has lib64 as default: 

 The best solution would be to fix loading libraries from the custom paths, but if it is not possible it would be also good enough to force libdir=.../lib if not specified by user.