# [SOLVED] emerge rubygems freez

## bolczyslaw

I am running gentoo-hardened on an old pentium-II pc (home-server). When I'm trying to install rubygems, output looks like this:

```
>>> Emerging (1 of 11) dev-ruby/rubygems-0.9.0-r1 to /

 * rubygems-0.9.0.tgz MD5 ;-) ...                                      [ ok ]

 * rubygems-0.9.0.tgz RMD160 ;-) ...                                 [ ok ]

 * rubygems-0.9.0.tgz SHA1 ;-) ...                                     [ ok ]

 * rubygems-0.9.0.tgz SHA256 ;-) ...                                  [ ok ]

 * rubygems-0.9.0.tgz size ;-) ...                                        [ ok ]

 * checking ebuild checksums ;-) ...                                    [ ok ]

 * checking auxfile checksums ;-) ...                                   [ ok ]

 * checking miscfile checksums ;-) ...                                  [ ok ]

 * checking rubygems-0.9.0.tgz ;-) ...                                  [ ok ]

>>> Unpacking source...

>>> Unpacking rubygems-0.9.0.tgz to /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/work

 * Applying no_post_install.patch ...                                     [ ok ]

 * Applying rubygems-0.9.0-build-c-extensions.patch ...        [ ok ]

>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/work/rubygems-0.9.0 ...

>>> Source compiled.

>>> Test phase [not enabled]: dev-ruby/rubygems-0.9.0-r1

>>> Install rubygems-0.9.0-r1 into /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/ category dev-ruby

---> bin

<--- bin

---> lib

---> lib/rbconfig

<--- lib/rbconfig

---> lib/rubygems

<--- lib/rubygems

<--- lib

rm -f InstalledFiles

---> bin

mkdir -p /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/bin

install gem /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/bin/

install gem_mirror /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/bin/

install gem_server /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/bin/

install gemlock /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/bin/

install gemri /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/bin/

install gemwhich /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/bin/

install index_gem_repository.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/bin/

install update_rubygems /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/bin/

<--- bin

---> lib

mkdir -p /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8

install gemconfigure.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/

install rubygems.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/

install ubygems.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/

---> lib/rbconfig

mkdir -p /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rbconfig

install datadir.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rbconfig

<--- lib/rbconfig

---> lib/rubygems

mkdir -p /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install builder.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install cmd_manager.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install command.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install config_file.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install custom_require.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install dependency_list.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install doc_manager.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install format.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install gem_commands.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install gem_openssl.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install gem_runner.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install incremental_fetcher.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install installer.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install loadpath_manager.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install old_format.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install open-uri.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install package.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install remote_installer.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install rubygems_version.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install security.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install source_index.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install specification.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install timer.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install user_interaction.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install validator.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

install version.rb /var/tmp/portage/dev-ruby/rubygems-0.9.0-r1/image/usr/lib/ruby/site_ruby/1.8/rubygems

<--- lib/rubygems

<--- lib

  Successfully built RubyGem

  Name: sources

  Version: 0.0.1

  File: sources-0.0.1.gem

```

after that processor runns at 101% and absolutly nothing happens. Even when i leaved it like this and wait whole night, still nothing. The only way to stop that is to hit ctr+c

Process that takes all resources is "/usr/bin/ruby setup.rb install", please help me if you can.Last edited by bolczyslaw on Fri Jan 12, 2007 2:08 pm; edited 1 time in total

----------

## Bobnoxous

This looks like a ruby problem, not a Gentoo problem. Have you checked on ruby forums?

----------

## 80686

 *Quote:*   

> 
> 
> after that processor runns at 101% and absolutly nothing happens. Even when i leaved it like this and wait whole night, still nothing. The only way to stop that is to hit ctr+c 
> 
> Process that takes all resources is "/usr/bin/ruby setup.rb install", please help me if you can.
> ...

 

