[yocto] Cross compile recipe cmake

Andrea Galbusera gizero at gmail.com
Fri Jul 14 02:29:52 PDT 2017


On Thu, Jul 13, 2017 at 10:48 AM, Elmar van Rijnswou <
Elmarblabla at hotmail.com> wrote:

> Hello! I've been doing a lot of searching on the internet,but I can't seem
> to find anybody with my problem. I'm trying to add a recipe to my image and
> deliver it straight with the system. Everything goes fine, up until the
> recipe I created links to other libraries. I have dependencies to Qt4. I
> used the hello world example recipe, which I can bitbake successfully. My
> recipe is the following:
>
>
> SUMMARY = "Simple helloworld application"
> SECTION = "examples"
> LICENSE = "Closed"
> SRC_URI = "file://media/traffic/Yocto/src/elva/"
> S = "/media/traffic/Yocto/src/elva/proj/src"
>

it looks like you're trying to build from an "external" source tree. Yocto
does support this with a dedicated class you can inherit (externalsrc). See
[1] for the relevant doc. Maybe it can help solving the issue with cmake...

[1]
http://www.yoctoproject.org/docs/2.3/mega-manual/mega-manual.html#building-software-from-an-external-source


> inherit cmake
> EXTRA_OECMAKE = ""
>
> The problem I'm having now is that, using the generated toolchain, cmake
> is looking at the wrong directories. The rootpath is also crooked when I
> print it out in my cmake project file:
>
> CMAKE_FIND_ROOT_PATH:/media/traffic/Yocto/QorIQ-SDK-V2.0-
> 20160527-yocto/build_ls2080abluebox/tmp/sysroots/ls2080abluebox
> /media/traffic/Yocto/QorIQ-SDK-V2.0-20160527-yocto/build_ls2080abluebox/
> tmp/sysroots/x86_64-linux
>
>
> What am I doing wrong? My target is arm. I can build my image fine without
> the recipe, so I'm thinking that there is a step I'm missing. Also when I
> export the SDK I can see that all the right libraries and findscripts are
> available (in the sysroot). But whenever I change my source, it still looks
> in the sysroot of the host system. Any help would be greatly appreciated!
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170714/0ee51ec6/attachment.html>


More information about the yocto mailing list