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-AM62: error for yocto building

Part Number: SK-AM62

Hello Ti,

I build the "tisdk-default-image" and follow the instruction from https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_04_01_03/exports/docs/linux/Overview_Building_the_SDK.html#processor-sdk-build-reference 

It appears the error about the onnxruntime.

The error message is as follow:

ERROR: onnxruntime-1.7.0-r0.tisdk0 do_install: Execution of '/home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/temp/run.do_install.14552' failed with exit code 1
ERROR: Logfile of failure stored in: /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/temp/log.do_install.14552
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['virtual:native:/home/a/tisdk/sources/oe-core/meta/recipes-devtools/ninja/ninja_1.10.0.bb:do_populate_sysroot', '/home/a/tisdk/sources/oe-core/meta/recipes-devtools/python/python3_3.8.13.bb:do_populate_sysroot', 'virtual:native:/home/a/tisdk/sources/oe-core/meta/recipes-extended/unzip/unzip_6.0.bb:do_populate_sysroot', 'virtual:native:/home/a/tisdk/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-pybind11_2.4.3.bb:do_populate_sysroot', 'virtual:native:/home/a/tisdk/sources/meta-openembedded/meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb:do_populate_sysroot', 'virtual:native:/home/a/tisdk/sources/meta-openembedded/meta-python/recipes-devtools/python/python3-wheel_0.33.6.bb:do_populate_sysroot', 'virtual:native:/home/a/tisdk/sources/oe-core/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/a/tisdk/sources/oe-core/meta/recipes-devtools/python/python3_3.8.13.bb:do_populate_sysroot', 'virtual:native:/home/a/tisdk/sources/oe-core/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/home/a/tisdk/sources/oe-core/meta/recipes-extended/xz/xz_5.2.4.bb:do_populate_sysroot', '/home/a/tisdk/sources/oe-core/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/home/a/tisdk/sources/oe-core/meta/recipes-core/zlib/zlib_1.2.11.bb:do_populate_sysroot', 'virtual:native:/home/a/tisdk/sources/oe-core/meta/recipes-devtools/python-numpy/python3-numpy_1.17.4.bb:do_populate_sysroot', 'virtual:native:/home/a/tisdk/sources/oe-core/meta/recipes-devtools/python/python3-setuptools_45.2.0.bb:do_populate_sysroot', '/home/a/tisdk/sources/oe-core/meta/recipes-devtools/cmake/cmake-native_3.16.5.bb:do_populate_sysroot', '/home/a/tisdk/sources/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['ninja-native', 'python3', 'unzip-native', 'python3-pybind11-native', 'protobuf-native', 'python3-wheel-native', 'pseudo-native', 'python3-native', 'patch-native', 'xz-native', 'quilt-native', 'zlib', 'python3-numpy-native', 'python3-setuptools-native', 'cmake-native', 'external-arm-toolchain', 're2c-native', 'sqlite3', 'util-linux', 'bzip2', 'xz', 'readline', 'openssl', 'libtirpc', 'autoconf-archive', 'libnsl2', 'gdbm', 'libffi', 'opkg-utils', 'zlib-native', 'autoconf-native', 'gnu-config-native', 'pkgconfig-native', 'automake-native', 'libtool-native', 'openssl-native', 'bzip2-native', 'readline-native', 'util-linux-native', 'libffi-native', 'gdbm-native', 'libnsl2-native', 'libtirpc-native', 'sqlite3-native', 'attr-native', 'gettext-minimal-native', 'curl-native', 'expat-native', 'ncurses-native', 'bash-completion', 'libcap-ng', 'libpam', 'ncurses', 'cryptodev-linux', 'texinfo-dummy-native', 'm4-native', 'libcap-ng-native', 'libpcre2-native', 'flex', 'cracklib']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| NOTE: DESTDIR=/home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/image VERBOSE=1 cmake --build /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/build --target install --
| [0/2] /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/recipe-sysroot-native/usr/bin/cmake -P /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/build/CMakeFiles/VerifyGlobs.cmake
| [1/6] cd /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/build/pybind11/src/pybind11 && /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/recipe-sysroot-native/usr/bin/cmake -P /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/build/pybind11/tmp/pybind11-gitupdate.cmake
| FAILED: pybind11/src/pybind11-stamp/pybind11-update
| cd /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/build/pybind11/src/pybind11 && /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/recipe-sysroot-native/usr/bin/cmake -P /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/build/pybind11/tmp/pybind11-gitupdate.cmake
| fatal: detected dubious ownership in repository at '/home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/build/pybind11/src/pybind11'
| To add an exception for this directory, call:
| 
| 	git config --global --add safe.directory /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/build/pybind11/src/pybind11
| CMake Error at /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/build/pybind11/tmp/pybind11-gitupdate.cmake:10 (message):
|   Failed to get the hash for HEAD
| 
| 
| ninja: build stopped: subcommand failed.
| WARNING: /home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/temp/run.do_install.14552:1 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}'
| ERROR: Execution of '/home/a/tisdk/build/arago-tmp-external-arm-glibc/work/aarch64-linux/onnxruntime/1.7.0-r0.tisdk0/temp/run.do_install.14552' failed with exit code 1
ERROR: Task (/home/a/tisdk/sources/meta-processor-sdk/recipes-core/onnxruntime/onnxruntime.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 9005 tasks of which 602 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 10 seconds
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 3 seconds

Summary: 1 task failed:
  /home/a/tisdk/sources/meta-processor-sdk/recipes-core/onnxruntime/onnxruntime.bb:do_install
Summary: There were 33 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

After the building, there is no tisdk-default-image in the directory.

Is there any setting that I miss?

BR

  • Hi James,

    the error message you show actually has a solution/workaround in it, which is declaring the related Git tree as a 'safe directory'. This all is caused by a recent change in Git behavior, you can Google to find out more. I believe if you build using Ubuntu 18.04 as we currently require for v8.x SDKs you would not see the issue (as it uses an older version of Git), so I suspect you are perhaps building under Ubuntu 20.04 or 22.04? Anyways for your system where you seem be building from /home/a/tisdk/* to have a more universal fix than what the message suggests you could also add the below for your Yocto builds...

    git config --global --add safe.directory /home/a/tisdk/

    ...or even...

    git config --global --add safe.directory '*'

    ...for a more system-wide workaround.

    Regards, Andreas

  • Hi Andreas,

    Definitely, the host machine I use is Ubuntu 20.04.

    So under my system, should I use "git config --global --add safe.directory /home/a/tisdk/" before I build project?

    After I use git config in the terminal, I build the yocto project by make ...

    It still have the same error.

    Is there any wrong operation that I do?

    BR, James

  • Can you try the second suggestion with the '*'?

    If this doesn't help, can you try cleaning out your build folder and start a completely fresh build?

    Regards, Andreas

  • Hi Andreas,

    According to the error message, I try the corrosponding directory "git config --global --add safe.directory "corrosponding directory".

    Finally, there is no error appears, but there are many warning message.

    How to eliminate the warrning message and why it appears?

    BR, James