Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 728424 - dev-lang/ruby:2.5 does not install all files
Summary: dev-lang/ruby:2.5 does not install all files
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-15 22:13 UTC by G.Wolfe Woodbury
Modified: 2021-10-12 18:20 UTC (History)
1 user (show)

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


Attachments
build log for ruby-2.5.8 (ruby-2.5.8:20200615-212222.log,391.17 KB, text/plain)
2020-06-15 22:16 UTC, G.Wolfe Woodbury
Details
emerge --info (einfo.txt,16.84 KB, text/plain)
2020-06-15 22:17 UTC, G.Wolfe Woodbury
Details
build log for dev-ruby/rubygems-2.7.10 (rubygems-2.7.10:20200615-212339.log,2.52 KB, text/plain)
2020-06-15 22:21 UTC, G.Wolfe Woodbury
Details

Note You need to log in before you can comment on or make changes to this bug.
Description G.Wolfe Woodbury 2020-06-15 22:13:33 UTC
My long pending problems with ruby are continuing.  Now that ruby24 is going EOL, ruby25 is failing to install more than the documents into the image/ build dir, and thus failing to build the other dependencies (e.g. rubygems) when doing an "emerge dev-lang/ruby:2.5"

I attach all the evidence I have: emerge --info; build logs

Reproducible: Always

Steps to Reproduce:
1. fresh Gentoo stage3 install
2. emerge dev-lang/ruby-2.5.8

Actual Results:  
fails after installing dev-lang/ruby on the dev-ruby/rubygems step

Expected Results:  
should have continued with rubygems normally
Comment 1 G.Wolfe Woodbury 2020-06-15 22:16:57 UTC
Created attachment 644938 [details]
build log for ruby-2.5.8
Comment 2 G.Wolfe Woodbury 2020-06-15 22:17:52 UTC
Created attachment 644940 [details]
emerge --info
Comment 3 G.Wolfe Woodbury 2020-06-15 22:21:21 UTC
Created attachment 644942 [details]
build log for dev-ruby/rubygems-2.7.10
Comment 4 G.Wolfe Woodbury 2020-06-15 22:23:38 UTC
I looked at the jemalloc flag, and the build is '--without-jemalloc'
Comment 5 Hans de Graaff gentoo-dev 2020-07-05 07:40:14 UTC
It looks to me that the real issue here is that dev-lang/ruby does not install properly. In the build log for dev-lang/ruby:2.5 that you removed it does show that only a few doc files are installed and consequently eselect-ruby cannot set the ruby interpreter. This also causes $RUBY to be unset.

It's not clear to me why dev-lang/ruby does not install more files, and I cannot reproduce it.
Comment 6 MT 2021-10-12 18:20:27 UTC
I was hit by this bug when upgrading to dev-lang/ruby-2.7.4, and after a few days of testing I have pinned down a way to easily reproduce the behaviour:

Steps to reproduce:

1. Install the Gentoo base system¹ in a dedicated chroot (or systemd-nspawn's machine);
2. upgrade the world (emerge -auUDN @world)
3. MAKEOPTS="-Oline" emerge -1av --quiet-build=n --fail-clean=n dev-lang/ruby:2.7

Ruby's build system is tripping on the 'make' flag "-Oline". Apparently, Ruby's build system passes the content of MAKEOPTS to its internal sub-processes (--mflag) and that influences what is going to be compiled/installed. Some 'make' flags can drastically alter that specific output, leading to a non deterministic compilation/installation, hence the bizarre behaviour.

What I could not determine is if this behaviour is a bug within the Ruby's build system, or if it is the consequence of some helper function from Portage that somehow wrongly parses/invokes 'make' during the ebuild phases (there is an invokation of "make -f" in src_install which is suspicious), or a mix of the two. I suppose I can leave that as an exercise to the ebuild maintainers.

Removing any flags from MAKEOPTS, except for -j and -l, fixed the issue and the compilation proceeded as expected.

[1]: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base