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

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

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
   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!

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

···

On 16.10.2010 11:20, egervari wrote:

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

···

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

--
Kind Regards,
Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely

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.