[yocto] Py_ENABLE_SHARED in Python cross-build

Takashi Matsuzawa tmatsuzawa at uievolution.com
Wed Oct 12 02:01:54 PDT 2016


Hello Yocto.

I recently encountered following issue with Python module cross-build.
(On Yocto 2.0 based build system, using distutils.bbclass)

http://bugs.python.org/issue28421

Firstly I believed it is a Python issue, but further looked into, Yocto build environment has some cutomization causing this.

1) Python checks existence of Py_ENABLE_SHARED flag by calling sysconfig.py function.
This flag is loaded from pyconfig.h by sysconfig.py:parse_config_h().

2) If Py_ENABLE_SHARED is present, it properly add -L and -lpython2.7 LD flags to gcc command line.
But I cannot see thse are being added and my Python module cross-build fails.

3) For pyconfig.h generation to the cross target, Yocto build tools callign oe_multilib_header() which makes modification to pyconfig.h file, which unfortunately results #ifdef/#include directives
which cannot be parsed by sysconfig.py:parse_config_h()

Is this something likely to be addressed by now?

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


More information about the yocto mailing list