This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

J721EXSOMXEVM: Missing libstdc++fs.a in the yocot linux image build using ti-sdk-evm-08

Part Number: J721EXSOMXEVM

Hi,

We are building TI processor SDK Linux root fs using the Yocto build as per the instructions provided in this document https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/08_00_00_08/exports/docs/linux/Overview_Building_the_SDK.html. We are able to successfully build the root fs image. A part of our application requires the C++ filesystem library `libstdc++fs.a`. When we look at the sysroot that comes with the SDK or the built rootfs image, not able to find the `libstdc++fs.a` library.

When I look at meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb, I see that `libstdc++-staticdev` is included. I also included it in the "build/conf/local.conf" and rebuilt the image. Still I do not see `libstdc++fs.a" getting created. I also searched the entire build folder and could not find this library. Would really appreciate if I can get some comments or suggestions how this library can be built and included in the root fs image.

Thanks

Anup

  • Hi Anup,

    Sorry about the delayed response.

    The libstdc++fs.a is part of the gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu toolchain. You can find it under: ./aarch64-none-linux-gnu/lib64/libstdc++fs.a

    Regards

    Karthik

  • Hi Karthik,

    Yes, I see that in my toolchain dir, which is what I set as the path for TOOLCHAIN_BASE in the following command while building the yocto based rootfs image

    TOOLCHAIN_BASE=<PATH_TO_TOOLCHAIN> MACHINE=<machine> bitbake -k tisdk-default-image


    My question is, how can I get `libstdc++fs.a` included in my rootfs image? I do not see `libstdc++fs.a`
    in my rootfs image that was built with the above command.

    Thanks
    Anup
  • Anup,

    If its a matter of just copying this archive, would it be possible for you to write your own recipe or a post packaging step to put this in the required location?

    Regards

    Karthik

  • Hi Karthik,

    If its a matter of just copying this archive,

    I assume you are talking about, to add a step in my yocto build process to copy `libstdc++fs.a` from the toolchain dir to the final rootfs image. I can do that, but not sure if that is the right approach. I can do that as a final hack, if we cannot find a way to do it other ways. The reason being, other libs such as  say libstdc++.so gets included in the rootfs image. I am curious why  `libstdc++fs.a`  is missing. I tried adding "libstdc++-staticdev"  into my image recipe tisdk-default-image.bb, but it still did not help. I did quite a bit of digging into meta-arm, oe-core and meta-arago wherever stdc++ is included and tried to include "libstdc++-staticdev"  and still could not get libstdc++fs.a included. If someone can point me to how `libstdc++.so` gets included in my rootfs image(possibly the right recipe to look at) while running the following command, might be that will help me to try including "libstdc++fs.a"

    TOOLCHAIN_BASE=<PATH_TO_TOOLCHAIN> MACHINE=j7-evm bitbake -k tisdk-default-image

    Thanks

    Anup

  • Anup,

    This is a generic toolchain question, I suggest that you please check with meta-arm or yocto project mailing list for suggestions.

    Regards

    Karthik