ts-7000
[Top] [All Lists]

Re: [ts-7000] Python 2.5.1 ctypes

To:
Subject: Re: [ts-7000] Python 2.5.1 ctypes
From: "Samuel M. Smith" <>
Date: Thu, 8 Nov 2007 11:55:28 -0700
I couldn't fix it.
I tried building against the libffi2 and libffi2-dev but no luck
I posted on python-users and got a reply from someone at ctypes.org who said
libffi4 (Etch) is know to work but didn't think previous versions of libffi were supported.
At that point I gave up.  Its not urgent for me so I am hoping  an Etch kernel from
technologic comes along before I need it or NetBSD.



On 07 Nov 2007, at 15:11 , Tom Panzarella wrote:

Samuel,

Out of curiosity, did you get this issue resolved? If so, do you mind
sharing what you did. I'm working through the same problem that you
had right now. Building against the python distributed libffi fails,
as does building against libffi2 and libffi3 available from the sarge
apt repository. I will continue working toward a solution, but if you
know the fix, that could save me a lot of time.

Thanks in advance for any help you can offer.

Tom.

On Oct 26, 2007, at 1:35 PM, Samuel M. Smith wrote:

> It looks like it needs <ffi.h> which is in three places
>
> /usr/local/src/Python-2.5.1/Modules/_ctypes/libffi_arm_wince/ffi.h
> /usr/local/src/Python-2.5.1/Modules/_ctypes/libffi_msvc/ffi.h
> /usr/local/src/Python-2.5.1/build/temp.linux-armv4l-2.5/libffi/
> include/ffi.h
>
> Do you think I need the libffi2 and libffi2-dev packages?
>
> with two different definitions for ffi_closure
>
> typedef struct {
> char tramp[FFI_TRAMPOLINE_SIZE];
> ffi_cif *cif;
> void (*fun)(ffi_cif*,void*,void**,void*);
> void *user_data;
> } ffi_closure __attribute__((aligned (8)));
>
> typedef struct {
> char tramp[FFI_TRAMPOLINE_SIZE];
> ffi_cif *cif;
> void (*fun)(ffi_cif*,void*,void**,void*);
> void *user_data;
> } ffi_closure;
>
> I wonder if the __attribute__ syntax is causing a problem.
>
>
> On 23 Oct 2007, at 14:12 , Samuel M. Smith wrote:
>
>> Thanks good suggestion. I will check it out.
>>
>>
>>
>> On 17 Oct 2007, at 14:45 , Kevin Cozens wrote:
>>
>>> Samuel M. Smith wrote:
>>> > Anybody have any idea how to make ctypes build.
>>> >
>>> > These are the errors I get on make install.
>>> >
>>> >
>>> >
>>> > building '_ctypes' extension
>>> > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
>>> > -Wstrict-prototypes -fPIC -I. -I/usr/local/src/Python-2.5.1/./
>>> Include
>>> > -Ibuild/temp.linux-armv4l-2.5/libffi/include
>>> > -Ibuild/temp.linux-armv4l-2.5/libffi
>>> > -I/usr/local/src/Python-2.5.1/Modules/_ctypes/libffi/src -I./
>>> Include -I.
>>> > -I/usr/local/include -I/usr/local/src/Python-2.5.1/Include
>>> > -I/usr/local/src/Python-2.5.1 -c
>>> > /usr/local/src/Python-2.5.1/Modules/_ctypes/_ctypes.c -o
>>> > build/temp.linux-armv4l-2.5/usr/local/src/Python-2.5.1/Modules/
>>> _ctypes/_ctypes.o
>>> > In file included from
>>> > /usr/local/src/Python-2.5.1/Modules/_ctypes/_ctypes.c:126:
>>> > /usr/local/src/Python-2.5.1/Modules/_ctypes/ctypes.h:71: error:
>>> syntax
>>> > error before "ffi_closure"
>>> > /usr/local/src/Python-2.5.1/Modules/_ctypes/ctypes.h:71:
>>> warning: no
>>> > semicolon at end of struct or union
>>> > /usr/local/src/Python-2.5.1/Modules/_ctypes/ctypes.h:78: error:
>>> syntax
>>> > error before '}' token
>>> [snip]
>>>
>>> I haven't looked at the source file you are trying to compile but,
>>> based on
>>> the error messages, I would suspect you are missing a header file.
>>> The errors
>>> you listed are typical of those you might get when a header file
>>> is missing
>>> which defines some data types. Check the #include lines in
>>> _ctypes.h and make
>>> sure all referenced header files exist on the machine being used
>>> to compile.
>>> Also, make sure the compiler line is being told (via -I) where to
>>> find the
>>> header files if they are in any non-stander locations.
>>>
>>> --
>>> Cheers!
>>>
>>> Kevin.
>>>
>>> http://www.ve3syb.ca/ |"What are we going to do today, Borg?"
>>> Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
>>> | Try to assimilate the world!"
>>> #include <disclaimer/favourite> | -Pinkutus & the Borg
>>>
>>
>> **********************************************************************
>>
>> Samuel M. Smith Ph.D.
>>
>> 2966 Fort Hill Road
>>
>> Eagle Mountain, Utah 84005-4108
>>
>> 801-768-2768 voice
>>
>> 801-768-2769 fax
>>
>> **********************************************************************
>>
>> "The greatest source of failure and unhappiness in the world is
>>
>> giving up what we want most for what we want at the moment"
>>
>> **********************************************************************
>>
>>
>>
>>
>
> **********************************************************************
> Samuel M. Smith Ph.D.
> 2966 Fort Hill Road
> Eagle Mountain, Utah 84005-4108
> 801-768-2768 voice
> 801-768-2769 fax
> **********************************************************************
> "The greatest source of failure and unhappiness in the world is
> giving up what we want most for what we want at the moment"
> **********************************************************************
>
>
>


**********************************************************************

Samuel M. Smith Ph.D.

2966 Fort Hill Road

Eagle Mountain, Utah 84005-4108

801-768-2768 voice

801-768-2769 fax

**********************************************************************

"The greatest source of failure and unhappiness in the world is 

giving up what we want most for what we want at the moment"

**********************************************************************



__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU