cross-compiling ruby

D

Dan Hinz

--=-90UWnLEkDTPdEhDU6X7J
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

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: (e-mail address removed)
800 Phillips Road TEL: 585.422.8078
Webster, NY 14580

--=-90UWnLEkDTPdEhDU6X7J--
 
N

nobuyoshi nakada

Hi,

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.

$ ac_cv_func_setpgrp_void=yes ./configure CC=$cross_cc
 
K

Kero

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.

+--- Kero ------------------------- kero@chello@nl ---+
| all the meaningless and empty words I spoke |
| Promises -- The Cranberries |
+--- M38c --- http://members.chello.nl/k.vangelder ---+
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,244
Members
46,839
Latest member
MartinaBur

Latest Threads

Top