Compilation error in cont.c

Discussion in 'Ruby' started by Emanuele Ricci, May 8, 2008.

  1. Hi,
    with ruby 1.9.0-1, I get the following error during the
    cross-compilation :

    cont.o -c cont.c
    cont.c: In function `cont_restore_0':
    cont.c:327: error: structure has no member named `machine_stack_src'
    make: *** [cont.o] Error 1

    This code seems not to be usually compiled.

    Thanks,
    Emanuele.
    --
    Posted via http://www.ruby-forum.com/.
     
    Emanuele Ricci, May 8, 2008
    #1
    1. Advertising

  2. Yukihiro Matsumoto wrote:
    > Hi,
    >
    > In message "Re: Compilation error in cont.c"
    > on Fri, 9 May 2008 01:00:49 +0900, Emanuele Ricci
    > <> writes:
    >
    > |Hi,
    > |with ruby 1.9.0-1, I get the following error during the
    > |cross-compilation :
    > |
    > |cont.o -c cont.c
    > |cont.c: In function `cont_restore_0':
    > |cont.c:327: error: structure has no member named `machine_stack_src'
    > |make: *** [cont.o] Error 1
    > |
    > |This code seems not to be usually compiled.
    >
    > Could you try the trunk from the svn repo?
    >
    > We also need you platform information. 1.9.0-1 was compiled without
    > any problem on my Linux box.
    >
    > matz.


    Thank you very much for answering Matsumoto-sensei,

    I just tried to cross compile ruby 1.9 trunk getting the same error:

    arm-linux-gcc -mbig-endian -I. -I.ext/include/arm-linux -I./include
    -I. -DRUBY_EXPORT -D_GNU_SOURCE=1 -o cont.o -c cont.c
    cont.c: In function `cont_restore_0':
    cont.c:326: error: structure has no member named `machine_stack_size'
    make: *** [cont.o] Error 1

    I'm cross compiling ruby for an arm processor embedded device on an
    ubuntu gutsy gibbon vm using the embedded device compiler tool chain.

    So from the configure log:
    checking build system type... i686-pc-linux-gnu
    checking host system type... arm-unknown-linux-gnu
    checking target system type... arm-unknown-linux-gnu
    checking for arm-linux-gcc... arm-linux-gcc
    checking for arm-linux-gcc... (cached) arm-linux-gcc

    I configured it with exactly the same options I used to succesfully
    cross compile ruby 1.8.6 p114:
    /configure --host=arm-linux CFLAGS=-mbig-endian LDFLAGS=-mbig-endian

    Please tell me if any other info could be useful.

    Thanks,
    Emanuele.

    --
    Posted via http://www.ruby-forum.com/.
     
    Emanuele Ricci, May 8, 2008
    #2
    1. Advertising

  3. Yukihiro Matsumoto wrote:
    Could you try the latest again?

    Thank you really very much for patching the trunk, indeed now I'm able
    to cross compile succesfully ruby 1.9.

    However once I put it on the target and launch it I get the following
    error:

    ruby1.9: /lib/librt.so.1: no version information available (required by
    ruby1.9)
    Segmentation fault

    Could you give me an hint also about that?

    Thank you again,
    Emanuele.
    --
    Posted via http://www.ruby-forum.com/.
     
    Emanuele Ricci, May 9, 2008
    #3
  4. Yukihiro Matsumoto wrote:
    > That seems to be a linker problem around librt. You have to check
    > whether librt installed correctly. Or you can remove -lrt from
    > configure. I have virtually zero knowledge about cross compiling, but
    > it should be possible.


    Hi,
    removing -lrt I get the following error:
    /libruby-static.a(time.o)(.text+0x198): In function `time_init':
    : undefined reference to `clock_gettime'
    collect2: ld returned 1 exit status
    make[1]: *** [ruby] Error 1
    make[1]: Leaving directory `/home/del/Desktop/rubytrunk/ruby'
    make: *** [all] Error 2

    The "no version information available" kind of error seems to be the
    result of a library mismatch between the build and target systems
    (http://answers.google.com/answers/threadview?id=786136).

    I'll tell you as soon as I get it to work.

    Emanuele.
    --
    Posted via http://www.ruby-forum.com/.
     
    Emanuele Ricci, May 9, 2008
    #4
  5. Yukihiro Matsumoto wrote:
    > By "removing -lrt", I also meant removing HAVE_CLOCK_GETTIME from
    > <config.h>.


    Hi,
    I should have read time.c. Indeed removing HAVE_CLOCK_GETTIME I'm able
    to get to the end of the compilation process.
    I still get the "Segmentation error" trying the resulting ruby on the
    target, doe.
    I guess I must recompile the glibc libraries to match those of the
    building system...

    > I hope you can solve the version inconsistency.


    Me too, trying to cross-compile the glibc libraries right now.

    Thank you again,
    Emanuele.
    --
    Posted via http://www.ruby-forum.com/.
     
    Emanuele Ricci, May 12, 2008
    #5
    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. Woody Splawn

    How Publish VS.net Cont

    Woody Splawn, May 6, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    323
    Woody Splawn
    May 6, 2004
  2. www.MSmobiles.com
    Replies:
    1
    Views:
    368
    Teemu Keiski
    Jul 18, 2004
  3. =?Utf-8?B?U2FjaGluIEt1Y2hpbmFk?=

    Issue With Binding Of A DataReader to a Drop-Down or List Box Cont

    =?Utf-8?B?U2FjaGluIEt1Y2hpbmFk?=, Jul 22, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,156
    =?Utf-8?B?U2FjaGluIEt1Y2hpbmFk?=
    Jul 22, 2004
  4. gelbeiche
    Replies:
    6
    Views:
    440
    CrayzeeWulf
    Apr 25, 2005
  5. C__chp
    Replies:
    4
    Views:
    509
    Puppet_Sock
    Feb 15, 2008
Loading...

Share This Page