Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89985 - [multilib-strict] Ruby installs shared objects into /usr/lib/...
Summary: [multilib-strict] Ruby installs shared objects into /usr/lib/...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All All
: High normal
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
: 97536 114638 (view as bug list)
Depends on:
Blocks: 104720
  Show dependency tree
 
Reported: 2005-04-21 15:51 UTC by Herbie Hopkins (RETIRED)
Modified: 2005-12-07 03:29 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Herbie Hopkins (RETIRED) gentoo-dev 2005-04-21 15:51:06 UTC
 
Comment 1 Herbie Hopkins (RETIRED) gentoo-dev 2005-04-21 15:56:23 UTC
FEATURES=multilib-strict throws up errors on ruby modules. By default ruby installs site packages in /usr/lib/ruby/site_ruby. These are mostly arch independant scripts but a few shared libs get installed into an arch dependant subdirectory /usr/lib/ruby/site_ruby/$PV/$ARCH-linux. To see this:
# emerge ruby ruby-libart2

I assume this is the correct place for these libs? If so please add ruby to MULTILIB_STRICT_EXEMPT variable in ebuild.sh.
Comment 2 Danny van Dyk (RETIRED) gentoo-dev 2005-05-11 13:16:37 UTC
This is the wrong place. They should go into /usr/lib64/site_ruby/${PV}/${ARCH},
as on pure 64bit systems there might be no /usr/lib diectory.
Comment 3 Herbie Hopkins (RETIRED) gentoo-dev 2005-05-11 13:34:16 UTC
Well if that's the case then we need to look at pretty much anything that installs a perl module since perl does exactly the same thing (and does not result in multilib-strict errors since /usr/lib/perl is in MULTILIB_STRICT_EXEMPT)
Comment 4 Danny van Dyk (RETIRED) gentoo-dev 2005-06-26 13:17:38 UTC
I don't know why perl should be an exemption to normal policy... ruby definitely
is none anymore thanks to a one line patch to the ebuild:
[econf]
  --with-sitedir=\$\(prefix\)/$(get_libdir)/ruby/site_ruby
did it.

FIXED as of dev-lang/ruby-1.8.2-r1
Comment 5 Rob Cakebread (RETIRED) gentoo-dev 2005-06-29 17:20:55 UTC
I'm not sure, but it looks like what was done here broke all packages that use
ruby gems. Try running 'gem' with either ruby-1.8.2-r1 or 1.8.3 pre1 and you get:

