[yocto] Bitbake recipe using CMake that requires python-six as part of compiling?

Giordon Stark kratsg at gmail.com
Tue Mar 6 11:00:22 PST 2018


More specifically, the problem is that "six" is not a package that was
installed as part of pythonnative:

kratsg at dc:/local/d4/gstark/poky/build$
/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/recipe-sysroot-native/usr/bin/python-native/python
Python 2.7.13 (default, Jan  3 2018, 08:10:02)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import six
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named six
>>> import sys
>>> sys.path
['', '/users/kratsg/L1TriggerAnalysis/.local/lib/python2.6/site-packages',
'/local/d4/gstark/poky/build',
'/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/recipe-sysroot-native/usr/lib/python27.zip',
'/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/recipe-sysroot-native/usr/lib/python2.7',
'/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/recipe-sysroot-native/usr/lib/python2.7/plat-linux2',
'/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/recipe-sysroot-native/usr/lib/python2.7/lib-tk',
'/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/recipe-sysroot-native/usr/lib/python2.7/lib-old',
'/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/recipe-sysroot-native/usr/lib/python2.7/lib-dynload',
'/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/recipe-sysroot-native/usr/lib/python2.7/site-packages']

And I have a hard time googling/searching to figure out how to solve this
since most answers are about installing python packages on a target
machine, rather than for the host's pythonnative.

Giordon


On Tue, Mar 6, 2018 at 12:50 PM Giordon Stark <kratsg at gmail.com> wrote:

> Hi,
>
> I tried this and it didn't work.
>
> Giordon
> On Tue, Mar 6, 2018 at 12:43 Burton, Ross <ross.burton at intel.com> wrote:
>
>> Add DEPENDS=python-six
>>
>> Ross
>>
>> On 6 March 2018 at 18:11, Giordon Stark <kratsg at gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I'm struggling with what should be a simple-ish recipe (I think). I'm
>>> writing a recipe implementation for
>>> https://github.com/open62541/open62541 (open62541). So I start with
>>>
>>> devtool add open62541 https://github.com/open62541/open62541.git
>>>
>>> then I edit this, so it currently looks like this for me:
>>>
>>> SUMMARY = "OPC UA implementation"
>>> LICENSE = "MPL-2.0"
>>> LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
>>> SRC_URI = "gitsm://github.com/open62541/open62541.git;protocol=https"
>>> PV = "0.3+git${SRCPV}"
>>> SRCREV = "a6b99dc0579a53207b7dfe1d16423c2c1daa467e"
>>>
>>> S = "${WORKDIR}/git"
>>>
>>> # NOTE: unable to map the following CMake package dependencies: Check
>>> Sphinx ClangTools LATEX MbedTLS Valgrind
>>> DEPENDS = "openssl"
>>>
>>> inherit cmake pythonnative
>>>
>>> # Specify any options you want to pass to cmake using EXTRA_OECMAKE:
>>> EXTRA_OECMAKE = ""
>>>
>>> however, when I run devtool build open62541, I get  errors about "No
>>> module named six":
>>>
>>> | make[2]: Leaving directory
>>> '/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/open62541-0.3+git999'
>>> | Traceback (most recent call last):
>>> |   File
>>> "/local/d4/gstark/poky/build/workspace/sources/open62541/tools/nodeset_compiler/nodeset_compiler.py",
>>> line 27, in <module>
>>> |     from nodeset import *
>>> |   File
>>> "/local/d4/gstark/poky/build/workspace/sources/open62541/tools/nodeset_compiler/nodeset.py",
>>> line 30, in <module>
>>> |     from nodes import *
>>> |   File
>>> "/local/d4/gstark/poky/build/workspace/sources/open62541/tools/nodeset_compiler/nodes.py",
>>> line 21, in <module>
>>> |     from datatypes import *
>>> |   File
>>> "/local/d4/gstark/poky/build/workspace/sources/open62541/tools/nodeset_compiler/datatypes.py",
>>> line 29, in <module>
>>> |     import six
>>> | ImportError: No module named six
>>> | CMakeFiles/open62541-generator-namespace.dir/build.make:71: recipe for
>>> target 'src_generated/ua_namespace0.c' failed
>>> | make[2]: *** [src_generated/ua_namespace0.c] Error 1
>>> | make[2]: Leaving directory
>>> '/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/open62541-0.3+git999'
>>> | CMakeFiles/Makefile2:108: recipe for target
>>> 'CMakeFiles/open62541-generator-namespace.dir/all' failed
>>> | make[1]: *** [CMakeFiles/open62541-generator-namespace.dir/all] Error 2
>>> | make[1]: *** Waiting for unfinished jobs....
>>>
>>> How do I get "python-six" added as part of pythonnative?
>>>
>>> Giordon
>>>
>>> --
>>> Giordon Stark
>>>
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto at yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>>
>>> --
> Giordon Stark
>
-- 
Giordon Stark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180306/6055d57a/attachment.html>


More information about the yocto mailing list