Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 560026 - unable to install dev-ruby/json: cannot load such file -- rake (LoadError)
Summary: unable to install dev-ruby/json: cannot load such file -- rake (LoadError)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-09 10:02 UTC by YLD
Modified: 2015-09-14 14:03 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description YLD 2015-09-09 10:02:31 UTC
Compilation trace

>>> Emerging (1 of 1) dev-ruby/json-1.8.2-r1::gentoo
>>> Downloading 'ftp://ftp.free.fr/mirrors/ftp.gentoo.org/distfiles/json-1.8.2.gem'
pathconf: Permission denied
--2015-09-09 11:57:49--  ftp://ftp.free.fr/mirrors/ftp.gentoo.org/distfiles/json-1.8.2.gem
           => ‘/usr/portage/distfiles/json-1.8.2.gem’
Resolving ftp.free.fr (ftp.free.fr)... 212.27.60.27, 2a01:e0c:1:1598::1
Connecting to ftp.free.fr (ftp.free.fr)|212.27.60.27|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /mirrors/ftp.gentoo.org/distfiles ... done.
==> SIZE json-1.8.2.gem ... 152064
==> PASV ... done.    ==> RETR json-1.8.2.gem ... done.
Length: 152064 (148K) (unauthoritative)

json-1.8.2.gem      100%[=====================>] 148,50K   227KB/s   in 0,7s   

2015-09-09 11:58:04 (227 KB/s) - ‘/usr/portage/distfiles/json-1.8.2.gem’ saved [152064]

 * json-1.8.2.gem SHA256 SHA512 WHIRLPOOL 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/json-1.8.2-r1/work
>>> Preparing source in /var/tmp/portage/dev-ruby/json-1.8.2-r1/work ...
 * Running prepare phase for all ...
 * Running source copy phase for ruby20 ...
 * Running source copy phase for ruby21 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-ruby/json-1.8.2-r1/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-ruby/json-1.8.2-r1/work ...
 * Running compile phase for ruby20 ...
/usr/lib64/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rake (LoadError)
        from /usr/lib64/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
 * ERROR: dev-ruby/json-1.8.2-r1::gentoo failed (compile phase):
 *   extension compile failed
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 4353:  Called ruby-ng_src_compile
 *   environment, line 4042:  Called _ruby_each_implementation 'each_ruby_compile'
 *   environment, line  512:  Called _ruby_invoke_environment 'ruby20' 'each_ruby_compile'
 *   environment, line  607:  Called each_ruby_compile
 *   environment, line  891:  Called die
 * The specific snippet of code:
 *           ${RUBY} -S rake compile || die "extension compile failed";
 * 
 * If you need support, post the output of `emerge --info '=dev-ruby/json-1.8.2-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-ruby/json-1.8.2-r1::gentoo'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME="/home/yves/.gentoo/java-config-2/current-user-vm"
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info =json-1.8.2
 * The complete build log is located at '/var/tmp/portage/dev-ruby/json-1.8.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-ruby/json-1.8.2-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-ruby/json-1.8.2-r1/work/ruby20/json-1.8.2'
 * S: '/var/tmp/portage/dev-ruby/json-1.8.2-r1/work/ruby20/json-1.8.2'

>>> Failed to emerge dev-ruby/json-1.8.2-r1, Log file:

>>>  '/var/tmp/portage/dev-ruby/json-1.8.2-r1/temp/build.log'

 * Messages for package dev-ruby/json-1.8.2-r1:

 * ERROR: dev-ruby/json-1.8.2-r1::gentoo failed (compile phase):
 *   extension compile failed
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 4353:  Called ruby-ng_src_compile
 *   environment, line 4042:  Called _ruby_each_implementation 'each_ruby_compile'
 *   environment, line  512:  Called _ruby_invoke_environment 'ruby20' 'each_ruby_compile'
 *   environment, line  607:  Called each_ruby_compile
 *   environment, line  891:  Called die
 * The specific snippet of code:
 *           ${RUBY} -S rake compile || die "extension compile failed";
 * 
 * If you need support, post the output of `emerge --info '=dev-ruby/json-1.8.2-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-ruby/json-1.8.2-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-ruby/json-1.8.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-ruby/json-1.8.2-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-ruby/json-1.8.2-r1/work/ruby20/json-1.8.2'
 * S: '/var/tmp/portage/dev-ruby/json-1.8.2-r1/work/ruby20/json-1.8.2'


System informations:

