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

Giordon Stark kratsg at gmail.com
Tue Mar 6 11:48:51 PST 2018


Thanks! Sorry to ping again, but I've done something poorly wrong. I
converted this code which now works, to point at the tarball provided by
github instead:

SUMMARY = "OPC UA implementation"
HOMEPAGE = "https://open62541.org/"
SECTION = "devel/libs"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e879eaad64aab8e1f8e63e298f5cea28"
DEPENDS = "openssl python-six-native"

SRC_URI = "https://github.com/open62541/open62541/archive/v${PV}.tar.gz"
SRC_URI[md5sum] = "7c3fedab541e6df22de06c47cb4768fc"
SRC_URI[sha256sum] =
"2fc6eb2eca7d53db68206db7c9c7368f0a034992f050bee971e4823d3d739260"

S = "${WORKDIR}/${PN}-${PV}"

inherit cmake pythonnative

# Specify any options you want to pass to cmake using EXTRA_OECMAKE:
EXTRA_OECMAKE = "\
  -DCMAKE_BUILD_TYPE=Release \
"

FILES_${PN}_append = "\
  ${libdir}/cmake \
  ${libdir}/cmake/open62541*.cmake \
"

where PV=0.2 (open62541_0.2.bb). And I see an error on install (full log:
https://gist.github.com/kratsg/5c3740ab72403595d5b9e0e855a3697f)

| CMake Error at cmake_install.cmake:40 (file):
|   file INSTALL cannot find
|
 "/local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.2-r0/build/open62541.h".

So I'm wondering if I screwed up something by using the tarball instead of
a clone. I thought I translated it relatively well, and the release matches
the hash I was using.

Giordon

On Tue, Mar 6, 2018 at 1:39 PM Philip Balister <philip at balister.org> wrote:

> On 03/06/2018 02:14 PM, Giordon Stark wrote:
> > Hi Philip,
> >
> > That was it indeed! I've gotten it working. I don't see
> "python-six-native"
> > as a valid recipe in layers.openembedded.org. Is this a special case or
> is
> > there a way to identify these sorts of packages in the future?
>
> The python-six recipe should have a line like:
>
> BBCLASSEXTEND = "native"
>
> This tells bitbake it can build a native version by doing some tweaks to
> the toolchain it uses and where to put the output.
>
> Philip
>
>
> >
> > open62541-0.3+git999-r0 do_compile: NOTE: open62541: compiling from
> > external source tree
> /local/d4/gstark/poky/build/workspace/sources/open62541
> > ERROR: open62541-0.3+git999-r0 do_package: QA Issue: open62541:
> > Files/directories were installed but not shipped in any package:
> >   /usr/lib/cmake
> >   /usr/lib/cmake/open62541ConfigVersion.cmake
> >   /usr/lib/cmake/open62541Targets.cmake
> >   /usr/lib/cmake/open62541-config.cmake
> >   /usr/lib/cmake/open62541Targets-debug.cmake
> > Please set FILES such that these items are packaged. Alternatively if
> they
> > are unneeded, avoid installing them or delete them within do_install.
> > open62541: 5 installed and not shipped files. [installed-vs-shipped]
> > ERROR: open62541-0.3+git999-r0 do_package: Fatal QA errors found, failing
> > task.
> > ERROR: open62541-0.3+git999-r0 do_package: Function failed: do_package
> > ERROR: Logfile of failure stored in:
> >
> /local/d4/gstark/poky/build/tmp/work/aarch64-poky-linux/open62541/0.3+git999-r0/temp/log.do_package.14179
> > ERROR: Task
> >
> (/local/d4/gstark/poky/build/workspace/recipes/open62541/open62541_git.bb:
> do_package)
> > failed with exit code '1'
> > NOTE: Tasks Summary: Attempted 506 tasks of which 492 didn't need to be
> > rerun and 1 failed.
> >
> > Summary: 1 task failed:
> >   /local/d4/gstark/poky/build/workspace/recipes/open62541/
> open62541_git.bb:
> > do_package
> > Summary: There were 3 ERROR messages shown, returning a non-zero exit
> code.
> >
> >
> > I just need to remind myself of cleaning these files up :)
> >
> > Giordon
> >
> > On Tue, Mar 6, 2018 at 1:09 PM Philip Balister <philip at balister.org>
> wrote:
> >
> >> On 03/06/2018 01:42 PM, Burton, Ross wrote:
> >>> Add DEPENDS=python-six
> >>
> >> Maybe:
> >>
> >> DEPENDS = "python-six-native"
> >>
> >> Philip
> >>
> >>>
> >>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180306/cdcf717b/attachment.html>


More information about the yocto mailing list