# Trying to compile ruby 1.9.2-head on ubuntu 10.10. Help?

**URL:** <https://www.ruby-forum.com/t/trying-to-compile-ruby-1-9-2-head-on-ubuntu-10-10-help/197576>\
**Category:** Ruby\
**Created:** [October 16, 2010, 11:21am UTC](https://www.ruby-forum.com/t/trying-to-compile-ruby-1-9-2-head-on-ubuntu-10-10-help/197576 "2010-10-16T11:21:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [October 16, 2010, 11:21am UTC](https://www.ruby-forum.com/t/trying-to-compile-ruby-1-9-2-head-on-ubuntu-10-10-help/197576/1 "2010-10-16T11:21:11Z")

</div>

I’m trying to compile ruby 1.9.2-head on ubuntu 10.10. I don’t know  
whether to post it here, or on ubuntu forums. I’ll try here first.

I’m following this guide here:  
[http://rohitarondekar.com/articles/installing-rails3-beta3-on-ubuntu-using-rvm](http://rohitarondekar.com/articles/installing-rails3-beta3-on-ubuntu-using-rvm)

I followed this guide using 10.04 for the wubi install, and I managed  
to get it to work. For some reason, I am having problems now. However,  
this could have nothing to do with ubuntu versions and a lot more to  
do with my “mistakes” when I was using 10.04. You see, without knowing  
what I was doing, I had installed previous ruby versions and so on.  
This may have caused a successful compile of 1.9.2 accidentally. LOL.

Anyway, here is the rvm install of ruby 1.9.2:

egervari@ken:~$ rvm install 1.9.2-head -C --with-openssl-dir=  
$rvm\_path/usr, --with-readline-dir=$rvm\_path/usr  
/home/egervari/.rvm/rubies/ruby-1.9.2-head, this may take a while  
depending on your cpu(s)…

ruby-1.9.2-head - #fetching  
Updating ruby from  
[http://svn.ruby-lang.org/repos/ruby/branches/ruby\_1\_9\_2](http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_2)  
Copying from repo to src path…  
Running autoconf  
ruby-1.9.2-head - #configuring  
ruby-1.9.2-head - #compiling  
Error running 'make ', please check /home/egervari/.rvm/log/  
ruby-1.9.2-head/make.error.log  
There has been an error while running make. Halting the  
installation.

Looking in the log file, this is where it bombs (This is from line  
1374+):

generating enc/trans/utf\_16\_32.c …  
converter for from\_UTF\_16LE  
converter for from\_UTF\_32LE  
converter for from\_UTF\_16BE  
converter for from\_UTF\_32BE  
converter for from\_UTF\_8  
done. (0.07user 0.00system 0.03elapsed)  
/usr/bin/ld: cannot find /lib: File format not recognized  
collect2: ld returned 1 exit status  
make[1]: \*\*\* […/…/…/.ext/x86\_64-linux/digest/md5.so] Error 1  
make: \*\*\* [mkmain.sh] Error 1

I’d appreciate any help you could offer to get this to compile. Thanks!

---

<div class="post-metadata">

**Author:** ![egervari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/9dc877/32.png) [@egervari](https://www.ruby-forum.com/u/egervari)\
**Post date:** [October 16, 2010, 2:47pm UTC](https://www.ruby-forum.com/t/trying-to-compile-ruby-1-9-2-head-on-ubuntu-10-10-help/197576/2 "2010-10-16T14:47:26Z")

</div>

On 16.10.2010 11:20, egervari wrote:

> [http://rohitarondekar.com/articles/installing-rails3-beta3-on-ubuntu-using-rvm](http://rohitarondekar.com/articles/installing-rails3-beta3-on-ubuntu-using-rvm)

I’ve 10.10 on x64 here, I followed the guide with some exceptions and it  
worked out of the box.

The exceptions were: I didn’t use “rvm pacakge …” (why should I?), nor  
the extra parameters to “rvm install …”. And for “gem install” I left  
out the --pre, it’s been released in the meantime. In other words:  
compiling ruby 1.9.2-head worked.

> Looking in the log file, this is where it bombs (This is from line  
> 1374+):  
> […]  
> /usr/bin/ld: cannot find /lib: File format not recognized  
> collect2: ld returned 1 exit status  
> make[1]: \*\*\* […/…/…/.ext/x86\_64-linux/digest/md5.so] Error 1  
> make: \*\*\* [mkmain.sh] Error 1

That’s weird, in my logfile it looks like this:

generating enc/trans/utf\_16\_32.c …  
converter for from\_UTF\_16LE  
converter for from\_UTF\_32LE  
converter for from\_UTF\_16BE  
converter for from\_UTF\_32BE  
converter for from\_UTF\_8  
done. (0.03user 0.01system 0.02elapsed)  
ffi.h is missing. Please install libffi.  
ossl\_hmac.c: In function ‘ossl\_hmac\_hexdigest’:  
ossl\_hmac.c:162: warning: comparison between signed and unsigned integer  
expressions

I.e. it just goes on with trying to compile ffi, etc.

I’d would give it a try without those extra parameters.

HTH,

- Markus

---

<div class="post-metadata">

**Author:** ![egervari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/9dc877/32.png) [@egervari](https://www.ruby-forum.com/u/egervari)\
**Post date:** [October 16, 2010, 4:08pm UTC](https://www.ruby-forum.com/t/trying-to-compile-ruby-1-9-2-head-on-ubuntu-10-10-help/197576/3 "2010-10-16T16:08:26Z")

</div>

On 10-10-16 05:20 AM, egervari wrote:

> I’m trying to compile ruby 1.9.2-head on ubuntu 10.10. I don’t know  
> whether to post it here, or on ubuntu forums. I’ll try here first.
> 
> I’m following this guide here:  
> [http://rohitarondekar.com/articles/installing-rails3-beta3-on-ubuntu-using-rvm](http://rohitarondekar.com/articles/installing-rails3-beta3-on-ubuntu-using-rvm)

As Markus said you don’t need to install RVM, unless you want to have  
different version of Ruby or Rails.

I am on Kubunutu x64 just upgraded to 10.10 from 10.04, and I’ve built  
Ruby trunk from source without any issues.

Always read the README =) after you checkout ruby core from svn, you  
will need to generate the configure file by running autoconf.

Give that a go and then follow the steps from README.

If you want to build ruby edge and install it in another location other  
than the default /usr/local/bin, you can configure like this

./configure --prefix=/var/local --exec-prefix=/var/local

this will install ruby binary under /var/local/bin

I do it this way so I can have ruby release as my main ruby for work,  
but ruby edge for playing around with. you will need to export  
/var/local/bin in your path, otherwise you will need to type the  
explicit path to ruby edge each time.

at the term type:

export PATH=/var/local/bin:$PATH

path will be good for the session of the term, you will need to type  
this each time if you want to use ruby edge before, not ruby release if  
you have both installed

note the altered search path will execute binaries from /var/local/bin  
before /usr/local/bin, make sure you don’t have other binaries in there  
that might override system default binaries unless this is what you want  
i.e. ruby edge vs ruby release =)

finally verify:

$ ruby -v  
ruby 1.9.3dev (2010-10-16 trunk 29517) [x86\_64-linux]

$ which ruby  
/var/local/bin/ruby

---

<div class="post-metadata">

**Author:** ![egervari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/9dc877/32.png) [@egervari](https://www.ruby-forum.com/u/egervari)\
**Post date:** [October 16, 2010, 5:36pm UTC](https://www.ruby-forum.com/t/trying-to-compile-ruby-1-9-2-head-on-ubuntu-10-10-help/197576/4 "2010-10-16T17:36:02Z")

</div>

Thanks. Well, what I did was get rid of the openssl parameter and  
everything worked out just fine. Got rails, etc. running no problems.  
I guess something was up with the openssl package specifically.