emerge --info
Portage 2.2.20.1 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.8.5, glibc-2.20-r2, 3.16.5-gentoo-builtin-5 x86_64)
=================================================================
System uname: Linux-3.16.5-gentoo-builtin-5-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    12291740 total,    875632 free
KiB Swap:   11718652 total,  11692900 free
Timestamp of repository gentoo: Mon, 07 Sep 2015 07:30:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.3.5-r1::gentoo, 3.4.1::gentoo
dev-util/cmake:           3.2.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.7.3-r1::gentoo, 4.8.5::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

johu
    location: /var/lib/layman/johu
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=corei7-avx -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://mirror.ovh.net/gentoo-distfiles/ http://mirror.ovh.net/gentoo-distfiles/"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS=" -j9 "
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"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac aalib acl acpi akonadi alsa amd64 ao attica bash-completion berkdb bidi bittorrent bluetooth branding bzip2 cairo caps cdda cddb cdinstall cdparanoia cdr cgi chm cjk clamav cli consolekit cracklib crypt cs cscope ctype cups curl curlwrappers cvs cxx dbus declarative designer dga djvu dri dts dv dvd dvdr emboss encode enscript exif expat extras fam fatcgi ffmpeg firefox flac fontconfig foomaticdb fortran freedts ftp gd gdbm geoip gif gimp git glamor gnuplot gphoto2 gpm gps graphviz gstreamer gtk gtkstyle gzip handbook hddtemp iconv icq icu idn imagemagick imap imlib inotify iodbc iproute2 ipv6 jabber java javascript jbig jingle jit jpeg jpeg2k json kde kerberos kipi kontact ladspa lame lapack lash latex lcms ldap libcaca libevent libffi libnotify libsamplerate libwww lm_sensors lua lxc lzm lzma lzo mad maildir matroska mbox memlimit mime mmap mms mmx mmxext mng modplug modules mozilla mp3 mp4 mpeg mpi mplayer mssql mtp multilib musepack musicbrainz mysql mysqli ncurses nepomuk netlink nls nntp nocd nptl nsplugin nss odbc offensive ogg okular openexr opengl openmp orc pam pango pch pcntl pcre pdf perl phonon php plasma plotutils png policykit posix postgres postproc postscript ppds prison profile psma pulseaudio python qemu qt3support qt4 qt5 quicktime radius rdesktop readline recode rss ruby samba sasl scanner schroedinger sdl seccomp semantic-desktop session sharedmem simplexml slang smi smp snmp soap sockets socks sound speex spell sqlite sqlite3 sse sse2 ssh ssl startup-notification subversion svg syslog sysvipc szip taglib tcmalloc tcpd theora threads tiff truetype udev udisks unicode upnp upnp-av upower usb vaapi vcd vhost video videos vim-syntax vlc vnc vorbis webkit win32codecs wmf wxwidgets x264 xattr xcb xcomposite xface xft xine xinerama xinetd xml xmlrpc xmp xmpp xosd xpm xscreensaver xsl xv xvid xvmc yahoo yaz zlib zsh-completion" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="dumpio proxy proxy_http alias auth_basic auth_digest authn_default authn_file authz_host authz_owner authz_user autoindex cache cern_meta cgi cgid charset_lite deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config log_forensic logio mem_cache mime mime_magic negotiation proxy_connect proxy_ftp reqtimeout rewrite setenvif status substitute s-unique_id s-userdir usertrack vhost_alias" APACHE2_MPMS="event" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="emu efi-32 efi-64 pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en fr zh_CN zh_TW" NGINX_MODULES_HTTP="auth_basic auth_pam autoindex browser charset dav dav_ext empty_gif fancyindex fastcgi flv geo geoip gzip gzip_static gunzip headers_more limit_conn limit_req lua map metrics mp4 naxsi proxy realip referer rewrite scgi secure_link slowfs_cache stub_status upload upload_progress upstream_check upstream_ip_hash uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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"
USE_PYTHON="2.7 3.3"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

1.8.2-r1 and 1.8.3 both failed
Comment 1 YLD 2015-09-09 15:00:59 UTC
Same problem refzerenced several month ago in the forum https://forums.gentoo.org/viewtopic-t-984716-view-previous.html
Comment 2 Hans de Graaff gentoo-dev Security 2015-09-10 06:03:00 UTC
Did this happen when first installing ruby? Is dev-ruby/rake installed?
Comment 3 YLD 2015-09-10 08:14:18 UTC
No Ruby was already installed as was rake.
I also tried to first uninstall all Ruby versions before reinstalling @world set.
No luck.

Rake was always pulled in before dev-ruby/json.
Comment 4 Hans de Graaff gentoo-dev Security 2015-09-13 07:51:04 UTC
Which version of ruby do you have eselected?

