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.

SK-TDA4VM: Not able to build from compiled sysroots

Part Number: SK-TDA4VM
Other Parts Discussed in Thread: TDA4VM,

Hi Team,

I am trying to compile few custom gstreamer plugins for my product and it is not cross-compiling with sysroots as "arago-tmp-external-arm-glibc/sysroots/j7-evm" . For example the command is as follows

aarch64-none-linux-gnu-g++ --sysroot=/home/anantha/ti-build/build/yocto/build/arago-tmp-external-arm-glibc/sysroots/j7-evm -fPIC -Os -I/home/anantha/ti-build/build/yocto/build/arago-tmp-external-arm-glibc/sysroots/j7-evm/usr/include/ -I/home/anantha/ti-build/build/yocto/build/arago-tmp-external-arm-glibc/sysroots/j7-evm/usr/include/gstreamer-1.0 -L/home/anantha/ti-build/build/yocto/build/arago-tmp-external-arm-glibc/sysroots/j7-evm/usr/lib/gstreamer-1.0 -fvisibility=hidden -std=gnu++11 -Wextra -Wall -Werror -Wno-unused-parameter -L/home/anantha/ti-build/build/gstplugins -I/home/anantha/ti-build/build/gstplugins -flto -MMD -MP -g -ggdb -Wno-terminate -Wl,--as-needed -pthread -I/home/anantha/ti-build/build/yocto/build/arago-tmp-external-arm-glibc/sysroots/j7-evm/usr/include/gstreamer-1.0 -I/home/anantha/ti-build/build/yocto/build/arago-tmp-external-arm-glibc/sysroots/j7-evm/usr/include/glib-2.0 -I/home/anantha/ti-build/build/yocto/build/arago-tmp-external-arm-glibc/sysroots/j7-evm/usr/lib/glib-2.0/include -pthread -I/home/anantha/ti-build/build/yocto/build/arago-tmp-external-arm-glibc/sysroots/j7-evm/usr/include/gstreamer-1.0 -I/home/anantha/ti-build/build/yocto/build/arago-tmp-external-arm-glibc/sysroots/j7-evm/usr/include/glib-2.0 -I/home/anantha/ti-build/build/yocto/build/arago-tmp-external-arm-glibc/sysroots/j7-evm/usr/lib/glib-2.0/include -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -c /home/anantha/co/firmware/gstplugins/gstreamer/plugins//iot-cam-src/gstiotcamsrc.cc -o /home/anantha/ti-build/build/gstplugins/iot-cam-src/iotcamsrc.o
/home/anantha/co/firmware/gstplugins/gstreamer/plugins//iot-cam-src/gstiotcamsrc.cc:26:10: fatal error: cstdio: No such file or directory
26 | #include <cstdio>
| ^~~~~~~~

A similar command if I use for with another system , for example a qemarm64 and even genericx86-64 that I have built it works fine and the object is created.

aarch64-poky-linux-g++ --sysroot=/home/anantha/qemu-build/build/yocto/build/tmp/sysroots/qemuarm64 -fPIC -Os -I/home/anantha/qemu-build/build/yocto/build/tmp/sysroots/qemuarm64/usr/include/ -I/home/anantha/qemu-build/build/yocto/build/tmp/sysroots/qemuarm64/usr/include/gstreamer-1.0 -L/home/anantha/qemu-build/build/yocto/build/tmp/sysroots/qemuarm64/usr/lib/gstreamer-1.0 -fvisibility=hidden -std=gnu++11 -Wextra -Wall -Werror -Wno-unused-parameter -L/home/anantha/qemu-build/build/gstplugins/qemuarm64 -I/home/anantha/qemu-build/build/gstplugins/qemuarm64 -flto -MMD -MP -g -ggdb - -Wno-terminate -Wl,--as-needed -pthread -I/home/anantha/qemu-build/build/yocto/build/tmp/sysroots/qemuarm64/usr/include/gstreamer-1.0 -I/home/anantha/qemu-build/build/yocto/build/tmp/sysroots/qemuarm64/usr/include/glib-2.0 -I/home/anantha/qemu-build/build/yocto/build/tmp/sysroots/qemuarm64/usr/lib/glib-2.0/include -pthread -I/home/anantha/qemu-build/build/yocto/build/tmp/sysroots/qemuarm64/usr/include/gstreamer-1.0 -I/home/anantha/qemu-build/build/yocto/build/tmp/sysroots/qemuarm64/usr/include/glib-2.0 -I/home/anantha/qemu-build/build/yocto/build/tmp/sysroots/qemuarm64/usr/lib/glib-2.0/include -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -c /home/anantha/co/firmware/gstplugins/gstreamer/plugins//iot-cam-src/gstiotcamsrc.cc -o /home/anantha/qemu-build/build/gstplugins/qemuarm64/iot-cam-src/iotcamsrc.o

I won't  be able to use the default sysroots inside linux-devkit/sysroots/aarch64-linux as it doesn't have all libraries that I need.

Am i doing anything wrong here or do I need to do anything extra ?

Thanks in advance

Regards,

Anantha

  • Hi Team, any updates here ?

  • Hi Anantha,

    It seems like this GStreamer plugin has additional dependenies that is not present in the sysroots of the default image.

    There are possibly two options:

    1. Compile the needed GStreamer plugin by adding the recipe into the Yocto image (tisdk-default-image or similar) that you are building for such that the recipe itself will notify Yocto and build the requried dependency. Assuming that the custom plugin has the Yocto recipe and its advertising the dependencies correctly.
    2. If you don't have the Yocto recipe for the custom GStreamer plugin then you can try to add the dependencies to the Yocto image and then create a new sysroots and attempt to satisfy and build the plugin.

    Regards

    Karthik

  • Hi Karthik,

    As far as I know(From past projects where we used similar approach to build other gstreamer plugins) we should be able to build gstreamer plugins without a yocto recipe just by using the built sysroots from "build-sysroots recipe" and I have shared one such successful attempt on Qemu.

    So the real issue is tda4vm "build-sysroots" is not able to produce a sysroot that can be used to build other stuff. And if you see the error it is throwing "cstdio" not found and not related gstreamer. More-over I went back and checked the sysroots and I do see all gstreamer libraries and all available in the folder. So any suggestion for that ?

    Regards,

    Anantha

  • Anantha,

    Ok, understood that you don't want to build with Yocto. 

    Have you considered point #2 above - to add the dependencies (we don't know the details of the plugin and its dependencies, but I imagine that you can identify them) to generate the sysroot.

    Regards
    Karthik

  • Hi Karthik,

    Seems like there is a fundamental issue when building using the sysroots generated from the build-sysroots recipe. If you see, the error is pointing to "cstdio"not found error. Leave the gstreamer plugin, I am not even able to build a "helloworld" program also as the first standard C++ includes itself is failing.

    About the #2 , I didnt exactly understood the suggestion, can you explain a bit more in detail. But from what I understood is you are asking to create a new sysroot which have the required dependency, as far as I know the build-sysroot is 1 large chunk of sysroot that includes all the dependencies so far came up in the project. So it must not be the problem if I am not wrong and the g++ is not complaining about missing libraries and all , so that means its able to find the required dependencies as well. So not clearly sure where it is going wrong

    And the reason why we want to continue using the same setup is because then it would become a uniform way of building the plugins for all the projects, than treating TDA4vm separately

    Thanks,

    Anantha

  • Hi Anantha,

    Apologies for the late reply. please share the SK-TDA4VM version you are using and Can you try the same on the latest version SDK 8.5?

    Regards

    Nikshith