Subject:
[ruby-ffi] Re: Fwd: PPC not getting __WORDSIZE set
From:
Wayne Meissner
Date:
11/2/09 7:03 PM
To:
ruby-ffi@googlegroups.com


That does look a bit suspicious.

Given you're packaging for fedora, and fedora has a recent version of
libffi installed (or can be added as a dependency), you could try
creating a patch using changeset
8cbc3f54a875a61e1fb67ac88a25b71940a3ed91

That allows ruby-ffi to build against the system libffi.  Technically
it always allowed this, but ruby-ffi was a bit overly picky about what
it wanted from libffi.

You may find you don't even need that patch.  Just having the proper
libffi-dev packages installed/as dependencies might allow extconf.rb
to pick it up.

You might also need 1d50e0647ac55e15222f9a6a9d163d7a68022186 to
properly detect & pass powerpc64 into libtest/GNUmakefile, so it
builds for the correct arch.

2009/11/3 Bryan Kearney <bkearney@redhat.com>:
>
> So.. I am not a strong C guy. If you check this message, it appears that
> __WORDSIZE is not being set correctly for ppc64. If I look at
> ffi/ext/ffi_c/libffi/configure I see:
>
>        ppc64-*linux*|powerpc64-*linux*)
>          LD="${LD-ld} -m elf32ppclinux"
>          ;;
>
>
> Is this correct? Should it be calling 32 bit libraries
>
> -- bk
>
> -------- Original Message --------
> Subject: PPC not getting __WORDSIZE set
> Date: Mon, 02 Nov 2009 17:15:50 -0500
> From: Bryan Kearney <bkearney@redhat.com>
> Reply-To: Development discussions related to Fedora
> <fedora-devel-list@redhat.com>
> To: Development discussions related to Fedora <fedora-devel-list@redhat.com>
>
> Word of warning.. I am no too familiar with C across platforms.  I am
> trying to package ruby-ffi (spec file is at [1]) and when I do a scratch
> build in Koji [2] it runs fine on x86 but is failing in ppc_64. It
> appears that __WORDSIZE is not being set [3]. I looked at the CFLags for
> the x86_64 and they are the same, so I assumed things would run fine.
> Can anyone point me at what to look at next?
>
> -- bk
>
> [1] Spec file: http://bkearney.fedorapeople.org/ruby-ffi.spec
> [2] Main Build: http://koji.fedoraproject.org/koji/taskinfo?taskID=1783879
> [3] Failing Build Log:
> http://koji.fedoraproject.org/koji/getfile?taskID=1783882&name=build.log
> [4] SRPM: http://bkearney.fedorapeople.org/ruby-ffi-0.5.1-1.fc11.src.rpm
>
> --
> fedora-devel-list mailing list
> fedora-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-devel-list
>