In message “Re: Compilation error in cont.c”
on Fri, 9 May 2008 01:00:49 +0900, Emanuele R. [email protected] 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.
In message “Re: Compilation error in cont.c”
on Fri, 9 May 2008 01:00:49 +0900, Emanuele R. [email protected] 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
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
In message “Re: Compilation error in cont.c”
on Fri, 9 May 2008 23:32:42 +0900, Emanuele R. [email protected] writes:
|
|Yukihiro M. 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
By “removing -lrt”, I also meant removing HAVE_CLOCK_GETTIME from
<config.h>.
In message “Re: Compilation error in cont.c”
on Fri, 9 May 2008 18:25:36 +0900, Emanuele R. [email protected] writes:
|Thank you really very much for patching the trunk, indeed now I’m able
|to cross compile succesfully ruby 1.9.
Sounds nice.
|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?
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.
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.