Bug 1003 - Python - missing ctypes module
Summary: Python - missing ctypes module
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.1
Assignee: Nitin Kamble
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-04-22 07:13 UTC by Gary Thomas
Modified: 2011-05-13 11:15 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
Fix configure problem with ctypes module (5.55 KB, patch)
2011-04-22 08:34 UTC, Gary Thomas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Thomas 2011-04-22 07:13:26 UTC
Building from master 37ac9a0823690bd3e031c04e2351a41af04e8aa1, any target will
have this problem.

Unable to use ctypes/_ctypes module:
  # python
  Python 2.6.6 (r266:84292, Mar 30 2011, 10:57:26) [GCC 4.5.2] 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.6/ctypes/__init__.py", line 10, in <module>
      from _ctypes import Union, Structure, Array
  ImportError: No module named _ctypes

I believe this is because of this error during the build:
  autoreconf: Entering directory `Modules/_ctypes/libffi'
  autoreconf: configure.ac: not using Gettext
  autoreconf: running: aclocal --force 
  configure.ac:26: error: m4_copy: won't overwrite defined macro: _AC_ARG_VAR_PRECIOUS
  configure.ac:26: the top level
  autom4te: /home/local/p60_poky/tmp/sysroots/i686-linux/usr/bin/m4 failed with exit status: 1
  aclocal: /home/local/p60_poky/tmp/sysroots/i686-linux/usr/bin/autom4te failed with exit status: 1
  autoreconf: aclocal failed with exit status: 1
  NOTE: _ctypes failed to autoreconf

Perhaps related to bug #941?
Comment 2 Gary Thomas 2011-04-22 08:34:36 UTC
Created attachment 140 [details]
Fix configure problem with ctypes module
Comment 3 Gary Thomas 2011-04-22 08:35:47 UTC
Not related to bug #941 (which persists, but doesn't seem to cause problems)

With this patch, the ctypes module now works fine.
Comment 5 Gary Thomas 2011-04-29 07:32:54 UTC
Python now builds the _ctypes.so library