Same problem here, on a fresh Gentoo installation (dev-lang/ruby-1.8.5_p2). I compiled ruby using "threads".

The maschine is a AMD64 X2, but running in i686 mode (32bit).

----------

## bellakioma

I have the same problem on a gentoo 2006.1 installation over a Pentium III (Coppermine) 797.604 MHz.

This is the 'top' result when ruby freeze while emerging stable or unstable version of rubygems:

```
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

6466 root      25   0 11256 8936 2128 R 99.7  3.6   1:50.70 ruby
```

Stable or unstable ruby were installed correctly:

```
# ruby -v

ruby 1.8.5 (2006-12-04 patchlevel 2) [i386-linux]

or

# ruby -v

ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-linux]

```

Did anyone find a solution? Suggestions?

----------

## bellakioma

I've found a solution here:

http://sciruby.codeforpeople.com/sr.cgi/HowTosAndTutorials/CompilationFuTutorial

First of all I had to set LD_LIBRARAY_PATH and LD_RUN_PATH and then to compile ruby manually:

```
export prefix=/usr/local/

# export LD_LIBRARAY_PATH=$prefix/lib

# export LD_RUN_PATH=$prefix/lib        # this one's important!

# tar xvfz /usr/portage/distfiles/ruby-1.8.5-p2.tgz

# cd ruby-1.8.5-p2

# ./configure --prefix=$prefix --enable-shared && make && sudo make install

# env-update && source /etc/profile

>>> Regenerating /etc/ld.so.cache...

# ruby -v

ruby 1.8.5 (2006-12-04 patchlevel 2) [i686-linux]
```

Then I downloaded and installed last rubygems (finally without freezing errors!!!)

```

# wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz

# tar xpfz rubygems-0.9.0.tgz

# cd rubygems-0.9.0

rubygems-0.9.0 # ruby setup.rb

> As of RubyGems 0.8.0, library stubs are no longer needed.

> Searching $LOAD_PATH for stubs to optionally delete (may take a while)...

> ...done.

> No library stubs found.

>

>   Successfully built RubyGem

>   Name: sources

>   Version: 0.0.1

>   File: sources-0.0.1.gem

> rubygems-0.9.0 #
```

And I installed sqlite3-ruby

```
rubygems-0.9.0 # gem install sqlite3-ruby --remote

Bulk updating Gem source index for: http://gems.rubyforge.org

Select which gem to install for your platform (i686-linux)

 1. sqlite3-ruby 1.1.0 (mswin32)

 2. sqlite3-ruby 1.1.0 (ruby)

 3. sqlite3-ruby 1.0.1 (mswin32)

 4. sqlite3-ruby 1.0.1 (ruby)

 5. sqlite3-ruby 1.0.0 (ruby)

 6. sqlite3-ruby 1.0.0 (mswin32)

 7. sqlite3-ruby 0.9.0 (mswin32)

 8. sqlite3-ruby 0.9.0 (ruby)

 9. sqlite3-ruby 0.6.0 (ruby)

 10. sqlite3-ruby 0.5.0 (ruby)

 11. Cancel installation

> 2

Building native extensions.  This could take a while...

ruby extconf.rb install sqlite3-ruby --remote

checking for sqlite3.h... yes

checking for sqlite3_open() in -lsqlite3... yes

creating Makefile

make

gcc -I. -I. -I/usr/local//lib/ruby/1.8/i686-linux -I. -DHAVE_SQLITE3_H -I/usr/local/include  -fPIC -g -O2  -fPIC  -c sqlite3_api_wrap.c

gcc -shared  -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -L'/usr/local//lib' -Wl,-R'/usr/local//lib' -o sqlite3_api.so sqlite3_api_wrap.o  -Wl,-R -Wl,/usr/local//lib -L/usr/local//lib -L. -lruby -lsqlite3  -ldl -lcrypt -lm   -lc

make install

/usr/bin/install -c -m 0755 sqlite3_api.so /usr/local//lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib

make clean

Successfully installed sqlite3-ruby-1.1.0

Installing ri documentation for sqlite3-ruby-1.1.0...

Installing RDoc documentation for sqlite3-ruby-1.1.0... 
```

