Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 891367 - dev-lang/ruby[static-libs]: doesn't install some gems, e.g. io-wait (dev-ruby/nokogiri-1.13.10 build failure)
Summary: dev-lang/ruby[static-libs]: doesn't install some gems, e.g. io-wait (dev-ruby...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-19 07:22 UTC by Artemis Everfree
Modified: 2023-07-10 03:42 UTC (History)
2 users (show)

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


Attachments
concatenation of emerge pqv, emerge info, build.log (file_891367.txt,21.01 KB, text/plain)
2023-01-19 07:22 UTC, Artemis Everfree
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Artemis Everfree 2023-01-19 07:22:43 UTC
Created attachment 848805 [details]
concatenation of emerge pqv, emerge info, build.log

see attached logs (concatenation of emerge pqv, emerge info, build.log)

primary error might be this:

Could not find 'io-wait' (>= 0) among 83 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/var/tmp/portage/dev-ruby/nokogiri-1.13.10/homedir/.local/share/gem/ruby/3.0.0:/usr/lib64/ruby/gems/3.0.0:/usr/local/lib64/ruby/gems/3.0.0'
Comment 1 Hans de Graaff gentoo-dev Security 2023-01-29 08:57:51 UTC
It looks like you have the net-procotol gem installed on version 1.1.0. This gem is normally provided as a default gem by ruby 3.0.0, and its specification should be provided at /usr/lib64/ruby/gems/3.0.0/specifications/default/net-protocol-0.1.1.gemspec

As a workaround, you can try to uninstall the net-protocol gem, or alternatively try to update it to a newer version with emerge.
Comment 2 Artemis Everfree 2023-01-30 09:53:42 UTC
(In reply to Hans de Graaff from comment #1)
> It looks like you have the net-procotol gem installed on version 1.1.0. This
> gem is normally provided as a default gem by ruby 3.0.0, and its
> specification should be provided at
> /usr/lib64/ruby/gems/3.0.0/specifications/default/net-protocol-0.1.1.gemspec
> 
> As a workaround, you can try to uninstall the net-protocol gem, or
> alternatively try to update it to a newer version with emerge.

so dev-ruby/net-protocol is under the ~amd64 keyword, as is dependency of it dev-ruby/timeout. I tried installing dev-ruby/net-protocol-0.2.1.

This resulted in a new error- it's looking now for dev-ruby/stringio. So I installed dev-ruby/stringio, which is marked as stable but is not pulled in as one of nokogiri's dependencies, and dev-ruby/nokogiri compiled/installed correctly.

Explicitly, the steps I followed to get dev-ruby/nokigiri building were

- accept ~amd64 for dev-ruby/net-protocol
- accept ~amd64 for dev-ruby/timeout
- manually emerge dev-ruby/net-protocol (not pulled in as dependency)
- manually emerge dev-ruby/stringio (not pulled in as dependency)
- emerge dev-ruby/nokogiri


I think the stringio problem is probably because with ruby 2.x, stringio was a bundled part of the standard library, but with 3.x it is separate. I think I don't really understand how net-protocol fixed it looking for "io-wait" but I trust you understand that more than me. There is a dev-ruby/io-wait, also keyworded ~amd64, but I didn't try using it.

One way or another, I think this is all related to ruby 3. As an experiment I did this:

- uninstall dev-ruby/nokogiri
- uninstall dev-ruby/net-protocol and its dependencies
- uninstall dev-ruby/stringio
- USE="-ruby_targets_ruby30 -ruby_targets_ruby31" emerg edev-ruby/nokogiri

This built just fine (the only target enabled in this case is ruby2.7)

By the way, /usr/lib64/ruby/gems/3.0.0/specifications/default/net-protocol-0.1.1.gemspec does actually exist on my system even with dev-ruby/net-protocol uninstalled. So it's not like that is missing. In fact that is what is pulling in the io-wait dependency in the first place:

 26   if s.respond_to? :add_runtime_dependency then
 27     s.add_runtime_dependency(%q<timeout>.freeze, [">= 0"])
 28     s.add_runtime_dependency(%q<io-wait>.freeze, [">= 0"])
 29   else
 30     s.add_dependency(%q<timeout>.freeze, [">= 0"])
 31     s.add_dependency(%q<io-wait>.freeze, [">= 0"])
 32   end

I am not sure where it is expecting to get io-wait from.
Comment 3 Hans de Graaff gentoo-dev Security 2023-02-05 07:43:23 UTC
(In reply to Artemis Everfree from comment #2)

> By the way,
> /usr/lib64/ruby/gems/3.0.0/specifications/default/net-protocol-0.1.1.gemspec
> does actually exist on my system even with dev-ruby/net-protocol
> uninstalled. So it's not like that is missing. In fact that is what is
> pulling in the io-wait dependency in the first place:
> 
>  26   if s.respond_to? :add_runtime_dependency then
>  27     s.add_runtime_dependency(%q<timeout>.freeze, [">= 0"])
>  28     s.add_runtime_dependency(%q<io-wait>.freeze, [">= 0"])
>  29   else
>  30     s.add_dependency(%q<timeout>.freeze, [">= 0"])
>  31     s.add_dependency(%q<io-wait>.freeze, [">= 0"])
>  32   end
> 
> I am not sure where it is expecting to get io-wait from.

That should come from the same place, the 3.0 default gems:

/usr/lib64/ruby/gems/3.0.0/specifications/default/io-wait-0.2.0.gemspec
Comment 4 Artemis Everfree 2023-02-05 20:08:33 UTC
interesting. I definitely do not have that.

vi@localhost ~> ls /usr/lib64/ruby/gems/3.0.0/specifications/default/io-wait-0.2.0.gemspec
ls: cannot access '/usr/lib64/ruby/gems/3.0.0/specifications/default/io-wait-0.2.0.gemspec': No such file or directory
Comment 5 Artemis Everfree 2023-02-05 20:33:24 UTC
OK interesting! 

If I build with USE=-static-libs then io-wait DOES end up in the final install image. but if I build with USE=static-libs then io-wait and a number of other libraries don't get installed. Here's a diff from the part of the install logs where it lists out what gems it's installing

vi@philomena ~> diff ruby-libs-no-static.txt ruby-libs-static.txt 
61,62d60
<                                     etc 1.3.0
<                                     fcntl 1.0.1
64d61
<                                     gdbm 2.1.0
66,67d62
<                                     io-nonblock 0.1.0
<                                     io-wait 0.2.0
69d63
<                                     nkf 0.1.0
73,75d66
<                                     readline-ext 0.1.1
<                                     stringio 3.0.1
<                                     strscan 3.0.1
77d67
<                                     zlib 2.0.0