I have an application on a stand-alone pwba. The platform has a linux
kernel on it but no compiler. The way we build apps for it is to use a
cross-compiler. I would like to install ruby there in order to create
some scriptable testing facilities.
When I tried to cross-compile ruby using the standard configure
mechanism it fails saying that it can't check setpgrp when
cross-compiling. I cheated and removed that check from configure but
then had other problems with ext/extmk.rb.
So, finally the question. Before I go off and spend a lot of time at it,
has anyone explored what it will take to cross-compile ruby? For what
it's worth the host is x86 and the target is ppc.
-dwh-
···
--
I not only live each endless day in grief, but live each day
thinking about living each day in grief.
-- C.S. Lewis
Daniel W. Hinz Xerox Corp: XOG/SEBU/MCD/EIDC/ISM&D
MS: 111-03J e-mail: dhinz@eng.mc.xerox.com
800 Phillips Road TEL: 585.422.8078
Webster, NY 14580
At Thu, 29 Sep 2005 03:19:01 +0900,
Dan Hinz wrote in [ruby-talk:158117]:
When I tried to cross-compile ruby using the standard configure
mechanism it fails saying that it can't check setpgrp when
cross-compiling. I cheated and removed that check from configure but
then had other problems with ext/extmk.rb.
So, finally the question. Before I go off and spend a lot of time at it,
has anyone explored what it will take to cross-compile ruby? For what
it's worth the host is x86 and the target is ppc.
Ruby needs a lot of headerfiles to compile all libraries. Your best bet
for those is to set up a "cross-root" with all libs and includes that
you need.
/cross/
/cross/usr/include/
/cross/usr/lib/
....
If you have a packaging system for the target platform, it may be as
easy as `pkg -dest /cross` (assuming pkg runs on your compiling
machine; in my case (ipkg for familiar-linux on arm4) it did).
This will never solve the issue with setpgrep and friends, since the
resulting testprogram can't be executed locally. It's a shame ./configure
has no option to override those cross-compiling things. See the other
followup for a solution to some of those.
···
--
I had the luck to have a networked machine available with a huge NFS
mount on it with the dev environment; in other words, I could compile
natively.
Because of that, I do not know how various ruby libraries with
extconf.rb and such will react in such a /cross environment.