----------

## bolczyslaw

for me worked:

```

export prefix=/usr/

export LD_LIBRARAY_PATH=$prefix/lib

export LD_RUN_PATH=$prefix/lib

emerge -1 ruby rubygems

env-update

source /etc/profile

```

----------

## bellakioma

thanks but

didn't worked for me!

----------

## tweibley

 *bellakioma wrote:*   

> thanks but
> 
> didn't worked for me!

 

Actually it should work. First run "emerge -C ruby" (this will uninstall).  You might want to run "updatedb" after that. Do a "locate ruby" and see if there are files left in "/usr/lib/ruby".  Remove all traces of ruby (you will lose any currently installed gems) in "/usr/lib/ruby".  If you are worried about losing your gems, do a "gem list > gems.txt" before removing the files. Then you have a list of all your currently installed gems.  Finally, try with the above listed method again. Worked like a charm for me.

Hth,

--Taylor

----------

## Tom.Fischer

same problem here. Had to uninstall ruby and compile ruby and rubygems mysqlf. Placed both packages in /etc/portage/profiles/package.provided

----------

## somekool

you might want to spell LD_LIBRARAY_PATH properly

as far as I can tell, library is spelled with one A only.

if the above solution worked for anyone, it was pure luck.

the problem is a change in autoconf 2.61 which ruby 1.8.5 does not support.

you can either reinstall autoconf 2.60 and recompile ruby 1.8.5 or upgrade to ruby 1.8.6

______

Update:

neither 1.8.5 nor 1.8.6 worked with autoconf 2.60

but 1.8.6 works fine with autoconf 2.59-r7 (1.8.5 should too)

----------

## amoebapr

I'd just like to point out that by adding:

>sys-devel/autoconf-2.59-r7

...to my /etc/portage/package.mask file and re-emerging ruby and rubygems, I was able to get everything working again.

Thanks somekool!

----------

## Higgaion

well, I went the other way, and unmasked ruby 1.8.6, and still permanent lag on the gems package. mine stalls out at 

```
install gem_commands.rb /var/tmp/portage/dev-ruby/rubygems-0.8.11-r6/image/usr/lib/ruby/site_ruby/1.8/rubygems

install dependency_list.rb /var/tmp/portage/dev-ruby/rubygems-0.8.11-r6/image/usr/lib/ruby/site_ruby/1.8/rubygems

install security.rb /var/tmp/portage/dev-ruby/rubygems-0.8.11-r6/image/usr/lib/ruby/site_ruby/1.8/rubygems

install gem_openssl.rb /var/tmp/portage/dev-ruby/rubygems-0.8.11-r6/image/usr/lib/ruby/site_ruby/1.8/rubygems

<--- lib/rubygems

<--- lib
```

so I guess now I'll try downgrading my autoconf and then ruby.

update:

downgraded autoconf, reemerged ruby 1.8.6, and the gems package worked. this is definitely a portage bug.

----------

## Insanity5902

re-emerge ruby 1.8.6 with autoconf 2.61 allowed me to install rubygems, otherwise it was freezing for me at the same spot.

----------

## Higgaion

downgraded autoconf to 2.59, ruby 1.8.6. works.

So then this is a firmly established incompatability between autoconf-2.60 and ruby-1.8.5 and ruby-1.8.6. someone should submit a bug report?

----------

## rbrown_

 *Higgaion wrote:*   

> someone should submit a bug report?

 

The depends if it's duplicate of 161566 or not.

----------

## prathe

Thank you Higgaion!

I downgrade to autoconf 2.60

emerge  =sys-devel/autoconf-2.60

I reinstall ruby and no more freeze!

----------

