Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254197 - ruby-gettext not found in default ruby module path
Summary: ruby-gettext not found in default ruby module path
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-08 08:10 UTC by Shyam Mani (RETIRED)
Modified: 2009-03-23 19:47 UTC (History)
2 users (show)

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


Attachments
strace output when you run alexandria (alexandria.strace,12.25 KB, text/plain)
2009-01-08 08:18 UTC, Shyam Mani (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shyam Mani (RETIRED) gentoo-dev 2009-01-08 08:10:28 UTC
1) emerge alexandria
2) Run alexandria from the terminal...

/usr/bin/alexandria:3:in `require': no such file to load -- gettext (LoadError)
	from /usr/bin/alexandria:3

3) strace it (log attached).
4) It's looking for gettext.rb, but not in the right places.

$ emerge  --info
Portage 2.1.6.3 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r0, 2.6.28 i686)
=================================================================
System uname: Linux-2.6.28-i686-Intel-R-_Core-TM-2_Duo_CPU_P8400_@_2.26GHz-with-glibc2.0
Timestamp of tree: Fri, 26 Dec 2008 11:45:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.4.4-r13, 2.5.2-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.1
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect cvs distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync1.sg.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac aalib acl acpi adns alsa apache2 avahi bash-completion berkdb bluetooth branding bzip2 cairo cddb cdr cgi cli cracklib crypt cscope css ctype cups curl cvs dbus directfb dri dts dv dvd dvdr dvdread emboss encode exif expat fam fbcon ffmpeg firefox flac fltk fontconfig fortran ftp gd gdbm geoip gif gimp gnome gnutls gphoto2 gpm gps gstreamer gtk gtkhtml hal hddtemp iconv ieee1394 imagemagick innodb ipod ipv6 isdnlog jabber java java6 jingle jpeg lame libnotify lm_sensors mad mailwrapper matroska memlimit midi mikmod mime mmap mmx mp3 mpeg mplayer msn mudflap musicbrainz mysql nautilus ncurses networkmanager nls nptl nptlonly nsplugin offensive ogg opengl openmp pam pcre pda pdf perl php png posix ppds pppd python qt3support quicktime raw rdesktop readline recode reflection rss ruby samba sdl session simplexml smp snmp sockets spell spl sse sse2 ssl startup-notification subversion svg svga sysfs syslog tcpd threads tidy tiff timidity truetype unicode usb vcd vim-syntax vnc vorbis wifi win32codecs wmf x264 x86 xattr xcb xcomposite xinetd xml xorg xosd xpm xsl xulrunner xv xvid yahoo zeroconf zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" USERLAND="GNU" VIDEO_CARDS="intel vga vesa vmware"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Shyam Mani (RETIRED) gentoo-dev 2009-01-08 08:16:25 UTC
Also, it could be an issue with ruby-gettext, I'm not sure. Since all the other .rb's are in /usr/lib/ruby/site_ruby/1.8/ but gettext isn't.

Comment 2 Shyam Mani (RETIRED) gentoo-dev 2009-01-08 08:18:27 UTC
Created attachment 177740 [details]
strace output when you run alexandria

strace output.
Comment 3 Shyam Mani (RETIRED) gentoo-dev 2009-01-08 08:42:32 UTC
Running rsync -avP /usr/lib/ruby/gems/1.8/gems/gettext-1.93.0/lib/ /usr/lib/ruby/site_ruby/1.8/ fixes the issue and alexandria is able to start.

So is it ruby-gettext that's not putting it's stuff in the right place.
Comment 4 Shyam Mani (RETIRED) gentoo-dev 2009-01-08 09:09:17 UTC
CC'ing the ruby folks as well.
Comment 5 Hans de Graaff gentoo-dev Security 2009-01-11 19:09:42 UTC
Reassigning to maintainer.
Comment 6 John Keeping 2009-01-11 20:38:35 UTC
Re-assigning to Ruby herd as this does not seem to be an Alexandria bug and my knowledge of Ruby isn't good enough to progress any further.

I notice that in your strace output there is no reference to gems, but when I strace alexandria on my system the first thing ruby does is read /usr/lib64/ruby/site_ruby/auto_gem.rb which I think sets up the required state for "require 'gettext'" to find gettext.rb in /usr/lib/ruby/gems/1.8/gems/gettext-1.93.0/lib/.
Comment 7 Alex Legler (RETIRED) archtester gentoo-dev Security 2009-01-12 09:22:37 UTC
(In reply to comment #6) 
> I notice that in your strace output there is no reference to gems, but when I
> strace alexandria on my system the first thing ruby does is read
> /usr/lib64/ruby/site_ruby/auto_gem.rb which I think sets up the required state
> for "require 'gettext'" to find gettext.rb in
> /usr/lib/ruby/gems/1.8/gems/gettext-1.93.0/lib/.

ruby-gettext is installed where it should belong, you just need to require "rubygems" (which we have handled in auto_gem.rb) before requiring a gem. It's a restriction that ruby fixes only with 1.9.

Shyam: I suspect that the auto_gem magic is broken on your machine. Please make sure that the environment variable RUBYOPT is set to "-rauto_gem". There should be a file in /etc/env.d taking care of that.

Alternatively, you could patch /usr/bin/alexandria to require rubygems before everything else (either by having -rubygems added to the shebang or doing 'require "rubygems"') explicitly or have upstream do that. Given that from what I know other distros or platforms don't have the magic we do, it should be there anyway.
Comment 8 Shyam Mani (RETIRED) gentoo-dev 2009-01-15 04:49:57 UTC
(In reply to comment #7)
> Shyam: I suspect that the auto_gem magic is broken on your machine. Please make
> sure that the environment variable RUBYOPT is set to "-rauto_gem". There should
> be a file in /etc/env.d taking care of that.

# echo $RUBYOPT
-rauto_gem

So that's taken care of. As is env.d...

# cat /etc/env.d/10rubygems 
RUBYOPT="-rauto_gem"

> Alternatively, you could patch /usr/bin/alexandria to require rubygems before
> everything else (either by having -rubygems added to the shebang or doing
> 'require "rubygems"') explicitly or have upstream do that. Given that from what
> I know other distros or platforms don't have the magic we do, it should be
> there anyway.
> 

I'd be fine with patching stuff here, but the point is a normal end user might wonder why Alexandria won't even run...so I guess that needs to be taken care of
Comment 9 Alex Legler (RETIRED) archtester gentoo-dev Security 2009-01-17 11:06:31 UTC
(In reply to comment #8)
> I'd be fine with patching stuff here, but the point is a normal end user might
> wonder why Alexandria won't even run...so I guess that needs to be taken care
> of 

Mhhhh. With the settings in order it _really_ should work.
I think we should do some more elaborate debugging before starting to patch it in, as it just seems to be you who has this issue. ;)
Feel free to poke me on IRC (in #gentoo-ruby maybe) sometime and we'll check the whole magic.