install: cannot stat '.../build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mender-artifact/3.0.0-r0/build/bin/mender-artifact': No such file or directory
It looks like the mender-artifact binary file is searched in the bin directory - not in the linux_arm sub-directory related to the architecture of the target machine.
How to fix it without changing the original recipe file?
The error (that I posted below) occurs while building the system (which contains mender meta-layer) with the bitbake os-image-recipe command.
ERROR: mender-artifact-3.0.0-r0 do_install: Function failed: do_install (log file is located at (...)/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mender-artifact/3.0.0-r0/temp/log.do_install.19632)
ERROR: Logfile of failure stored in: (...)/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mender-artifact/3.0.0-r0/temp/log.do_install.19632
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['(...)/layers/openembedded/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_8.2.bb:do_populate_sysroot', '(...)/layers/openembedded/openembedded-core/meta/recipes-devtools/go/go-cross_1.11.bb:do_populate_sysroot', '(...)/layers/openembedded/openembedded-core/meta/recipes-devtools/gcc/gcc-runtime_8.2.bb:do_populate_sysroot', 'virtual:native: (...)/layers/openembedded/openembedded-core/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', '(...)/layers/openembedded/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', '(...)/layers/openembedded/openembedded-core/meta/recipes-extended/xz/xz_5.2.4.bb:do_populate_sysroot', (...)/layers/openembedded/openembedded-core/meta/recipes-core/glibc/glibc_2.28.bb:do_populate_sysroot', '(...)/layers/openembedded/openembedded-core/meta/recipes-devtools/go/go-runtime_1.11.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: ['pseudo-native']
| NOTE: Skipping as already exists in sysroot: ['gcc-cross-arm', 'go-cross-cortexa7t2hf-neon-vfpv4', 'gcc-runtime', 'quilt-native', 'xz', 'glibc', 'go-runtime', 'libtool-native', 'libmpc-native', 'texinfo-dummy-native', 'gmp-native', 'zlib-native', 'autoconf-native', 'binutils-cross-arm', 'gnu-config-native', 'flex-native', 'automake-native', 'linux-libc-headers', 'mpfr-native', 'xz-native', 'go-native', 'libgcc', 'opkg-utils', 'm4-native', 'gettext-minimal-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| install: cannot stat '(...)/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mender-artifact/3.0.0-r0/build/bin/mender-artifact': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_install (log file is located at (...)/build/tmp/raspberrypi/raspberrypi3-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mender-artifact/3.0.0-r0/temp/log.do_install.19632)
ERROR: Task ((...)/layers/mender/meta-mender/meta-mender-core/recipes-mender/mender-artifact/mender-artifact_3.0.0.bb:do_install) failed with exit code '1'
If I move the mender-artifact binary file manually (from linux_arm sub-directory to bin directory), the building process is performing correctly, but I would like to solve this problem automatically.
Are you trying to build mender-artifact on ARM? mender-artifact is a build tool, meant to be used on the build host. I don’t think building it on ARM is supported, at least it has never been tested under Yocto. The only dependency on mender-artifact should be mender-artifact-native.
Yes, I was trying to build mender-artifact for the target side, beacuse I need to read some data in artifacts for a validation purposes. So far I haven’t encountered any problems with this on the target side.
In the meantime I found similar issue thread, which proposed a solution: