Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 704164

Summary: =dev-ruby/bundler-2.1.2: /var/tmp/portage/dev-ruby/bundler-2.1.2/temp/environment: line 1038: rdoc: command not found
Product: Gentoo Linux Reporter: Thomas Sachau <tommy>
Component: Current packagesAssignee: Gentoo Ruby Team <ruby>
Status: RESOLVED FIXED    
Severity: normal CC: alexey+gentoo, begdory4, chris.burroughs, dschridde+gentoobugs, esigra, frares, gem, gentoo, gentoo, gentoo, gotyaoi, jeff.gazso, johannes.geiss, johannes.hirte, leio, michel, mkresch, mplichta, orodruinlair, pacho, randy, sandino, v10lator, vityokster, wgh, whissi
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=849695
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Thomas Sachau gentoo-dev 2019-12-29 11:50:56 UTC
Created attachment 601674 [details]
build.log

emerge --info

Portage 2.3.83-multilib (python 2.7.17-final-0, default/linux/amd64/17.0/hardened, gcc-8.2.0, glibc-2.30-r3, 4.19.91-gentoo x86_64)
=================================================================
System uname: Linux-4.19.91-gentoo-x86_64-Intel-R-_Core-TM-_i7-4790_CPU_@_3.60GHz-with-gentoo-2.6
KiB Mem:    32856988 total,   4878364 free
KiB Swap:    1048572 total,   1032700 free
Head commit of repository gentoo: 3eb5406f9676ae7d7cd01012b1c0e2901606b19b

sh bash 5.0_p11
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          5.0_p11::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.10::gentoo, 3.7.6::gentoo
dev-util/cmake:           3.16.2-r1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r2::gentoo
sys-devel/binutils:       2.32-r1::gentoo, 2.33.1::gentoo
sys-devel/gcc:            5.4.0-r6::gentoo, 7.3.0-r6::gentoo, 8.2.0-r6::gentoo, 9.2.0-r3::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: git+ssh://git@git.gentoo.org/repo/gentoo.git
    priority: -1000
    eclass-overrides: gentoo local

eclipse
    location: /var/lib/layman/eclipse
    masters: gentoo
    priority: 50
    eclass-overrides: gentoo local

enlightenment
    location: /var/lib/layman/enlightenment
    masters: gentoo
    priority: 50
    eclass-overrides: gentoo local

java
    location: /var/lib/layman/java
    masters: gentoo
    priority: 50
    eclass-overrides: gentoo local

multilib-portage
    location: /var/lib/layman/multilib-portage
    masters: gentoo
    priority: 50
    eclass-overrides: gentoo local

sunrise
    location: /var/lib/layman/sunrise
    masters: gentoo
    priority: 50
    eclass-overrides: gentoo local

tastytea
    location: /var/lib/layman/tastytea
    masters: gentoo
    priority: 50
    eclass-overrides: gentoo local

local
    location: /usr/local/portage
    masters: gentoo
    priority: 100
    eclass-overrides: gentoo local

Installed sets: @fonts
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs collision-protect distlocks ebuild-locks fixlafiles force-multilib ipc-sandbox merge-sync metadata-transfer network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms sign splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="en de"
MAKEOPTS="-j6 --load-average=8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="3dnow X alsa amd64 crypt cups custom-cflags custom-cxxflags custom-optimization cxx gpm hardened java5 java6 libtirpc mmx ncurses nls nptl nsplugin ogg openmp opus pam pie readline scanner seccomp split-usr sse sse2 ssl ssp system-sqlite unicode v4l vorbis xattr xinerama xtpax zlib" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" L10N="en-GB de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" MULTILIB_ABI="amd64 x86" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6 python2_7 python2_6" RUBY_TARGETS="ruby26" SANE_BACKENDS="hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hpsj5s hs2p" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Maxime Lombard 2019-12-30 17:07:48 UTC
I confirm the issue.
I have 68 packages to be update and bundler is the 1st package in the list.
Any idea to do the update and/or to avoid the rebuild of bundler with ruby27 flag ?
Comment 2 Ferry 2020-01-02 11:25:54 UTC
Have the same issue, compiles fine with USE=-doc
Comment 3 Johannes Hirte 2020-02-05 14:14:12 UTC
ruby27 must be selected after an upgrade (eselect ruby)
Comment 4 Nikos Chantziaras 2020-09-15 08:58:51 UTC
Same issue here.

