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.

TDA4VM: Linux SDK for edge AI applications environment

Part Number: TDA4VM
Other Parts Discussed in Thread: J721EXSOMXEVM,

Hi experts

I have download the 

ti-processor-sdk-linux-sk-tda4vm-etcher-image.zip

and because I work behind a VPN, so I run a docker container

But when I run ./setup_script.sh

There's a error appear.

How can I solve this problem

  • -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- CMAKE_BUILD_TYPE = Release PROJECT_NAME = ti_dl_inferer
    -- CMAKE_BUILD_TYPE = Release PROJECT_NAME = edgeai_utils
    -- CMAKE_BUILD_TYPE = Release PROJECT_NAME = edgeai_common
    -- CMAKE_BUILD_TYPE = Release PROJECT_NAME = app_edgeai
    -- CMAKE_BUILD_TYPE = Release PROJECT_NAME = app_dump_model_info
    -- CMAKE_BUILD_TYPE = Release PROJECT_NAME = app_config_checker
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /opt/edge_ai_apps/apps_cpp/build
    Scanning dependencies of target ti_dl_inferer
    Scanning dependencies of target edgeai_utils
    [  7%] Building CXX object dl_inferer/CMakeFiles/ti_dl_inferer.dir/src/ti_dl_inferer.cpp.o
    [  7%] Building CXX object utils/CMakeFiles/edgeai_utils.dir/src/edgeai_perfstats.cpp.o
    In file included from /opt/edge_ai_apps/apps_cpp/dl_inferer/src/ti_dl_inferer.cpp:37:
    /opt/edge_ai_apps/apps_cpp/dl_inferer/../dl_inferer/include/ti_tflite_inferer.h:36:10: fatal error: tensorflow/lite/model.h: No such file or directory
       36 | #include <tensorflow/lite/model.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[2]: *** [dl_inferer/CMakeFiles/ti_dl_inferer.dir/build.make:63: dl_inferer/CMakeFiles/ti_dl_inferer.dir/src/ti_dl_inferer.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:199: dl_inferer/CMakeFiles/ti_dl_inferer.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 10%] Building CXX object utils/CMakeFiles/edgeai_utils.dir/src/ti_logger.cpp.o
    [ 14%] Linking CXX static library ../../lib/Release/libedgeai_utils.a
    [ 14%] Built target edgeai_utils
    make: *** [Makefile:130: all] Error 2
    Setup Done!
    [docker] root@j7-evm:/opt/edge_ai_apps#

    This is the log of error

  • And I need to restart a number of times to load, the following error is reported every time

    U-Boot SPL 2021.01-g53e79d0e89 (Sep 02 2021 - 18:20:00 +0000)
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev E8
    SYSFW ABI: 3.1 (firmware rev 0x0015 '21.5.0--v2021.05 (Terrific Llam')
    Trying to boot from MMC2
    spl_load_image_fat: error reading image tispl.bin, err - -6
    spl_load_image_ext: ext4fs mount err - 0
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###
    

  • Hi Ethan,

    For the error that occurs when running ./setup_script.sh, it looks like the required dependencies are not being downloaded properly.

    Could you check three things:

    1. Is the /opt/tensorflow directory empty?
    2. Are you able to run git clone https://github.com/TexasInstruments/tensorflow.git inside docker?
    3. Are you behind TI company proxy? If so, could you do a ping test to ti.com: ping ti.com ?

    A workaround would be to run the ./setup_script.sh while the board is not behind a VPN. 


    As for the problem with having to restart the board a number of time before loading, I have not encountered this problem before. I will see if I can reproduce the issue on my side and get back to you next week.

    Regards,

    Takuma

  • Additional to my questions above, is this on the SK-TDA4VM or the J721EXSOMXEVM?

    Regards, Takuma

  • Hi Takuma 

    This is on the J721EXSOMXEVM

    For the question 1,  the /opt/tensorflow directory is empty

    And for question2 and 3,I will get back to you next week.

  • Hi Takuma

    I try to run git clone https://github.com/TexasInstruments/tensorflow.git 

    This did solve my problem,but a new one came up

    Scanning dependencies of target ti_dl_inferer
    Scanning dependencies of target edgeai_utils
    [  3%] Building CXX object utils/CMakeFiles/edgeai_utils.dir/src/edgeai_perfstats.cpp.o
    [  7%] Building CXX object dl_inferer/CMakeFiles/ti_dl_inferer.dir/src/ti_dl_inferer.cpp.o
    In file included from /opt/tensorflow/tensorflow/lite/core/api/op_resolver.h:20,
                     from /opt/tensorflow/tensorflow/lite/model_builder.h:27,
                     from /opt/tensorflow/tensorflow/lite/model.h:22,
                     from /opt/edge_ai_apps/apps_cpp/dl_inferer/../dl_inferer/include/ti_tflite_inferer.h:36,
                     from /opt/edge_ai_apps/apps_cpp/dl_inferer/src/ti_dl_inferer.cpp:37:
    /opt/tensorflow/tensorflow/lite/schema/schema_generated.h:20:10: fatal error: flatbuffers/flatbuffers.h: No such file or directory
       20 | #include "flatbuffers/flatbuffers.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[2]: *** [dl_inferer/CMakeFiles/ti_dl_inferer.dir/build.make:63: dl_inferer/CMakeFiles/ti_dl_inferer.dir/src/ti_dl_inferer.cpp.o1
    make[1]: *** [CMakeFiles/Makefile2:199: dl_inferer/CMakeFiles/ti_dl_inferer.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 10%] Building CXX object utils/CMakeFiles/edgeai_utils.dir/src/ti_logger.cpp.o
    [ 14%] Linking CXX static library ../../lib/Release/libedgeai_utils.a
    [ 14%] Built target edgeai_utils
    make: *** [Makefile:130: all] Error 2
    Setup Done!
    

  • Hi Takuma

    I have saw the setup_script.sh and install_tensorflow.sh,I found that I can't archive this page,and I go to search flatbuffers in git, https://github.com/google/flatbuffers

    I found that in version2.0,there's no folder name archive

    wget https://github.com/google/flatbuffers/archive/${FLATBUFFERS_VERSION}.tar.gz

    And then I do git clone https://github.com/google/flatbuffers, and put flatbuffers folder into /opt

    This error resolved.

    But still a new one came up,

    Scanning dependencies of target ti_dl_inferer
    Scanning dependencies of target edgeai_utils
    [  3%] Building CXX object utils/CMakeFiles/edgeai_utils.dir/src/edgeai_perfstats.cpp.o
    [  7%] Building CXX object dl_inferer/CMakeFiles/ti_dl_inferer.dir/src/ti_dl_inferer.cpp.o
    In file included from /opt/tensorflow/tensorflow/lite/core/subgraph.h:27,
                     from /opt/tensorflow/tensorflow/lite/interpreter.h:30,
                     from /opt/tensorflow/tensorflow/lite/interpreter_builder.h:27,
                     from /opt/tensorflow/tensorflow/lite/model.h:27,
                     from /opt/edge_ai_apps/apps_cpp/dl_inferer/../dl_inferer/include/ti_tflite_inferer.h:36,
                     from /opt/edge_ai_apps/apps_cpp/dl_inferer/src/ti_dl_inferer.cpp:37:
    /opt/tensorflow/tensorflow/lite/delegates/nnapi/nnapi_delegate.h:23:10: fatal error: absl/types/optional.h: No such file or directory
       23 | #include "absl/types/optional.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[2]: *** [dl_inferer/CMakeFiles/ti_dl_inferer.dir/build.make:63: dl_inferer/CMakeFiles/ti_dl_inferer.dir/src/ti_dl_inferer.cpp.o1
    make[1]: *** [CMakeFiles/Makefile2:199: dl_inferer/CMakeFiles/ti_dl_inferer.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 10%] Building CXX object utils/CMakeFiles/edgeai_utils.dir/src/ti_logger.cpp.o
    [ 14%] Linking CXX static library ../../lib/Release/libedgeai_utils.a
    [ 14%] Built target edgeai_utils
    make: *** [Makefile:130: all] Error 2
    Setup Done!
    

    I think this is because the version of tools, could you pls reinstall this image and do the ./setup_script.sh, I found that in install_tensorflow.sh, the version of flatbuffers is 1.12, but now the source in git have changed into 2.0

  • Hi Ethan,

    Could you try the following:

    1. Start docker with ./docker_run.sh
    2. Remove the tensorflow directory with the command rm -r /opt/tensorflow/
    3. Run ./setup_script.sh while inside docker

    I have tried a fresh install of Linux SDK for edge AI development, and was able to reproduce the initial error of "fatal error: tensorflow/lite/model.h: No such file or directory".

    The issue seems to be that only for the tensorflow dependency, a directory is created regardless of whether the installation was successful. This causes the setup_script to not install the tensorflow dependency because the script only installs missing dependencies, and it checks if the dependency is missing by the existence of the dependency's installation directory.

    Regards, 

    Takuma

  • Hi Ethan,

    And I need to restart a number of times to load, the following error is reported every time

    If you are still facing this issue, could you provide the following information:

    • Power supply info (voltage/amperage)
    • micro SD card info (speed class and application perfomance class)

    Regards,

    Takuma

  • Sorry Takuma, I've done some other EVM experiments recently, I will respond to you later when the test is complete

  • Hi Takuma

    • Start docker with ./docker_run.sh
    • Remove the tensorflow directory with the command rm -r /opt/tensorflow/
    • Run ./setup_script.sh while inside docker

    This still not solve my issue, I tried to run ./setup_script.sh twice, it still reporting this error

  • Hi Ethan,

    Could you try the following:

    1. Install to micro SD card a fresh installation of the SK SDK
    2. Create and run docker container
    3. Run setup_script
    4. Post any error messages that print out from the script

    I would like to make sure the things we tried in the past is not the cause of the error, and we both have the same software setup.

    Regards,

    Takuma

  • Hi Takuma

    It looks like another problem has arisen

    Message: Hotdoc not found, not building the documentation
    Build targets in project: 17
    
    GstTIOVX 0.4.0
    
      User defined options
        pkg_config_path: pkgconfig
        prefix         : /usr
    
    Found ninja-1.10.0 at /usr/bin/ninja
    ninja: Entering directory `build'
    [1/59] Compiling C object gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxallocator.c.o
    FAILED: gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxallocator.c.o 
    cc -Igst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p -Igst-libs/gst/tiovx -I../gst-libs/gst/tiovx -I. -I.. -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -c
    cc1: error: /usr/include/processor_sdk/imaging/algos/ae/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/algos/awb/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/ti_2a_wrapper/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: all warnings being treated as errors
    [2/59] Compiling C object gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxbufferpoolutils.c.o
    FAILED: gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxbufferpoolutils.c.o 
    cc -Igst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p -Igst-libs/gst/tiovx -I../gst-libs/gst/tiovx -I. -I.. -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -c
    cc1: error: /usr/include/processor_sdk/imaging/algos/ae/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/algos/awb/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/ti_2a_wrapper/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: all warnings being treated as errors
    [3/59] Compiling C object gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxbufferpool.c.o
    FAILED: gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxbufferpool.c.o 
    cc -Igst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p -Igst-libs/gst/tiovx -I../gst-libs/gst/tiovx -I. -I.. -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -c
    cc1: error: /usr/include/processor_sdk/imaging/algos/ae/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/algos/awb/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/ti_2a_wrapper/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: all warnings being treated as errors
    ninja: build stopped: subcommand failed.
    ninja: Entering directory `build'
    [1/60] Compiling C object gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxallocator.c.o
    FAILED: gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxallocator.c.o 
    cc -Igst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p -Igst-libs/gst/tiovx -I../gst-libs/gst/tiovx -I. -I.. -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -c
    cc1: error: /usr/include/processor_sdk/imaging/algos/ae/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/algos/awb/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/ti_2a_wrapper/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: all warnings being treated as errors
    [2/60] Compiling C object gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxbufferpoolutils.c.o
    FAILED: gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxbufferpoolutils.c.o 
    cc -Igst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p -Igst-libs/gst/tiovx -I../gst-libs/gst/tiovx -I. -I.. -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -c
    cc1: error: /usr/include/processor_sdk/imaging/algos/ae/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/algos/awb/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/ti_2a_wrapper/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: all warnings being treated as errors
    [3/60] Compiling C object gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxbufferpool.c.o
    FAILED: gst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p/gsttiovxbufferpool.c.o 
    cc -Igst-libs/gst/tiovx/libgsttiovx-1.0.so.1.0.p -Igst-libs/gst/tiovx -I../gst-libs/gst/tiovx -I. -I.. -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -c
    cc1: error: /usr/include/processor_sdk/imaging/algos/ae/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/algos/awb/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: error: /usr/include/processor_sdk/imaging/ti_2a_wrapper/include/: No such file or directory [-Werror=missing-include-dirs]
    cc1: all warnings being treated as errors
    ninja: build stopped: subcommand failed.

    The entire error_log I have placed in the attachmenterror_log

  • Hi Ethan,

    This is a new error introduced in the git repository installed through the setup_script.

    Could you try the workaround in this E2E: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1050063/sk-tda4vm-problem-with-first-install-of-sk-tda4vm

    Regards,

    Takuma