Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 765781 - dev-libs/stfl-0.24-r3[ruby]: `require` cannot load such file -- rubygems/compatibility (LoadError)
Summary: dev-libs/stfl-0.24-r3[ruby]: `require` cannot load such file -- rubygems/comp...
Status: RESOLVED DUPLICATE of bug 766231
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Cédric Krier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-17 17:44 UTC by Marco Sirabella
Modified: 2021-01-22 12:39 UTC (History)
3 users (show)

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


Attachments
emerge =dev-libs/stfl-0.24-r3 (build.log,7.34 KB, text/x-log)
2021-01-17 17:44 UTC, Marco Sirabella
Details
emerge --info (emerge.info,20.52 KB, application/x-info)
2021-01-17 17:45 UTC, Marco Sirabella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Sirabella 2021-01-17 17:44:52 UTC
Created attachment 683380 [details]
emerge =dev-libs/stfl-0.24-r3

Running into this problem when doing my @world upgrade

```
cd ruby && swig -ruby stfl.i && ruby extconf.rb
../swig/basedecls.i:87: Warning 314: 'dump' is a perl keyword
../swig/basedecls.i:181: Warning 314: 'dump' is a perl keyword
../swig/basedecls.i:51: Warning 801: Wrong class name (corrected to `Stfl_form')
../swig/basedecls.i:51: Warning 801: Wrong class name (corrected to `Stfl_form')
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)
make: *** [ruby/Makefile.snippet:27: ruby/build_ok] Error 1
```

Seems to be related to a bunch of other bugs:

- bug 493740
- bug 494914
- bug 628470
- bug 679446
- bug 709864
- bug 728210

Will be looking into workaround with them

```
# equery u =dev-libs/stfl-0.24-r3
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-libs/stfl-0.24-r3:
 U I
 + + examples                 : Install examples, usually source code
 + + perl                     : Add optional support/bindings for the Perl language
 + + python                   : Add optional support/bindings for the Python language
 + + python_targets_python3_7 : Build with Python 3.7
 + + python_targets_python3_8 : Build with Python 3.8
 + + ruby                     : Add support/bindings for the Ruby language
 - - static-libs              : Build static versions of dynamic libraries as well
```

```
# equery g =dev-libs/stfl-0.24-r3
 * Searching for stfl0.24-r3 in dev-libs ...

 * dependency graph for dev-libs/stfl-0.24-r3
 `--  dev-libs/stfl-0.24-r3  amd64 
   `--  sys-libs/ncurses-6.2-r1  (sys-libs/ncurses) amd64  [unicode]
   `--  dev-lang/perl-5.30.3  (dev-lang/perl) amd64 
   `--  dev-lang/ruby-2.6.6-r2  (dev-lang/ruby) amd64 
   `--  dev-lang/python-3.7.9-r1  (dev-lang/python) amd64 
   `--  dev-lang/python-3.8.6-r1  (dev-lang/python) amd64 
   `--  dev-lang/python-exec-2.4.6-r2  (>=dev-lang/python-exec-2) amd64  [python_targets_python3_7(-)? python_targets_python3_8(-)? -python_single_target_python3_7(-) -python_single_target_python3_8(-)]
   `--  dev-lang/swig-4.0.2  (dev-lang/swig) amd64 
[ dev-libs/stfl-0.24-r3 stats: packages (8), max depth (1) ]
```

Looks like this package is pulling in ruby 2.6.6, but the error is happening in a ruby 2.5.0 directory

```
# equery u rubygems
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-ruby/rubygems-3.0.3:
 U I
 - - ruby_targets_ruby25 : Build with MRI Ruby 2.5.x
 + + ruby_targets_ruby26 : Build with MRI Ruby 2.6.x
 - - server              : Install support for the rubygems server 
 - - test                : Enable dependencies and/or preparations necessary to run tests (usually
                           controlled by FEATURES=test but can be toggled independently)
```
No rubygems 2.5 installed
Comment 1 Marco Sirabella 2021-01-17 17:45:25 UTC
Created attachment 683383 [details]
emerge --info
Comment 2 Marco Sirabella 2021-01-17 18:14:21 UTC
Ah, seems just `ruby` fails with the same error:
```
# ruby
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)
```

```
# eselect ruby list
Available Ruby profiles:
  [1]   ruby25 *
  [2]   ruby26 (with Rubygems)
```

Setting ruby to ruby26 fixes everything, and this isn't exactly a bug with stfl
Comment 3 Ionen Wolkens gentoo-dev 2021-01-17 18:41:28 UTC
(In reply to Marco Sirabella from comment #2)
> Setting ruby to ruby26 fixes everything, and this isn't exactly a bug with
> stfl
I imagine it's a side effect of:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fce4bffe1e726c075ccada6725ca85a1d77aebad

Perhaps not entirely elegantly handled if was set to ruby25. Time to move on from 25 either way.
Comment 4 Ionen Wolkens gentoo-dev 2021-01-22 12:39:48 UTC

*** This bug has been marked as a duplicate of bug 766231 ***