(In reply to Johannes Hirte from comment #3)
> ruby27 must be selected after an upgrade (eselect ruby)

This is happening *during* an upgrade on a system that had ruby 2.5 only, with 2.6 and 2.7 masked. When unmasking 2.7 and doing a @world update, this package fails to build.
Comment 5 Thomas 2020-12-15 23:46:25 UTC
Same here. Building with "USE=-doc" works fine.
Comment 6 justXi 2021-01-15 14:31:57 UTC
I had the same problem. I have only "ruby25" and "ruby26" installed.
Using "eselect" to set "ruby26" and run emerge to install "bundler" again works.
Comment 7 Markus Giese 2021-01-16 15:35:07 UTC
thanks for suggestion, same in 01/2021

dev-ruby/bundler-2.1.4::gentoo
 * bundler-2.1.4.gem BLAKE2B SHA512 size ;-) ...                                     [ ok ]
>>> Unpacking source...
 * Running unpack phase for all ...
 * Unpacking .gem file... ...                           [ ok ]
 * Uncompressing metadata ...                           [ ok ]
 * Unpacking data.tar.gz ...                            [ ok ]
>>> Source unpacked in /var/tmp/portage/dev-ruby/bundler-2.1.4/work
>>> Preparing source in /var/tmp/portage/dev-ruby/bundler-2.1.4/work ...
 * Running prepare phase for all ...
 * Running prepare phase for all ...
 * Running source copy phase for ruby26 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-ruby/bundler-2.1.4/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-ruby/bundler-2.1.4/work ...
 * Running compile phase for all ...
/var/tmp/portage/dev-ruby/bundler-2.1.4/temp/environment: line 700: rdoc: command not found
Comment 8 Markus Giese 2021-01-16 15:36:30 UTC
# eselect ruby list
Available Ruby profiles:
  [1]   ruby25 *
  [2]   ruby26 (with Rubygems)
cori / # eselect ruby set 2
Successfully switched to profile:
  ruby26


and it worked, thanks
Comment 9 onkobu 2021-01-19 08:19:36 UTC
See also #744493, duplicating this one.
Comment 10 onkobu 2021-01-19 08:21:22 UTC
Now as link to bug #744493.
Comment 11 onkobu 2021-01-19 08:26:39 UTC
And how does this relate to bug #584906, bug #607450, bug #654308, bug #677104 and bug #728320?
Comment 12 Francisco Ares 2021-01-26 15:33:59 UTC
# eselect ruby set 2

as referring to

  [1]   ruby25
  [2]   ruby26 (with Rubygems) *

didn't work, also claims "rdoc" missing.

