Search code examples
c++boostyoctobitbake

Yocto SDK Missing Files


I have a Yocto project that requires boost. I have added boost and I can confirm that the boost libraries are placed into my SDK.

To create my SDK I run the command

DISTRO=fsl-imx-fb MACHINE=imx6ull14x14evk bitbake mainapplication-dev -c populate_sdk

This builds my image without my main application installed, the main application is run using eclipse.

In my image bitbake file I have the lines

IMAGE_INSTALL_append += " boost"
TOOLCHAIN_TARGET_TASK_append = " boost-staticdev"   

I was looking around and found that the second line above should solve my issue. It does not. My application is complaining that:

fatal error: boost/interprocess/managed_shared_memory.hpp: No such file or directory

And it is correct, this file does not exist in my Yocto SDK. I have searched in all files/folders in /opt/fsl-imx-fb/5.10-hardknott/sysroots.

What do I need to add to my bitbake file to get ALL of the required boost header files?

Edit: I changed TOOLCHAIN_TARGET_TASK_append = " boost-staticdev" to TOOLCHAIN_HOST_TASK += "nativesdk-boost-dev". This changes nothing.

Edit: I have attempted to use TOOLCHAIN_HOST_TASK_append = " boost-staticdev", this just gives me an error Couldn't find anything to satisfy 'boost-staticdev'.

Edit: Looking into my main application recipe-sysroot folder I see that managed_shared_memory.hpp exists. This is in the sysroot of my recipe but not in my SDK and I am unsure as to why.

Edit: I am building my dev version of the application. The bitbake file I was adding the DEPENDS += " boost" was not included in the build. I have since moved this to another recipe. The issue remains.


Solution

  • I made a mistake in my testing. I would export the new SDK but never installed it. The steps to solve this issue for me are

    1. Add TOOLCHAIN_TARGET_TASK_append = " boost-staticdev" to my recipe bitbake file
    2. Run DISTRO=fsl-imx-fb MACHINE=imx6ull14x14evk bitbake mainapplication-dev -c populate_sdk
    3. cd tmp/deploy/sdk/
    4. ./fsl-imx-fb-glibc-x86_64-mainapplication-dev-cortexa7t2hf-neon-imx6ull14x14evk-toolchain-5.10-hardknott.sh
    5. source /opt/fsl-imx-fb/5.10-hardknott/environment-setup-cortexa7t2hf-neon-poky-linux-gnueabi
    6. Run eclipse and build