/usr/bin/gem:3:in `require': No such file to load -- rubygems (LoadError) from
/usr/bin/gem:3
Comment 6 Steven Jenkins 2005-06-30 20:52:32 UTC
This fix breaks installation of packages that use the standard 'setup.rb'
packaging mechanism. The default behavior of setup.rb is to install the package
files under /usr/lib/ruby/site_ruby/1.8. Ruby fails to search there, however,
and does not find the files.

Note that this problem has nothing to do with shared objects. The files in
question in this case are pure Ruby.
Comment 7 Simon Stelling (RETIRED) gentoo-dev 2005-07-01 03:55:12 UTC
*** Bug 97536 has been marked as a duplicate of this bug. ***
Comment 8 Danny van Dyk (RETIRED) gentoo-dev 2005-07-01 06:02:51 UTC
I'll take the patch out of ruby for the time being. 
 
What bothers me is: /usr/lib is a symlink to /usr/lib64, so ruby _should_ 
find all the files. 
Comment 9 Steven Jenkins 2005-07-01 08:26:47 UTC
I'm on x86. I only ended up here trying to find out who broke ruby :-(.

Here are the relevant lines from 'strace irb -r redcloth'. 

stat64("/lib/ruby/site_ruby/1.8/redcloth.rb", 0xbfffb860) = -1 ENOENT (No such
file or directory)
stat64("/lib/ruby/site_ruby/1.8/i686-linux/redcloth.rb", 0xbfffb860) = -1 ENOENT
(No such file or directory)
stat64("/lib/ruby/site_ruby/redcloth.rb", 0xbfffb860) = -1 ENOENT (No such file
or directory)
stat64("/usr/lib/ruby/1.8/redcloth.rb", 0xbfffb860) = -1 ENOENT (No such file or
directory)
stat64("/usr/lib/ruby/1.8/i686-linux/redcloth.rb", 0xbfffb860) = -1 ENOENT (No
such file or directory)
stat64("./redcloth.rb", 0xbfffb860)     = -1 ENOENT (No such file or directory)
write(2, "No such file to load -- redcloth"..., 35No such file to load --
redcloth.rb) = 35

redcloth.rb is installed in its standard location of /usr/lib/ruby/site_ruby/1.8.
(Note that setup.rb does not install things in /usr/lib/... by default. It
determines where to install things by asking ruby about its autoconfig
parameters. That just happens to be /usr/lib on most platforms.)

Ruby's convention for .so's is well-established, and it works. I recommend
leaving it alone. Even if you can get it to work, it will change a familiar
convention without any obvious benefit.
Comment 10 Piotr Banasik 2005-07-03 01:17:04 UTC
(In reply to comment #8) 
> I'll take the patch out of ruby for the time being.  
>   
> What bothers me is: /usr/lib is a symlink to /usr/lib64, so ruby _should_  
> find all the files.  
 
here is an interesting thing ... ruby's pathing is all messed up .. 
 
# ruby -e "puts $:.inspect" 
["/lib64/ruby/site_ruby/1.8", 
 "/lib64/ruby/site_ruby/1.8/x86_64-linux", 
 "/lib64/ruby/site_ruby", 
 "/usr/lib64/ruby/1.8", 
 "/usr/lib64/ruby/1.8/x86_64-linux", 
 "."] 
 
nowhere in this list is the "default" location ruby packages want to install 
themselves to which is: /usr/lib(64?)/ruby/1.8/site_ruby/1.8 (which is where 
rubygems among other things install themselves to) 
 
# qpkg -l rubygems 
dev-ruby/rubygems-0.8.10 * 
CONTENTS: 
/usr 
/usr/bin 
/usr/bin/gemwhich 
/usr/bin/gem 
/usr/bin/gem_server 
/usr/bin/generate_yaml_index.rb 
/usr/bin/update_rubygems 
/usr/lib64 
/usr/lib64/ruby 
/usr/lib64/ruby/site_ruby 
/usr/lib64/ruby/site_ruby/1.8 
/usr/lib64/ruby/site_ruby/1.8/ubygems.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems.rb 
/usr/lib64/ruby/site_ruby/1.8/gemconfigure.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems 
/usr/lib64/ruby/site_ruby/1.8/rubygems/specification.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/builder.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/command.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/config_file.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/doc_manager.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/format.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/cmd_manager.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/gem_runner.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/installer.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/old_format.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/open-uri.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/package.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/remote_installer.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/rubygems_version.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/source_index.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/deployment.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/timer.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/user_interaction.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/validator.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/version.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/gem_commands.rb 
/usr/lib64/ruby/site_ruby/1.8/rubygems/dependency_list.rb 
/usr/lib 
/usr/lib/ruby 
/usr/lib/ruby/gems 
/usr/lib/ruby/gems/1.8 
/usr/lib/ruby/gems/1.8/cache 
/usr/lib/ruby/gems/1.8/cache/sources-0.0.1.gem 
/usr/lib/ruby/gems/1.8/doc 
/usr/lib/ruby/gems/1.8/doc/.keep 
/usr/lib/ruby/gems/1.8/gems 
/usr/lib/ruby/gems/1.8/gems/sources-0.0.1 
/usr/lib/ruby/gems/1.8/gems/sources-0.0.1/lib 
/usr/lib/ruby/gems/1.8/gems/sources-0.0.1/lib/sources.rb 
/usr/lib/ruby/gems/1.8/specifications 
/usr/lib/ruby/gems/1.8/specifications/sources-0.0.1.gemspec 
/usr/share 
/usr/share/doc 
/usr/share/doc/rubygems-0.8.10 
/usr/share/doc/rubygems-0.8.10/html 
/usr/share/doc/rubygems-0.8.10/html/doc.css 
/usr/share/doc/rubygems-0.8.10/examples 
/usr/share/doc/rubygems-0.8.10/examples/application 
/usr/share/doc/rubygems-0.8.10/examples/application/bin 
/usr/share/doc/rubygems-0.8.10/examples/application/bin/myapp 
/usr/share/doc/rubygems-0.8.10/examples/application/lib 
/usr/share/doc/rubygems-0.8.10/examples/application/lib/somefunctionality.rb 
/usr/share/doc/rubygems-0.8.10/examples/application/an-app.gemspec 
/usr/share/doc/rubygems-0.8.10/ChangeLog.gz 
/usr/share/doc/rubygems-0.8.10/README.gz 
/usr/share/doc/rubygems-0.8.10/TODO.gz 
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-10-12 10:32:11 UTC
[econf]  
  --with-sitedir=\$\(prefix\)/$(get_libdir)/ruby/site_ruby  
  
this is the problem, the broken one.  
  
$(prefix) is not what you want. First because it calls the "prefix" command  
that does not exists. Second because econf is then expanded. Third because we  
just install in /usr right now (when we'll support alternative prefixes, there  
will be a way to handle that, too).  
  
A working fix would be just adding it with /usr instead of $(prefix) ..  
running "gem" doesn't seem to break, the path are rights, and a gem-installed 
rbot installed in the right place.. 
 
Rob, is that enough for you? :) 
Comment 12 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-21 13:06:32 UTC
Ping ruby herd again. 
Comment 13 Caleb Tennis (RETIRED) gentoo-dev 2005-11-21 13:39:15 UTC
I'm here, but I'm not a lib64 guy so one of you 64 bit arches should fix the 
issue. 
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-21 14:04:03 UTC
I have the solution (see comment #12), just want to know if it might create 
problems for you if --with-sitedir=/usr/lib on x86... 
Worse can't go on amd64, at maximum it won't work on development experimental 
profiles so we can get rid of the problems before they get into mainline. 
 
 
Comment 15 Herbie Hopkins (RETIRED) gentoo-dev 2005-11-21 16:12:19 UTC
*** Bug 112236 has been marked as a duplicate of this bug. ***
Comment 16 Patrick McLean gentoo-dev 2005-12-06 11:07:29 UTC
*** Bug 114638 has been marked as a duplicate of this bug. ***
Comment 17 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-12-07 03:29:07 UTC
Okay fixed, also if it's just a partial fix: now all the ruby extensions are 
installed in /usr/lib64 (exactly as it would have been if Danny's fix worked), 
instead of installing in /usr/lib the ones that are arch-independent. 
I tried finding a more complete solution, but it involves tinkering with 
config.h and the makefile re-runs configure after econf, and that breaks my 
idea. 
Also, if we share the arch-independent directory we have problems with 
collision when two arch-dependent packages shares some .rb files (see qtruby). 
There's still the problem that qtruby and korundum installs in /usr/lib(64) 
instead of /usr/kde . 
 
A more complete solution would involve changes in ruby's buildsystem and I'd 
rather not touch that yet.