Add packages to yocto host sdk
Asked Answered
T

1

6

I'm trying to cross-compile a programme for a Yocto qemu using Yocto's sdk tools. After setting up the sdk and sourcing it, trying to cross-compile the programme fails thusly:

*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
*** 
*** Install ncurses (ncurses-devel) and try again.
*** 

So I added ncurses to the IMAGE_INSTALL listing in the image's recipe, the same way I've installed other packages like dropbear, and confirmed that the meta layer that provides these packages was included in the bblayers.conf file. Then

TOOLCHAIN_HOST_TASK += "nativesdk-ncurses nativesdk-ncurses-dev"

was also added to the image's recipe, to tell bitbake to give the host's sdk access to ncurses. I tried adding several variations on nativesdk-ncurses-devel, to more closely match what the error was asking for, but the image was unable to build with it. After that the image and sdk were re-built and re-sourced, but when attempting to cross compile the programme, it still asked for Install ncurses (ncurses-devel) and try again.

So my question is:

How is ncurses added properly to Yocto's host sdk environment? Is there a step I'm missing? Are the ncurses files needed not the same as those found in the meta layer?

Any help would be deeply appreciated.

-Patches

Teahouse answered 14/2, 2018 at 0:43 Comment(5)
You can't do TOOLCHAIN_HOST_TASK += "foo", you need to do TOOLCHAIN_HOST_TASK_append = " foo". I saw a mailing list post about this, but I can't find it again. The gist is that it's defined with ?= so += overrides it completely.Meanwhile
This seems to be actually the correct answer as it seems that using the nativesdk-packagegroup-sdk-host.bb will not work if someone will make the sdk without that packagegroup (i.e. custom toolchains), this solution seems to be working when put inside the local.confBrusque
To add to the above: yoctoproject.org/docs/3.0/sdk-manual/…Kyongkyoto
I want to add pyyaml. Adding "nativesdk-python3-pyyaml" to the nativesdk-packagegroup-sdk-host.bb works for me but I want to have it in my local.conf or in my custom-layer that is tracked on my git repo. I couldn't archieve that so far. TOOLCHAIN_HOST_TASK:append = "python3-pyyaml" respectively TOOLCHAIN_HOST_TASK:append = "nativesdk-python3-pyyaml" showes me the following error: ERROR: Nothing RPROVIDES 'packagegroup-cross-canadian-ls1046ardbpython3-pyyaml'Ruisdael
@SimonRechermann You are missing a space before your package name. Without it, the append creates an invalid value in the RPROVIDES list (which is space-separated).Florencia
C
2

Please add needed package as RDEPENDS_${PN} in nativesdk-packagegroup-sdk-host.bb

https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb

Collencollenchyma answered 15/2, 2018 at 13:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.