Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Compilation error in cont.c

Reply
Thread Tools

Compilation error in cont.c

 
 
Emanuele Ricci
Guest
Posts: n/a
 
      05-08-2008
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/.

 
Reply With Quote
 
 
 
 
Emanuele Ricci
Guest
Posts: n/a
 
      05-08-2008
Yukihiro Matsumoto wrote:
> Hi,
>
> In message "Re: Compilation error in cont.c"
> on Fri, 9 May 2008 01:00:49 +0900, Emanuele Ricci
> <(E-Mail Removed)> 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/.

 
Reply With Quote
 
 
 
 
Emanuele Ricci
Guest
Posts: n/a
 
      05-09-2008
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/.

 
Reply With Quote
 
Emanuele Ricci
Guest
Posts: n/a
 
      05-09-2008
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+0x19: 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/.

 
Reply With Quote
 
Emanuele Ricci
Guest
Posts: n/a
 
      05-12-2008
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/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
const string error compilation - error C2679 Tassador C++ 0 07-19-2009 05:26 AM
Compilation error with seperate compilation C__chp C++ 4 02-15-2008 03:57 PM
[compilation error] debugging this error message "Object() in java.lang.Object cannot be applied to" Gavin Java 3 03-28-2007 05:57 AM
compilation error: "error: no matching function for call to 'String::String(String)' =?ISO-8859-1?Q?Martin_J=F8rgensen?= C++ 5 05-06-2006 03:48 PM
compilation error /usr/include/_G_config.h:29: parse error before "__mbstate_t" Vittal C Programming 2 07-08-2003 10:14 PM



Advertisments