Ticket #87 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

native python-2.5.2-r8 does not provide _ctypes

Reported by: nicola.mfb Owned by:
Priority: blocker Milestone: milestone2
Component: target Keywords:
Cc:

Description

Step to verify absence:

python
import ctypes

Python 2.5.2 (r252:60911, Mar 12 2009, 19:34:04)
[GCC 4.2.4 (Gentoo 4.2.4 p1.0)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/ctypes/__init__.py", line 10, in <module>
    from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes
>>>

build.log reports:

building '_ctypes' extension
[...]
armv4tl-softfloat-linux-gnueabi-gcc -pthread -fno-strict-aliasing -Os -march=armv4t -mtune=arm92$
distcc[14308] ERROR: compile source/_ctypes.c on 10.2.2.254 failed
distcc[14308] (dcc_build_somewhere) Warning: remote compilation of 'source/_ctypes.c' failed, re$
distcc[14308] Warning: failed to distribute source/_ctypes.c to 10.2.2.254, running locally inst$
In file included from source/_ctypes.c:126:
source/ctypes.h:71: error: expected specifier-qualifier-list before 'ffi_closure'
source/_ctypes.c: In function 'CFuncPtr_clear':
source/_ctypes.c:3417: error: 'ffi_info' has no member named 'pcl'
distcc[14308] ERROR: compile source/_ctypes.c on localhost failed
error: command 'armv4tl-softfloat-linux-gnueabi-gcc' failed with exit status 1

but ctypes is provided with cross-compilation or in native python 2.6.1

Regards

Nicola

Change History

Changed 3 years ago by sleipnir

  • priority changed from major to blocker
  • milestone changed from unsorted to milestone2

Could you please try to unpack python, apply python-2.5.2-cross-enable-ctypes-module.patch and try again? The patch is currently only applied if cross-compiling, but i guess it is also required for native compilation.

Changed 3 years ago by nicola.mfb

Done. it works :)

Thanks

Nicola

Changed 3 years ago by sleipnir

Nicola, could you please update the overlay to a revision >= r202 and try to remerge python. I've changed the ebuild to always apply the ctypes fix. Please close this ticket if python with ctypes works for you after remerging.

Changed 3 years ago by nicola.mfb

  • status changed from new to closed
  • resolution set to fixed

It works, thanks.

Nicola

Note: See TracTickets for help on using tickets.