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

Bug 709864

Summary: dev-ruby/* - /usr/lib64/ruby/2.4.0/rubygems.rb:17:in `require': cannot load such file -- rubygems/compatibility (LoadError)
Product: Gentoo Linux Reporter: Mamadou Babaei <info>
Component: Current packagesAssignee: Gentoo Ruby Team <ruby>
Status: CONFIRMED ---    
Severity: normal CC: esigra, josef64, prote, stoffepojken
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mamadou Babaei 2020-02-16 22:33:57 UTC
Now anything ruby-related fails:

$ emerge -uDN @world 

Calculating dependencies... done!
[ebuild     U  ] sys-libs/glibc-2.30-r4 [2.30-r3]
[ebuild  N     ] dev-ruby/power_assert-1.1.5  USE="-doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/rake-13.0.1  USE="-doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/test-unit-3.3.5  USE="-doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/json-2.3.0  USE="-doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/did_you_mean-1.2.1  USE="-test" RUBY_TARGETS="ruby25" 
[ebuild  N     ] dev-ruby/minitest-5.14.0  USE="-doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/xmlrpc-0.3.0  USE="-doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/net-telnet-0.2.0  USE="-doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/did_you_mean-1.1.2  USE="-test" RUBY_TARGETS="ruby24" 
[ebuild  N     ] dev-ruby/did_you_mean-1.4.0  USE="-test" RUBY_TARGETS="ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/kpeg-1.1.0-r1  USE="-doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/racc-1.4.16-r1  USE="-doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/rdoc-6.2.0  USE="-doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild  N     ] dev-ruby/bundler-2.1.4  USE="doc -test" RUBY_TARGETS="ruby24 ruby25 ruby27 -ruby26" 
[ebuild   R    ] dev-ruby/fast_xs-0.8.0-r2  RUBY_TARGETS="-ruby27%" 
[ebuild     U  ] dev-ruby/msgpack-1.3.3 [1.3.1] RUBY_TARGETS="-ruby27%" 
[ebuild   R    ] dev-ruby/multi_json-1.14.1  RUBY_TARGETS="-ruby27%" 
[ebuild   R    ] dev-ruby/hpricot-0.8.6-r5  RUBY_TARGETS="-ruby27%" 
[ebuild     U  ] net-libs/webkit-gtk-2.26.4-r1 [2.26.2] USE="-gtk-doc%" 
[ebuild     U  ] media-libs/libprojectm-3.1.2 [3.1.1_rc8-r1]
[ebuild     U  ] mail-client/geary-3.34.2-r3 [3.34.2-r1]
[ebuild   R    ] www-client/torbrowser-launcher-0.3.2  PYTHON_TARGETS="(-python3_6%*) (-python3_7%)" 

WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

media-libs/libvpx:0

  (media-libs/libvpx-1.8.2:0/6::gentoo, ebuild scheduled for merge) USE="highbitdepth postproc svc threads -doc -static-libs -test" ABI_X86="(64) -32 (-x32)" conflicts with
    =media-libs/libvpx-1.7*:0=[postproc] required by (www-client/firefox-73.0:0/0::gentoo, installed) USE="gmp-autoupdate pulseaudio screenshot startup-notification system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite system-webp -bindist -clang -custom-cflags -custom-optimization -debug -eme-free -geckodriver -hardened -hwaccel -jack -lto -pgo (-selinux) -test -wayland -wifi" ABI_X86="(64)" CPU_FLAGS_X86="avx2" L10N="fa nl -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-CA -en-GB -eo -es-AR -es-CL -es-ES -es-MX -et -eu -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -ur -uz -vi -xh -zh-CN -zh-TW"
    ^                  ^^^^             
    =media-libs/libvpx-1.7*:0/5=[postproc] required by (www-client/firefox-73.0:0/0::gentoo, installed) USE="gmp-autoupdate pulseaudio screenshot startup-notification system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite system-webp -bindist -clang -custom-cflags -custom-optimization -debug -eme-free -geckodriver -hardened -hwaccel -jack -lto -pgo (-selinux) -test -wayland -wifi" ABI_X86="(64)" CPU_FLAGS_X86="avx2" L10N="fa nl -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-CA -en-GB -eo -es-AR -es-CL -es-ES -es-MX -et -eu -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -ur -uz -vi -xh -zh-CN -zh-TW"
    ^                  ^^^^^^^^^          

dev-python/fonttools:0

  (dev-python/fonttools-4.1.0:0/0::gentoo, ebuild scheduled for merge) USE="-test" ABI_X86="(64)" PYTHON_TARGETS="python3_6 -python3_7" conflicts with
    >=dev-python/fonttools-3.32.0[python_targets_python2_7(-),python_targets_python3_6(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/booleanOperations-0.8.2:0/0::gentoo, installed) USE="" ABI_X86="(64)" PYTHON_TARGETS="python2_7 python3_6 -python3_7"
                                                                                                                                                                                                   
    >=dev-python/fonttools-3.31.0[python_targets_python2_7(-),python_targets_python3_6(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/defcon-0.6.0:0/0::gentoo, installed) USE="" ABI_X86="(64)" PYTHON_TARGETS="python2_7 python3_6 -python3_7"
                                                                                                                                                                                                   

dev-python/markdown:0

  (dev-python/markdown-3.2.1:0/0::gentoo, ebuild scheduled for merge) USE="-doc -test" ABI_X86="(64)" PYTHON_TARGETS="python3_6 -pypy3 -python3_7 -python3_8" conflicts with
    dev-python/markdown[python_targets_python2_7(-),-python_single_target_python2_7(-)] required by (dev-python/cheetah-2.4.4-r1:0/0::gentoo, installed) USE="" ABI_X86="(64)" PYTHON_TARGETS="python2_7"
                                                                                       

>>> Verifying ebuild manifests
>>> Running pre-merge checks for sys-libs/glibc-2.30-r4
 * Checking general environment sanity.
make -j9 -l8 glibc-test 
cc -march=native -O2 -pipe   -Wl,-O1 -Wl,--sort-common -Wl,--as-needed  glibc-test.c   -o glibc-test
 * Checking that IA32 emulation is enabled in the running kernel ...                                                                                                                                         [ ok ]
 * Checking gcc for __thread support ...                                                                                                                                                                     [ ok ]
 * Checking running kernel version (4.19.104 >= 3.2.0) ...                                                                                                                                                   [ ok ]
 * Checking linux-headers version (5.5.0 >= 3.2.0) ...                                                                                                                                                       [ ok ]
>>> Running pre-merge checks for net-libs/webkit-gtk-2.26.4-r1
>>> Emerging (1 of 23) sys-libs/glibc-2.30-r4::gentoo
>>> Installing (1 of 23) sys-libs/glibc-2.30-r4::gentoo
>>> Emerging (2 of 23) dev-ruby/power_assert-1.1.5::gentoo
>>> Emerging (3 of 23) media-libs/libprojectm-3.1.2::gentoo
>>> Failed to emerge dev-ruby/power_assert-1.1.5, Log file:
>>>  '/var/tmp/portage/dev-ruby/power_assert-1.1.5/temp/build.log'
>>> Failed to emerge media-libs/libprojectm-3.1.2, Log file:
>>>  '/var/tmp/portage/media-libs/libprojectm-3.1.2/temp/build.log'
>>> Jobs: 1 of 23 complete, 2 failed                Load avg: 2.52, 3.63, 3.42
*** Resuming merge...
Calculating dependencies... done!

 * Messages for package sys-libs/glibc-2.30-r4:

 * Applying Gentoo Glibc Patchset 2.30-5

 * Messages for package dev-ruby/power_assert-1.1.5:

 * ERROR: dev-ruby/power_assert-1.1.5::gentoo failed (install phase):
 *   Unable to generate gemspec file.
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_install
 *   environment, line 2102:  Called ruby-ng_src_install
 *   environment, line 1746:  Called _ruby_each_implementation 'each_ruby_install'
 *   environment, line  571:  Called _ruby_invoke_environment 'ruby24' 'each_ruby_install'
 *   environment, line  692:  Called each_ruby_install
 *   environment, line  880:  Called each_fakegem_install
 *   environment, line  850:  Called ruby_fakegem_install_gemspec
 *   environment, line 1998:  Called die
 * The specific snippet of code:
 *       fi ) || die "Unable to generate gemspec file.";
 * 
 * If you need support, post the output of `emerge --info '=dev-ruby/power_assert-1.1.5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-ruby/power_assert-1.1.5::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-ruby/power_assert-1.1.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-ruby/power_assert-1.1.5/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-ruby/power_assert-1.1.5/work/ruby24/power_assert-1.1.5'
 * S: '/var/tmp/portage/dev-ruby/power_assert-1.1.5/work/ruby24/power_assert-1.1.5'

 * Messages for package media-libs/libprojectm-3.1.2:

 * ERROR: media-libs/libprojectm-3.1.2::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  125:  Called src_configure
 *             environment, line 1478:  Called econf '--disable-gles' '--enable-qt' '--enable-sdl' '--enable-emscripten=no'
 *        phase-helpers.sh, line  681:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=media-libs/libprojectm-3.1.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/libprojectm-3.1.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-libs/libprojectm-3.1.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/libprojectm-3.1.2/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/libprojectm-3.1.2/work/projectm-3.1.2'
 * S: '/var/tmp/portage/media-libs/libprojectm-3.1.2/work/projectm-3.1.2/'
 * One or more packages are either masked or have missing dependencies:
 * 
 *   >=dev-ruby/power_assert-1.1.1[ruby_targets_ruby25] pulled in by:
 *     (dev-lang/ruby-2.5.7:2.5/2.5::gentoo, installed)
 * 
 *   >=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24] pulled in by:
 *     (dev-lang/ruby-2.4.9:2.4/2.4::gentoo, installed)
 * 
 *   >=dev-ruby/power_assert-1.1.5[ruby_targets_ruby27] pulled in by:
 *     (dev-lang/ruby-2.7.0:2.7/2.7::gentoo, installed)
 * 
 * The resume list contains packages that are either masked or have
 * unsatisfied dependencies. Please restart/continue the operation
 * manually, or use --skipfirst to skip the first package in the list and
 * any other packages that may be masked or have missing dependencies.
 * 
 * The following 2 packages have failed to build, install, or execute
 * postinst:
 * 
 *  (dev-ruby/power_assert-1.1.5:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/dev-ruby/power_assert-1.1.5/temp/build.log'
 *  (media-libs/libprojectm-3.1.2:0/2::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/media-libs/libprojectm-3.1.2/temp/build.log'
 * 

 * GNU info directory index is up-to-date.

!!! existing preserved libs:
>>> package: app-text/gspell-1.8.3
 *  - /usr/lib64/libgspell-1.so.1
 *  - /usr/lib64/libgspell-1.so.1.3.0
 *      used by /usr/bin/geary (mail-client/geary-3.34.2-r1)
Use emerge @preserved-rebuild to rebuild packages using these libraries
 * After world updates, it is important to remove obsolete packages with
 * emerge --depclean. Refer to `man emerge` for more information.


Reproducible: Always

Steps to Reproduce:
1. emerge -uDN @world 
2. 
3.
Actual Results:  
dev-ruby/* breaks the upgrade process and trying to build anything from dev-ruby/* fails

Expected Results:  
The world upgrade should succeed. But, dev-ruby/* breaks the upgrade process.

 * Package:    dev-ruby/power_assert-1.1.5
 * Repository: gentoo
 * Maintainer: ruby@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux ruby_targets_ruby24 ruby_targets_ruby25 ruby_targets_ruby27 userland_GNU
 * FEATURES:   ccache network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
 * Running unpack phase for all ...
>>> Unpacking power_assert-1.1.5.tar.gz to /var/tmp/portage/dev-ruby/power_assert-1.1.5/work/all
>>> Source unpacked in /var/tmp/portage/dev-ruby/power_assert-1.1.5/work
>>> Preparing source in /var/tmp/portage/dev-ruby/power_assert-1.1.5/work ...
 * Running prepare phase for all ...
 * Running prepare phase for all ...
 * Running source copy phase for ruby24 ...
 * Running source copy phase for ruby25 ...
 * Running source copy phase for ruby27 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-ruby/power_assert-1.1.5/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-ruby/power_assert-1.1.5/work ...
 * Running compile phase for all ...
>>> Source compiled.
 * Skipping make test/check due to ebuild restriction.
>>> Test phase [disabled because of RESTRICT=test]: dev-ruby/power_assert-1.1.5

>>> Install dev-ruby/power_assert-1.1.5 into /var/tmp/portage/dev-ruby/power_assert-1.1.5/image
 * Running install phase for ruby24 ...
/usr/lib64/ruby/2.4.0/rubygems.rb:17:in `require': cannot load such file -- rubygems/compatibility (LoadError)
	from /usr/lib64/ruby/2.4.0/rubygems.rb:17:in `<top (required)>'
	from <internal:gem_prelude>:4:in `require'
	from <internal:gem_prelude>:4:in `<internal:gem_prelude>'
 * ERROR: dev-ruby/power_assert-1.1.5::gentoo failed (install phase):
 *   Unable to generate gemspec file.
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_install
 *   environment, line 2102:  Called ruby-ng_src_install
 *   environment, line 1746:  Called _ruby_each_implementation 'each_ruby_install'
 *   environment, line  571:  Called _ruby_invoke_environment 'ruby24' 'each_ruby_install'
 *   environment, line  692:  Called each_ruby_install
 *   environment, line  880:  Called each_fakegem_install
 *   environment, line  850:  Called ruby_fakegem_install_gemspec
 *   environment, line 1998:  Called die
 * The specific snippet of code:
 *       fi ) || die "Unable to generate gemspec file.";
 * 
 * If you need support, post the output of `emerge --info '=dev-ruby/power_assert-1.1.5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-ruby/power_assert-1.1.5::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-ruby/power_assert-1.1.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-ruby/power_assert-1.1.5/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-ruby/power_assert-1.1.5/work/ruby24/power_assert-1.1.5'
 * S: '/var/tmp/portage/dev-ruby/power_assert-1.1.5/work/ruby24/power_assert-1.1.5'
Comment 1 Hans de Graaff gentoo-dev Security 2020-02-17 19:11:27 UTC
Which version of ruby is eselected? And does this match your current RUBY_TARGETS?
Comment 2 Mamadou Babaei 2020-02-17 19:50:21 UTC
Well, I don't know why the title is changed. This is not specific to dev-ruby/power_assert. Emerging anything from dev-ruby/* fails with similar errors.

$ eselect ruby list
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
  [3]   ruby27 (with Rubygems)

I tried:

$ eselect ruby set ruby27

It does not make any difference. As I mentioned earlier after emerge --sync this bug appeared. I did not touch the RUBY_TARGETS default in make.conf.

$ emerge --info

Portage 2.3.89 (python 3.6.10-final-0, default/linux/amd64/17.1/desktop, gcc-9.2.0, glibc-2.30-r4, 4.19.104 x86_64)
=================================================================
System uname: Linux-4.19.104-x86_64-Intel-R-_Core-TM-_i7-6820HK_CPU_@_2.70GHz-with-gentoo-2.7
KiB Mem:    65902184 total,   7435248 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 16 Feb 2020 21:38:08 +0000
Head commit of repository gentoo: 42a7aa22438062085a3a3314a283c50ccc7042ca

sh bash 5.0_p16
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
ccache version 3.7.7 [enabled]
app-shells/bash:          5.0_p16::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.1::gentoo
dev-util/ccache:          3.7.7-r1::gentoo
dev-util/cmake:           3.16.4::gentoo
sys-apps/baselayout:      2.7::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.11.6-r3::gentoo, 1.16.1-r2::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo, 2.34::gentoo
sys-devel/gcc:            9.2.0-r4::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: 10

NuLL3rr0r
    location: /var/lib/layman/NuLL3rr0r
    masters: gentoo
    priority: 50

local
    location: /usr/local/portage
    masters: gentoo
    priority: 50

torbrowser
    location: /var/lib/layman/torbrowser
    masters: gentoo
    priority: 50

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="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=8 --load-average=8 --keep-going --with-bdeps=y"
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="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="en_US en fa_IR fa nl_NL nl"
MAKEOPTS="-j9 -l8"
PKGDIR="/var/cache/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="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus dri dts dvd dvdr emboss encode exif flac fortran gdbm gif gpm gtk iconv icu ipv6 jpeg lcms ldap libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp spell split-usr ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" 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 f16c fma3 mmx mmxext pclmul 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="joystick keyboard libinput mouse" KERNEL="linux" L10N="en-US en fa-IR fa nl-NL nl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LLVM_TARGETS="BPF NVPTX X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="nvidia v4l" 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 3 josef.95 2020-02-18 21:18:02 UTC
Just for Info,
additional info is in https://forums.gentoo.org/viewtopic-t-1108504.html available.
Comment 4 Mamadou Babaei 2020-02-22 04:00:22 UTC
This is indeed intersting:

$ gem environment
  
/usr/lib64/ruby/2.4.0/rubygems.rb:17:in `require': cannot load such file -- rubygems/compatibility (LoadError)
	from /usr/lib64/ruby/2.4.0/rubygems.rb:17:in `<top (required)>'
	from <internal:gem_prelude>:4:in `require'
	from <internal:gem_prelude>:4:in `<internal:gem_prelude>'

$ eselect ruby set ruby25

gem environment

Traceback (most recent call last):
	3: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
	2: from <internal:gem_prelude>:2:in `require'
	1: from /usr/lib64/ruby/2.5.0/rubygems.rb:17:in `<top (required)>'
/usr/lib64/ruby/2.5.0/rubygems.rb:17:in `require': cannot load such file -- rubygems/compatibility (LoadError)

I don't know what caused this mess :|
Comment 5 Mamadou Babaei 2020-02-23 06:27:46 UTC
OK, this is indeed a bug.

$ find /usr/lib64/ruby -iname compatibility.rb

Returns nothing. No matter what I do (uninstall dev-ruby/* and rebuilding ruby and rubygems ebuilds), the above command won't return any compatibility.rb file.

And, how did I resolved it using a hack?

I did installed rvm as user. Then:

$ cp -vr cp -vr /home/mamadou/.rvm/rubies/ruby-2.6.3/lib/ruby /usr/lib64

Then:

$ cat /etc/portage/package.accept_keywords/dev-lang_ruby
dev-lang/ruby -~amd64
dev-lang/ruby:2.6

$ cat /etc/portage/make.conf
...
RUBY_TARGETS="ruby26"

Then the following command succeeds (with warnings from portage regarding file collisions):

$ emerge -auDN @world
Comment 6 Hans de Graaff gentoo-dev Security 2020-02-23 06:44:37 UTC
(In reply to Mohammad S. Babaei from comment #4)
> This is indeed intersting:
> 
> $ gem environment
>   
> /usr/lib64/ruby/2.4.0/rubygems.rb:17:in `require': cannot load such file --
> rubygems/compatibility (LoadError)
> 	from /usr/lib64/ruby/2.4.0/rubygems.rb:17:in `<top (required)>'
> 	from <internal:gem_prelude>:4:in `require'
> 	from <internal:gem_prelude>:4:in `<internal:gem_prelude>'

This file (rubygems/compatibility.rb) is installed by dev-ruby/rubygems, so perhaps that did not get installed for some reason.
Comment 7 Mamadou Babaei 2020-02-23 06:49:00 UTC
(In reply to Hans de Graaff from comment #6)
> (In reply to Mohammad S. Babaei from comment #4)
> > This is indeed intersting:
> > 
> > $ gem environment
> >   
> > /usr/lib64/ruby/2.4.0/rubygems.rb:17:in `require': cannot load such file --
> > rubygems/compatibility (LoadError)
> > 	from /usr/lib64/ruby/2.4.0/rubygems.rb:17:in `<top (required)>'
> > 	from <internal:gem_prelude>:4:in `require'
> > 	from <internal:gem_prelude>:4:in `<internal:gem_prelude>'
> 
> This file (rubygems/compatibility.rb) is installed by dev-ruby/rubygems, so
> perhaps that did not get installed for some reason.

I emerged dev-ruby/rubygems many times, but it won't install that file.

In addition to that I disabled -rdoc useflag on ruby ebuild, but still portage pulls in rdoc and it fails. The reset of dev-ruby/* builds fine.


 * Package:    dev-ruby/rdoc-6.2.0
 * Repository: gentoo
 * Maintainer: ruby@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux ruby_targets_ruby26 userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
 * Running unpack phase for all ...
>>> Unpacking rdoc-6.2.0.tar.gz to /var/tmp/portage/dev-ruby/rdoc-6.2.0/work/all
>>> Source unpacked in /var/tmp/portage/dev-ruby/rdoc-6.2.0/work
>>> Preparing source in /var/tmp/portage/dev-ruby/rdoc-6.2.0/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/rdoc-6.2.0/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-ruby/rdoc-6.2.0/work ...
 * Running compile phase for ruby26 ...
[1mTraceback[m (most recent call last):
	4: from /usr/bin/rake:9:in `<main>'
	3: from /usr/bin/rake:9:in `load'
	2: from /usr/lib64/ruby/gems/2.6.0/gems/rake-13.0.1/exe/rake:25:in `<top (required)>'
	1: from /usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': [1mcannot load such file -- rake ([1;4mLoadError[m[1m)[m
 * ERROR: dev-ruby/rdoc-6.2.0::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 2223:  Called ruby-ng_src_compile
 *   environment, line 1861:  Called _ruby_each_implementation 'each_ruby_compile'
 *   environment, line  573:  Called _ruby_invoke_environment 'ruby26' 'each_ruby_compile'
 *   environment, line  694:  Called each_ruby_compile
 *   environment, line  896:  Called die
 * The specific snippet of code:
 *       ${RUBY} -S rake generate || die
 * 
 * If you need support, post the output of `emerge --info '=dev-ruby/rdoc-6.2.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-ruby/rdoc-6.2.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-ruby/rdoc-6.2.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-ruby/rdoc-6.2.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-ruby/rdoc-6.2.0/work/ruby26/rdoc-6.2.0'
 * S: '/var/tmp/portage/dev-ruby/rdoc-6.2.0/work/ruby26/rdoc-6.2.0'
Comment 8 Mamadou Babaei 2021-03-30 08:04:39 UTC
A fresh install on a new machine and faced the same issue again with:

emerge auDN @world

This is really annoying. My emerge --info:

Portage 3.0.17 (python 3.8.8-final-0, default/linux/amd64/17.1/desktop, gcc-10.2.0, glibc-2.32-r8, 5.10.26 x86_64)
=================================================================
System uname: Linux-5.10.26-x86_64-Intel-R-_Core-TM-_i5-5257U_CPU_@_2.70GHz-with-glibc2.2.5
KiB Mem:     8050628 total,   1317056 free
KiB Swap:    8388604 total,   8354556 free
Timestamp of repository gentoo: Sat, 20 Mar 2021 23:51:08 +0000
Head commit of repository gentoo: 61bca4f55956a3aa81e4e6feb665ecb7ce52e11d

sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
ccache version 4.2 [enabled]
app-shells/bash:          5.1_p4::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          2.7.18_p7::gentoo, 3.7.10::gentoo, 3.8.8::gentoo, 3.9.2::gentoo
dev-util/ccache:          4.2::gentoo
dev-util/cmake:           3.19.7::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.21::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.71::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.2.0-r5::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r8::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: 10
    sync-git-verify-commit-signature: true

NuLL3rr0r
    location: /var/lib/layman/NuLL3rr0r
    masters: gentoo
    priority: 50

local
    location: /usr/local/portage
    masters: gentoo
    priority: 50

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/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="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=4 --keep-going --with-bdeps=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="en_US en fa_IR fa nl_NL nl"
MAKEOPTS="-j5 -l4"
PKGDIR="/var/cache/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="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr elogind emboss encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg lcms libglvnd libnotify libtirpc lm-sensors mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp spell split-usr ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" 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="aaes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand 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="joystick keyboard libinput mouse" KERNEL="linux" L10N="en-US en fa-IR fa nl-NL nl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LLVM_TARGETS="BPF NVPTX X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres13" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel iris v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto 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 9 Mamadou Babaei 2021-03-30 08:05:22 UTC
The build log for xmlrpc on this new machine:

 * Package:    dev-ruby/xmlrpc-0.3.2
 * Repository: gentoo
 * Maintainer: ruby@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux ruby_targets_ruby26 ruby_targets_ruby27 userland_GNU
 * FEATURES:   ccache network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
 * Running unpack phase for all ...
>>> Unpacking xmlrpc-0.3.2.tar.gz to /var/tmp/portage/dev-ruby/xmlrpc-0.3.2/work/all
>>> Source unpacked in /var/tmp/portage/dev-ruby/xmlrpc-0.3.2/work
>>> Preparing source in /var/tmp/portage/dev-ruby/xmlrpc-0.3.2/work ...
 * Running prepare phase for all ...
 * Running prepare phase for all ...
 * Running source copy phase for ruby26 ...
 * Running source copy phase for ruby27 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-ruby/xmlrpc-0.3.2/work ...
 * Running configure phase for ruby26 ...
 * Running configure phase for ruby27 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-ruby/xmlrpc-0.3.2/work ...
 * Running compile phase for ruby26 ...
 * Running compile phase for ruby27 ...
 * Running compile phase for all ...
>>> Source compiled.
 * Skipping make test/check due to ebuild restriction.
>>> Test phase [disabled because of RESTRICT=test]: dev-ruby/xmlrpc-0.3.2

>>> Install dev-ruby/xmlrpc-0.3.2 into /var/tmp/portage/dev-ruby/xmlrpc-0.3.2/image
 * Running install phase for ruby26 ...
 * Running install phase for ruby27 ...
[1mTraceback[m (most recent call last):
	3: from <internal:gem_prelude>:1:in `<internal:gem_prelude>'
	2: from <internal:gem_prelude>:1:in `require'
	1: from /usr/lib64/ruby/2.7.0/rubygems.rb:16:in `<top (required)>'
/usr/lib64/ruby/2.7.0/rubygems.rb:16:in `require': [1mcannot load such file -- rubygems/compatibility ([1;4mLoadError[m[1m)[m
 * ERROR: dev-ruby/xmlrpc-0.3.2::gentoo failed (install phase):
 *   Unable to generate gemspec file.
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_install
 *   environment, line 2156:  Called ruby-ng_src_install
 *   environment, line 1800:  Called _ruby_each_implementation 'each_ruby_install'
 *   environment, line  555:  Called _ruby_invoke_environment 'ruby27' 'each_ruby_install'
 *   environment, line  680:  Called each_ruby_install
 *   environment, line  897:  Called each_fakegem_install
 *   environment, line  850:  Called ruby_fakegem_install_gemspec
 *   environment, line 2052:  Called die
 * The specific snippet of code:
 *       fi ) || die "Unable to generate gemspec file.";
 * 
 * If you need support, post the output of `emerge --info '=dev-ruby/xmlrpc-0.3.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-ruby/xmlrpc-0.3.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-ruby/xmlrpc-0.3.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-ruby/xmlrpc-0.3.2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-ruby/xmlrpc-0.3.2/work/ruby27/xmlrpc-0.3.2'
 * S: '/var/tmp/portage/dev-ruby/xmlrpc-0.3.2/work/ruby27/xmlrpc-0.3.2'
Comment 10 Mamadou Babaei 2021-03-30 08:18:46 UTC
There seems to be similar issues to this one: #628470 and #704984
Comment 12 Patrick Lauer gentoo-dev 2021-04-06 18:00:26 UTC
This reliably happens while installing any ruby things, without older ruby installed. As far as I can reverse-engineer the failure:

/var/tmp/portage/dev-ruby/rubygems-3.2.14/work/ruby27/rubygems-3.2.14/lib/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- did_you_mean (LoadError)

rubygems fails to build properly, then anything trying to use rubygems fails

 grep -R did_you_mean usr/ -R
grep: usr/lib64/libruby27.so.2.7.3: binary file matches


did_you_mean is used by ruby interpreter itself, and if did_you_mean is not installed things just break in these weird ways.


I locally patched the ruby-2.7.3 ebuild src_install:
-       rm -rf lib/did_you_mean* || die
+       #rm -rf lib/did_you_mean* || die

This allows installing rubygems properly, and then installing did_you_mean

I have no idea if this is a correct solution or if it has any side-effects, but it looks like did_you_mean is a core part of ruby by accident.

Also, this can't be easily solved since did_you_mean needs rubygems to install, and rubygems needs did_you_mean, so ... circular dependency?
Comment 13 Patrick Lauer gentoo-dev 2021-04-06 18:02:29 UTC
To be more precise:

This is not a problem with ruby26, I can only reproduce it with ruby27
Comment 14 Naohiro Aota gentoo-dev 2021-04-06 23:57:50 UTC
(In reply to Patrick Lauer from comment #12)
> Also, this can't be easily solved since did_you_mean needs rubygems to
> install, and rubygems needs did_you_mean, so ... circular dependency?

I think we can break the dependency chain from rubygem to did_you_mean, by disabling its usage in the eclass files.

See my comment here

https://bugs.gentoo.org/705346#c5