# Mender-artifact - Error in the package installation task while building the OS in yocto

**URL:** <https://hub.mender.io/t/mender-artifact-error-in-the-package-installation-task-while-building-the-os-in-yocto/1399>\
**Category:** General Discussions\
**Tags:** yocto, raspberry-pi-3, thud, mender-artifact\
**Created:** [January 3, 2020, 11:22am UTC](https://hub.mender.io/t/mender-artifact-error-in-the-package-installation-task-while-building-the-os-in-yocto/1399 "2020-01-03T11:22:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bndrz](https://avatars.discourse-cdn.com/v4/letter/b/f0a364/32.png) [@bndrz](https://hub.mender.io/u/bndrz)\
**Post date:** [January 3, 2020, 11:22am UTC](https://hub.mender.io/t/mender-artifact-error-in-the-package-installation-task-while-building-the-os-in-yocto/1399/1 "2020-01-03T11:22:47Z")

</div>

Hello,

I encoutered following problem:

`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?

Yocto branch : thud  
meta-mender commit SHA: df5ddd6  
Target: Raspberry Pi 3 B+

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [January 3, 2020, 1:43pm UTC](https://hub.mender.io/t/mender-artifact-error-in-the-package-installation-task-while-building-the-os-in-yocto/1399/2 "2020-01-03T13:43:36Z")

</div>

Can you post the complete log that led to the problem, including the  
command you used?

---

<div class="post-metadata">

**Author:** ![bndrz](https://avatars.discourse-cdn.com/v4/letter/b/f0a364/32.png) [@bndrz](https://hub.mender.io/u/bndrz)\
**Post date:** [January 3, 2020, 2:07pm UTC](https://hub.mender.io/t/mender-artifact-error-in-the-package-installation-task-while-building-the-os-in-yocto/1399/3 "2020-01-03T14:07:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [January 6, 2020, 9:00am UTC](https://hub.mender.io/t/mender-artifact-error-in-the-package-installation-task-while-building-the-os-in-yocto/1399/4 "2020-01-06T09:00:26Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![bndrz](https://avatars.discourse-cdn.com/v4/letter/b/f0a364/32.png) [@bndrz](https://hub.mender.io/u/bndrz)\
**Post date:** [January 7, 2020, 8:27am UTC](https://hub.mender.io/t/mender-artifact-error-in-the-package-installation-task-while-building-the-os-in-yocto/1399/5 "2020-01-07T08:27:30Z")

</div>

Thanks for the answer.

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:

[https://groups.google.com/a/lists.mender.io/forum/m/#!topic/mender/fmC-WqT485Q](https://groups.google.com/a/lists.mender.io/forum/m/#!topic/mender/fmC-WqT485Q)

Has it been considered or checked further?

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [January 7, 2020, 8:43am UTC](https://hub.mender.io/t/mender-artifact-error-in-the-package-installation-task-while-building-the-os-in-yocto/1399/6 "2020-01-07T08:43:13Z")

</div>

I don’t think we ever got a PR for it, so that would be my next suggestion!
