[yocto] Python3 failure using ctypes

Peter Bergin peter.bergin at tritech.se
Wed Jun 10 14:41:40 PDT 2015


Hi again,


On 06/09/2015 12:21 PM, Peter Bergin wrote:
Hi,

On 06/09/2015 11:28 AM, Burton, Ross wrote:

On 9 June 2015 at 09:27, Peter Bergin <peter.bergin at tritech.se<mailto:peter.bergin at tritech.se>> wrote:
The root cause of this is an error during the build of Python3. From tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/python3/3.3.3-r1.0/temp/log.do_configure:

DEBUG: Executing shell function do_configure
autoreconf: 'configure.ac<http://configure.ac>' or 'configure.in<http://configure.in>' is required
NOTE: _ctypes failed to autoreconf

The targeted machine for us is i.Mx6 built with the Freescale community BSP but I have also been able to reproduce the same thing with just building core-image-base for qemux86 only appending python3-ctypes.

That's odd.  My local builds of python3 appear to be working fine, there's a python3-ctypes package with a _ctype.so inside, and configure works:


It seems that you are building Python 3.4.3. Recipes included in fido is version 3.3.3.

autoreconf: Entering directory `../Python-3.4.3/Modules/_ctypes/libffi'
autoreconf: configure.ac<http://configure.ac>: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac<http://configure.ac>: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /data/poky-master/tmp/sysroots/x86_64-linux/usr/bin/autoconf --force
autoreconf: running: /data/poky-master/tmp/sysroots/x86_64-linux/usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:34<http://configure.ac:34>: installing './compile'
configure.ac:22<http://configure.ac:22>: installing './missing'
Makefile.am: installing './depcomp'
autoreconf: running: gnu-configize
autoreconf: Leaving directory `../Python-3.4.3/Modules/_ctypes/libffi'

Can you share the full do_configure log?

Ross

I attach the log.do_configure files from a build. See if you can find something odd in it.

Thanks,
/Peter

I still have serious with this issue. I think it is not possible to cross-compile python3-ctypes in fido. I filed a bug https://bugzilla.yoctoproject.org/show_bug.cgi?id=7873 and hope that I can get some help to sort this out.

My previous mail showed an error in the configure step. I have fixed that issue with the following patch to poky:

diff --git a/meta/recipes-devtools/python/python3_3.3.3.bb b/meta/recipes-devtools/python/python3_3.3.3.bb
index 6147408..9162ad7 100644
--- a/meta/recipes-devtools/python/python3_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3_3.3.3.bb
@@ -75,9 +75,9 @@ export _PYTHON_PROJECT_SRC = "${S}"
 # No ctypes option for python 3
 PYTHONLSBOPTS = ""

-do_configure_prepend() {
+do_configure_append() {
     rm -f ${S}/Makefile.orig
-    autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
+    autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
 }

 do_compile() {


The next and more serious issue is now in the compile step. When compiling the switch --with-system-ffi that is passed to configure is not taken care of by the build system and setup.py. When building _ctypes the file setup.py is looking for information in the python lib sysconfig but the sysconfig used is the one for the host. More specific information is located in the variable CONFIG_ARGS.

Regards,
/Peter


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20150610/57757559/attachment.html>


More information about the yocto mailing list