Trying "USE=-doc" it builds successfully.
Comment 13 David Mudrák 2021-01-30 17:15:58 UTC
As to some others above, switching (eselect) from ruby25 to ruby26 worked for me.
Comment 14 Marc Elser 2021-02-12 20:36:44 UTC
switching from ruby25 to rub26 also solved this for me
Comment 15 Toralf Förster gentoo-dev 2021-04-15 15:36:10 UTC
*** Bug 744493 has been marked as a duplicate of this bug. ***
Comment 16 Gary E. Miller 2021-05-26 20:24:59 UTC
(In reply to Marc Elser from comment #14)
> switching from ruby25 to rub26 also solved this for me

#MeToo
Comment 17 amano.kenji 2022-06-05 03:17:08 UTC
The issue is that dev-ruby/bundler is trying to build documentation with dev-ruby/rdoc, but rdoc's ruby version is higher than the version of /usr/bin/ruby during ruby upgrade.

rdoc doesn't exist for old ruby anymore.

bundler should use the version of ruby that has rdoc.
Comment 18 greymeister 2022-06-06 00:15:13 UTC
I resolved by adding to /etc/portage/make.conf:

RUBY_TARGETS="ruby26 ruby27"

Based on what was listed in 

eselect ruby list
Comment 19 Greg Kubaryk 2022-06-06 01:01:27 UTC
(In reply to greymeister from comment #18)
> I resolved by adding to /etc/portage/make.conf:
> 
> RUBY_TARGETS="ruby26 ruby27"
> 
> Based on what was listed in 
> 
> eselect ruby list

This is not a correct fix; ruby26 is going away, and you adding RUBY_TARGETS to make.conf undoes that. You will run into problems when 2.6 is removed from the repo unless you fix your system correctly. You should normally not need to specify RUBY_TARGETS at all; if you do, you will need to monitor future changes to the gentoo repo and keep the entry up to date yourself.

A correct workaround is mentioned elsewhere in this thread: use eselect to pick the newer ruby, complete the world update, and allow depclean to remove the old ruby. When this bug is fixed properly, you won't need to do that anymore. A proper fix would probably be something akin to the python-exec system (except for ruby).
Comment 20 amano.kenji 2022-06-06 13:54:34 UTC
Fiddling with ruby version is only a one-off workaround.

A permanent workaround is to remove doc USE flag from dev-ruby/bundler.

But, we need a proper fix.
Comment 21 Alarig Le Lay 2022-06-06 14:08:13 UTC
I can confirm that dev-ruby/bundler looks for a wrong command,

>>> Compiling source in /var/tmp/portage/dev-ruby/bundler-2.1.4/work ...
 * Running compile phase for ruby27 ...                                                                      [ ok ]
 * Running compile phase for all ...
/var/tmp/portage/dev-ruby/bundler-2.1.4/temp/environment: line 677: rdoc: command not found

~ % eix dev-ruby/rdoc
[I] dev-ruby/rdoc
     Available versions:  6.3.2^t ~6.3.3^t ~6.3.3-r1^t ~6.4.0^t {doc test RUBY_TARGETS="ruby26 ruby27 ruby30 ruby31"}
     Installed versions:  6.3.2^t(15:05:24 06/06/22)(-doc -test RUBY_TARGETS="ruby27 -ruby26 -ruby30")
     Homepage:            https://github.com/ruby/rdoc/
     Description:         An extended version of the RDoc library from Ruby 1.8

~ % eix dev-ruby/bundler
[I] dev-ruby/bundler
     Available versions:  (2) 2.1.4^t ~2.2.18^t ~2.2.24^t ~2.2.25^t ~2.2.29^t ~2.2.31^t ~2.2.33^t ~2.3.8^t
       {(+)doc test RUBY_TARGETS="ruby26 ruby27 ruby30 ruby31"}
     Installed versions:  2.1.4(2)^t(00:40:17 19/10/21)(doc -test RUBY_TARGETS="ruby26 ruby27")
     Homepage:            https://github.com/carlhuda/bundler
     Description:         An easy way to vendor gem dependencies

This command can’t exist
Comment 22 greymeister 2022-06-06 17:50:17 UTC
(In reply to amano.kenji from comment #20)
> Fiddling with ruby version is only a one-off workaround.
> 
> A permanent workaround is to remove doc USE flag from dev-ruby/bundler.
> 
> But, we need a proper fix.

This also works, thanks.
Comment 23 Benny Lønstrup Ammitzbøll 2022-06-09 11:51:46 UTC
In my case, the 'rdoc' was a broken symlink in /usr/bin pointing to rdoc26, which did not exist (any longer?), only rdoc27 and rdoc-2 existed. Updated the link to point to rdoc27 and the emerge update worked.

Note that my eselect ruby was ruby26. The rdoc27 and rdoc-2 are both ruby27 scripts, so it seems the rdoc26 got removed too early.

After --depclean I notice that the ruby26 gets removed and eselect ruby updates to ruby27. So something in that update is removing the rdoc26 too early.
Comment 24 Larry the Git Cow gentoo-dev 2022-07-18 13:32:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81a7a20fb3c4d6262f0ff6c9f5e47e3c1ac41ebb

commit 81a7a20fb3c4d6262f0ff6c9f5e47e3c1ac41ebb
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2022-07-18 13:28:56 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2022-07-18 13:32:22 +0000

    dev-ruby/bundler: drop default for doc USE flag
    
    Starting with bundler 2.2.0 the internal help pages are now bundled and
    don't require the doc USE flag to create. This removes the need to make
    it a default USE flag. This should make upgrading with standard USE
    flags much easier.
    
    Closes: https://bugs.gentoo.org/704164
    Closes: https://bugs.gentoo.org/849695
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 dev-ruby/bundler/bundler-2.2.33-r1.ebuild | 30 ++++++++++++++++++++++++++++++
 dev-ruby/bundler/bundler-2.3.8-r1.ebuild  | 30 ++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)