eselect ruby --list
Comment 5 YLD 2015-09-14 09:28:48 UTC
(In reply to Hans de Graaff from comment #4)
> Which version of ruby do you have eselected?
> 
> eselect ruby --list

Ruby 2.0.x

eselect ruby list
Available Ruby profiles:
  [1]   ruby20 *
  [2]   ruby21

The version also appeared in the compilation logs:
* Running compile phase for ruby20 ...
Comment 6 YLD 2015-09-14 10:18:48 UTC
I finally managed to upgrade most of my system.
* i diabled ruby, qt5 and designer flags
* masked all the dev-qt/*-5.4.2 package (some of them were requiring ruby)
* emptyed RUBY_TARGETS

After that i:
1) set RUBY_TARGET to ruby20 only
2) installed ruby 2.0.0_p645 only
3) eselect it 
4) tried again to install dev-ruby/json

The first strange thing is that virtual/rubygems required all of the ruby versions:

USE="-ruby -qt5 -designer" emerge dev-ruby/json -tp

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[nomerge       ] dev-ruby/json-1.8.2-r1  USE="-doc {-test}" RUBY_TARGETS="ruby20 -ruby19 -ruby21" 
[nomerge       ]  dev-ruby/rake-10.4.2  USE="-doc {-test}" RUBY_TARGETS="ruby20 -ruby19 -ruby21 -ruby22" 
[nomerge       ]   virtual/rubygems-10 
[nomerge       ]    dev-ruby/rubygems-2.2.5-r1  USE="server {-test}" RUBY_TARGETS="ruby19 ruby20 ruby21" 
[ebuild  N     ]     dev-ruby/builder-3.2.2  USE="-doc {-test}" RUBY_TARGETS="ruby20 -ruby19" 
[ebuild  N     ]    dev-ruby/rubygems-2.2.5-r1  USE="server {-test}" RUBY_TARGETS="ruby19 ruby20 ruby21" 
[ebuild  NS    ]     dev-lang/ruby-1.9.3_p551-r1 [2.0.0_p645, 2.1.6-r1] USE="berkdb gdbm ipv6 ncurses readline ssl yaml -debug -doc -examples -rdoc -rubytests -socks5 -xemacs" 
[ebuild  N     ] dev-ruby/json-1.8.2-r1  USE="-doc {-test}" RUBY_TARGETS="ruby20 -ruby19 -ruby21" 
[ebuild  N    ~]  dev-ruby/rake-10.4.2  USE="-doc {-test}" RUBY_TARGETS="ruby20 -ruby19 -ruby21 -ruby22" 

The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by virtual/rubygems-10::gentoo[ruby_targets_ruby21]
# required by dev-lang/ruby-1.9.3_p551-r1::gentoo
>=dev-ruby/rubygems-2.2.5-r1 ruby_targets_ruby21 ruby_targets_ruby19

!!! The following installed packages are masked:
- dev-qt/qtwebkit-4.8.6-r1::gentoo (masked by: package.mask)
/etc/portage/package.mask:
#=dev-qt/qtwidgets-5.4.2

After re-installing virtual/rubygems it left only 2 packages (rake and json), but still not luck.


If failed again at the same step (cannot load rake) durng emerge process nor from console:
machine# rake
/usr/lib64/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rake (LoadError)
        from /usr/lib64/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/lib64/ruby/gems/2.0.0/gems/rake-0.9.6/bin/rake:35:in `<top (required)>'
        from /usr/bin/rake:9:in `load'
        from /usr/bin/rake:9:in `<main>'
Comment 7 YLD 2015-09-14 14:03:09 UTC
It appears that this was a su/sudo problem.

I typed "su" instead of "su -" that way system gem configuration was mixed up with user rvm/gem setup.

gem env helped me to resolve the problem (GEM_PATHS, INSTALLATION DIRECTORY, EXECUTABLE DIRECTORY):
gem env 
RubyGems Environment:
  - RUBYGEMS VERSION: 2.2.5
  - RUBY VERSION: 2.0.0 (2015-04-13 patchlevel 645) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/me/.rvm/gems/ruby-2.1.2
  - RUBY EXECUTABLE: /usr/bin/ruby20
  - EXECUTABLE DIRECTORY: /home/me/.rvm/gems/ruby-2.1.2/bin
  - SPEC CACHE DIRECTORY: /root/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/me/.rvm/gems/ruby-2.1.2
     - /home/me/.rvm/gems/ruby-2.1.2@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /sbin
     - /bin
     - /usr/sbin
     - /usr/bin

After a "su -", "su -l" or "sudo -i" gem env output was correct and i did not encounter any problem to install dev-ruby/json as i was able to upgrade my whole system.

Sorry for the noise and thank you very much for you time and help.