Compilation error in cont.c

E

Emanuele Ricci

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

Emanuele Ricci

Yukihiro said:
Hi,

In message "Re: Compilation error in cont.c"
on Fri, 9 May 2008 01:00:49 +0900, Emanuele Ricci

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

Emanuele Ricci

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

Emanuele Ricci

Yukihiro said:
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.
 
E

Emanuele Ricci

Yukihiro said:
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.
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top