Ben Giddings <bg-rubytalk / infofiend.com> wrote in message news:<41058A2D.6080703 / infofiend.com>...
> Scott Rubin wrote:
> > I have built ruby-1.8.2-preview1 for arm-linux for anyone who wants it.
> 
> OOh, I want it!  Only problem is that I'm using a 2.4.22 kernel, and am 
> targeting a big endian system.  Can you maybe post instructions on how 
> you built it so I can make my own?

Since nobody else seems to answer here are my remarks. I tried the
arm-linux release mentioned above but had to compile my own version
due to incompatible libraries.

A good script to adapt for cross compiling is Vincent Flack's famous
cross compiling script for Ruby:
http://equinoxe.dnsalias.org/PERSO/zruby.rb

You'll probably have to customise the settings to your target OS, but
the procedure should be similar enough.

Things to look out for are differences in library versions between
your dev. environment and the target machine. I had to change the
LD_LIBRARY_PATH statements in the script to force the cross compiler
to find the arm-linux libraries first.

In some cases (libz) I had to to copy libraries from the target
machine to the cross compiler library directory to get Ruby running.

After all it took only 4-5 comiler/linker runs to get a cross-compiled
running Ruby version, mostly due to library/header files problems.
Since this was my first attempt to cross-compile something I was
impressed. I had expected more problems.

Rainer