Hello Yocto.

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


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 
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?

yocto mailing list

Reply via email to