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.

PROCESSOR-SDK-AM62A: Having trouble compiling TIDL tools on x86 Ubuntu 18.04 Machine

Part Number: PROCESSOR-SDK-AM62A

Hello,

I am having some difficulty with the compilation step in the TIDL documentation.  I am running Ubuntu 18.04 with Python 3.6 as the default installation, and I am following the procedures exactly as written.  I have attempted this both with and without docker, and I am still getting an error that falsely says /bin/sh is empty when trying to build.  I really need to get this resolved so that I can compile custom pose estimation models for the AM62A that aren't available in the model zoo. The only model in the model selection tool is "ONR-KD-7060-human-pose-yolox-s-640x640" which is far too resource intensive for my application.  Here is the build output:

cmake ../examples && make -j && cd ..

-- Detected processor: x86_64
-- TARGET_DEVICE setting to: am62a
-- TARGET_CPU not specicfied using x86
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = edgeai_tidl_examples
-- setting TENSORFLOW_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/tflite_2.8_x86_u18/
-- setting DLR_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/dlr_1.10.0_x86_u18/
-- setting OPENCV_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/opencv_4.2.0_x86_u18/
-- Compiling for x86 with am62a config
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = edgeai_tidl_examples
-- setting TENSORFLOW_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/tflite_2.8_x86_u18/
-- setting DLR_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/dlr_1.10.0_x86_u18/
-- setting OPENCV_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/opencv_4.2.0_x86_u18/
-- Compiling for x86 with am62a config
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = edgeai_tidl_examples
-- setting TENSORFLOW_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/tflite_2.8_x86_u18/
-- setting DLR_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/dlr_1.10.0_x86_u18/
-- setting OPENCV_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/opencv_4.2.0_x86_u18/
-- Compiling for x86 with am62a config
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = tfl_main
-- setting TENSORFLOW_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/tflite_2.8_x86_u18/
-- setting DLR_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/dlr_1.10.0_x86_u18/
-- setting OPENCV_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/opencv_4.2.0_x86_u18/
-- Compiling for x86 with am62a config
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = tfl_priority_scheduling
-- setting TENSORFLOW_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/tflite_2.8_x86_u18/
-- setting DLR_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/dlr_1.10.0_x86_u18/
-- setting OPENCV_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/opencv_4.2.0_x86_u18/
-- Compiling for x86 with am62a config
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = ort_priority_scheduling
-- setting TENSORFLOW_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/tflite_2.8_x86_u18/
-- setting DLR_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/dlr_1.10.0_x86_u18/
-- setting OPENCV_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/opencv_4.2.0_x86_u18/
-- Compiling for x86 with am62a config
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = edgeai_tidl_examples
-- setting TENSORFLOW_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/tflite_2.8_x86_u18/
-- setting DLR_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/dlr_1.10.0_x86_u18/
-- setting OPENCV_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/opencv_4.2.0_x86_u18/
-- Compiling for x86 with am62a config
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = tidlrt_clasification
-- setting TENSORFLOW_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/tflite_2.8_x86_u18/
-- setting DLR_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/dlr_1.10.0_x86_u18/
-- setting OPENCV_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/opencv_4.2.0_x86_u18/
-- Compiling for x86 with am62a config
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = dlr_main
-- setting TENSORFLOW_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/tflite_2.8_x86_u18/
-- setting DLR_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/dlr_1.10.0_x86_u18/
-- setting OPENCV_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/opencv_4.2.0_x86_u18/
-- Compiling for x86 with am62a config
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = ort_main
-- setting TENSORFLOW_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/tflite_2.8_x86_u18/
-- setting DLR_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/dlr_1.10.0_x86_u18/
-- setting OPENCV_INSTALL_DIR path:/home/narayan/edgeai-tidl-tools/tidl_tools/osrt_deps/opencv_4.2.0_x86_u18/
-- Compiling for x86 with am62a config
-- Configuring done
-- Generating done
-- Build files have been written to: /home/narayan/edgeai-tidl-tools/build
[ 3%] Building CXX object osrt_cpp/utils/CMakeFiles/utils.dir/src/utility_functs.cpp.o
[ 29%] Building CXX object osrt_cpp/pre_process/CMakeFiles/pre_process.dir/pre_process.cpp.o
[ 7%] Building CXX object osrt_cpp/post_process/CMakeFiles/post_process.dir/post_process.cpp.o
[ 18%] Building CXX object osrt_cpp/utils/CMakeFiles/utils.dir/src/model_info.cpp.o
[ 11%] Building CXX object osrt_cpp/advanced_examples/utils/CMakeFiles/utils_adv.dir/src/arg_parsing.cpp.o
[ 37%] Building CXX object osrt_cpp/utils/CMakeFiles/utils.dir/src/pbPlots.cpp.o
g++: error: /bin/sh:: No such file or directory
[ 14%] Building CXX object osrt_cpp/advanced_examples/utils/CMakeFiles/utils_adv.dir/src/print_utils.cpp.o
[ 22%] Building CXX object osrt_cpp/utils/CMakeFiles/utils.dir/src/edgeai_classnames.cpp.o
[ 25%] Building CXX object osrt_cpp/utils/CMakeFiles/utils.dir/src/ti_logger.cpp.o
[ 33%] Building CXX object osrt_cpp/utils/CMakeFiles/utils.dir/src/supportLib.cpp.o
g++: error: /bin/sh:: No such file or directory
g++: error: 1:: No such file or directory
g++: error: pkg-config:: No such file or directory
g++: error: not: No such file or directory
g++: error: found: No such file or directory
osrt_cpp/utils/CMakeFiles/utils.dir/build.make:62: recipe for target 'osrt_cpp/utils/CMakeFiles/utils.dir/src/utility_functs.cpp.o' failed
make[2]: *** [osrt_cpp/utils/CMakeFiles/utils.dir/src/utility_functs.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
g++: error: 1:: No such file or directory
g++: error: pkg-config:: No such file or directory
g++: error: not: No such file or directory
g++: error: found: No such file or directory
osrt_cpp/post_process/CMakeFiles/post_process.dir/build.make:62: recipe for target 'osrt_cpp/post_process/CMakeFiles/post_process.dir/post_process.cpp.o' failed
make[2]: *** [osrt_cpp/post_process/CMakeFiles/post_process.dir/post_process.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'osrt_cpp/post_process/CMakeFiles/post_process.dir/all' failed
make[1]: *** [osrt_cpp/post_process/CMakeFiles/post_process.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 40%] Building CXX object osrt_cpp/utils/CMakeFiles/utils.dir/src/arg_parsing.cpp.o
g++: error: /bin/sh:: No such file or directory
g++: error: 1:: No such file or directory
g++: error: /bin/sh:: No such file or directory
g++: error: 1:: No such file or directory
g++: error: pkg-config:: No such file or directory
g++: error: pkg-config:: No such file or directory
g++: error: not: No such file or directory
g++: error: found: No such file or directory
osrt_cpp/pre_process/CMakeFiles/pre_process.dir/build.make:62: recipe for target 'osrt_cpp/pre_process/CMakeFiles/pre_process.dir/pre_process.cpp.o' failed
make[2]: *** [osrt_cpp/pre_process/CMakeFiles/pre_process.dir/pre_process.cpp.o] Error 1
CMakeFiles/Makefile2:140: recipe for target 'osrt_cpp/pre_process/CMakeFiles/pre_process.dir/all' failed
make[1]: *** [osrt_cpp/pre_process/CMakeFiles/pre_process.dir/all] Error 2
g++: error: /bin/sh:: No such file or directory
g++: error: not: No such file or directory
g++: error: found: No such file or directory
osrt_cpp/utils/CMakeFiles/utils.dir/build.make:86: recipe for target 'osrt_cpp/utils/CMakeFiles/utils.dir/src/model_info.cpp.o' failed
make[2]: *** [osrt_cpp/utils/CMakeFiles/utils.dir/src/model_info.cpp.o] Error 1
g++: error: 1:: No such file or directory
g++: error: pkg-config:: No such file or directory
g++: error: not: No such file or directory
g++: error: found: No such file or directory
osrt_cpp/advanced_examples/utils/CMakeFiles/utils_adv.dir/build.make:62: recipe for target 'osrt_cpp/advanced_examples/utils/CMakeFiles/utils_adv.dir/src/arg_parsing.cpp.o' failed
make[2]: *** [osrt_cpp/advanced_examples/utils/CMakeFiles/utils_adv.dir/src/arg_parsing.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
g++: error: /bin/sh:: No such file or directory
g++: error: 1:: No such file or directory
g++: error: pkg-config:: No such file or directory
g++: error: not: No such file or directory
g++: error: found: No such file or directory
g++: error: /bin/sh:: No such file or directory
g++: error: /bin/sh:: No such file or directory
g++: error: /bin/sh:: No such file or directory
g++: error: 1:: No such file or directory
g++: error: pkg-config:: No such file or directory
g++: error: not: No such file or directory
g++: error: found: No such file or directory
osrt_cpp/utils/CMakeFiles/utils.dir/build.make:182: recipe for target 'osrt_cpp/utils/CMakeFiles/utils.dir/src/pbPlots.cpp.o' failed
make[2]: *** [osrt_cpp/utils/CMakeFiles/utils.dir/src/pbPlots.cpp.o] Error 1
osrt_cpp/utils/CMakeFiles/utils.dir/build.make:206: recipe for target 'osrt_cpp/utils/CMakeFiles/utils.dir/src/supportLib.cpp.o' failed
make[2]: *** [osrt_cpp/utils/CMakeFiles/utils.dir/src/supportLib.cpp.o] Error 1
g++: error: /bin/sh:: No such file or directory
g++: error: /bin/sh:: No such file or directory
g++: error: 1:: No such file or directory
g++: error: pkg-config:: No such file or directory
g++: error: not: No such file or directory
g++: error: found: No such file or directory
g++: error: 1:: No such file or directory
g++: error: 1:: No such file or directory
g++: error: 1:: No such file or directory
osrt_cpp/advanced_examples/utils/CMakeFiles/utils_adv.dir/build.make:86: recipe for target 'osrt_cpp/advanced_examples/utils/CMakeFiles/utils_adv.dir/src/print_utils.cpp.o' failed
make[2]: *** [osrt_cpp/advanced_examples/utils/CMakeFiles/utils_adv.dir/src/print_utils.cpp.o] Error 1
CMakeFiles/Makefile2:424: recipe for target 'osrt_cpp/advanced_examples/utils/CMakeFiles/utils_adv.dir/all' failed
make[1]: *** [osrt_cpp/advanced_examples/utils/CMakeFiles/utils_adv.dir/all] Error 2
g++: error: pkg-config:: No such file or directory
g++: error: pkg-config:: No such file or directory
g++: error: not: No such file or directory
g++: error: pkg-config:: No such file or directory
g++: error: not: No such file or directory
g++: error: not: No such file or directory
g++: error: found: No such file or directory
g++: error: found: No such file or directory
osrt_cpp/utils/CMakeFiles/utils.dir/build.make:110: recipe for target 'osrt_cpp/utils/CMakeFiles/utils.dir/src/edgeai_classnames.cpp.o' failed
make[2]: *** [osrt_cpp/utils/CMakeFiles/utils.dir/src/edgeai_classnames.cpp.o] Error 1
g++: error: found: No such file or directory
osrt_cpp/utils/CMakeFiles/utils.dir/build.make:134: recipe for target 'osrt_cpp/utils/CMakeFiles/utils.dir/src/ti_logger.cpp.o' failed
make[2]: *** [osrt_cpp/utils/CMakeFiles/utils.dir/src/ti_logger.cpp.o] Error 1
osrt_cpp/utils/CMakeFiles/utils.dir/build.make:158: recipe for target 'osrt_cpp/utils/CMakeFiles/utils.dir/src/arg_parsing.cpp.o' failed
make[2]: *** [osrt_cpp/utils/CMakeFiles/utils.dir/src/arg_parsing.cpp.o] Error 1
CMakeFiles/Makefile2:195: recipe for target 'osrt_cpp/utils/CMakeFiles/utils.dir/all' failed
make[1]: *** [osrt_cpp/utils/CMakeFiles/utils.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

  • Hi Narayan,

    Several questions to see if we can fix this failing build. However, you should be able to compile without doing this full setup, provided the edgeai-tidl-tools/tidl_tools directory looks like the following:

     where the .so files are compiled for x86_64. These should be downloaded during the first portion of setup.

    1.  /bin/sh is present, correct?

    2. What is the latest commit tag on the repository? It should be for the 8.6.0.3 release, but I want to be certain.

    3. Is it the same error on docker container and on your ubuntu installation?

    4. Can you run the 'make' command with VERBOSE=1? I want to be sure that the compiler commands look correct. You can also do a dry-run with -n

    However, unless you're looking to use C++ examples, you should be able to proceed with model compilation without doing the full compilation. We generally use python scripts for compilation. Please see the files under edgeai-tidl-tools/examples/osrt_python for samples. The following doc describes the process: https://github.com/TexasInstruments/edgeai-tidl-tools/blob/master/docs/custom_model_evaluation.md#new-model-evaluation

    To verify this is possible without compiling everything, you can run one of the python3 scripts within a subdirectory of osrt_pythonwith the -z tag to compile several models from the model-zoo. e.g.

     python3 osrt_python/ort/onnrt_ep.py -z

    Best,
    Reese

  • Hi Reese,

    Thanks for the reply.  I will try out the scripts in osrt_python as soon as I can.

    Regarding the build, yes, the error was the same in docker as well as in the ubuntu installation.   I actually figured out the problem, though.  It was related to the CMakeLists.txt file in ~edgeai-tidl-tools/examples.  Essentially, running the exec_program command resulted in a false output stating that /bin/sh was empty and that pkg-config couldn't be found.  Since exec_program is quite old, I figured I'd comment it out and invoke execute_process instead as per the lines below:

    #exec_program(pkg-config ARGS --cflags glib-2.0 OUTPUT_VARIABLE GLIB_FLAGS)
    execute_process(COMMAND pkg-config --cflags glib-2.0 OUTPUT_VARIABLE GLIB_FLAGS)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GLIB_FLAGS}")

    When I did this, the build succeeded.  Y'all may want to add that to the documentation if possible as a potential fix for build failures.  

    Best,

    Narayan

  • When I did this, the build succeeded.  Y'all may want to add that to the documentation if possible as a potential fix for build failures. 

    Thanks for closing the loop. We'll discuss internally on how/what improvements can be made in our SDK offering.

    Regards, Andreas