Subject:
[ruby-ffi] Re: Fwd: PPC not getting __WORDSIZE set
From:
Bryan Kearney
Date:
11/4/09 4:04 PM
To:
ruby-ffi@googlegroups.com

On 11/03/2009 01:46 PM, Wayne Meissner wrote:

2009/11/4 Bryan Kearney<bkearney@redhat.com>:
I  have applied both, and I have gotten past the earlier issue (Thank you!).
I am now seeing different errors on ppc and ppc64. On the ppc build [1] I
build and get a couple of unit test failures.. On the ppc64 build [2] I see
a wierd error about wrong number of arguments.

I'm not surprised.  You're probably the first person on the planet to
try ruby-ffi on either ppc-linux or ppc64-linux.

You have two choices:
1) Cut your losses and declare the package usable for i386 and x86_64
only.  This is probably the easiest path, and given how obsolete ppc
machines are, probably not a huge loss.

2) Learn enough details about the ppc32 and ppc64 abi, and debug
ruby-ffi.  It will probably turn out to be something simple, but it
could take a lot of tears and pain to track down.  The upside is that
this will help knock out any bugs for other arches like arm.

Naturally, I advocate option #1.
Yeah.. If I dont get this running in fedora I wont be able to use it for Augeas/Puppet.

Here is a patch for the ppc platform. Change is in the test library only.

-- bk


Closure_Test_Long.patch

diff --git a/libtest/ClosureTest.c b/libtest/ClosureTest.c
index c0ab8da..a68ec46 100644
--- a/libtest/ClosureTest.c
+++ b/libtest/ClosureTest.c
@@ -48,7 +48,7 @@ int testClosureVrI(int (*closure)(void))
 {
     return (*closure)();
 }
-long long testClosureVrL(long (*closure)(void))
+long testClosureVrL(long (*closure)(void))
 {
     return (*closure)();
 }