cross-compiling ruby

Discussion in 'Ruby' started by Dan Hinz, Sep 28, 2005.

  1. Dan Hinz

    Dan Hinz Guest

    --=-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:
    800 Phillips Road TEL: 585.422.8078
    Webster, NY 14580

    --=-90UWnLEkDTPdEhDU6X7J--
     
    Dan Hinz, Sep 28, 2005
    #1
    1. Advertising

  2. 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

    --
    Nobu Nakada
     
    nobuyoshi nakada, Sep 29, 2005
    #2
    1. Advertising

  3. Dan Hinz

    Kero Guest

    > 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 ---+
     
    Kero, Oct 1, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Garrett Cooper
    Replies:
    0
    Views:
    585
    Garrett Cooper
    Feb 24, 2009
  2. Garrett Cooper
    Replies:
    0
    Views:
    518
    Garrett Cooper
    Feb 24, 2009
  3. Kero

    cross compiling Ruby

    Kero, Oct 9, 2005, in forum: Ruby
    Replies:
    0
    Views:
    155
  4. gregarican

    Cross-compiling Ruby for ARM?

    gregarican, Nov 7, 2005, in forum: Ruby
    Replies:
    0
    Views:
    219
    gregarican
    Nov 7, 2005
  5. Kenosis
    Replies:
    0
    Views:
    137
    Kenosis
    Feb 23, 2006
Loading...

Share This Page