# error on building my own generic balena image

**URL:** <https://forums.balena.io/t/error-on-building-my-own-generic-balena-image/357723>\
**Category:** balenaOS\
**Tags:** yocto\
**Created:** [May 13, 2022, 12:30pm UTC](https://forums.balena.io/t/error-on-building-my-own-generic-balena-image/357723 "2022-05-13T12:30:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SqaureRoot](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@SqaureRoot](https://forums.balena.io/u/SqaureRoot)\
**Post date:** [May 13, 2022, 12:30pm UTC](https://forums.balena.io/t/error-on-building-my-own-generic-balena-image/357723/1 "2022-05-13T12:30:05Z")

</div>

Hello,

i am very new to the balena-os build an i am trying to build my own custom generic balena x86\_64 image with the help of this page:

> **[Building Your Own Image | balenaOS](https://os-docs.balena.io/custom-build/)**
>
> To build your own custom balenaOS image, refer to the README for respective device type repository hosted in the balenaOS GitHub org for more information.

my steps are:

```auto
git clone https://github.com/balena-os/balena-generic
cd balena-generic/
git submodule update --init --recursive

```

and then running

```auto
./balena-yocto-scripts/build/barys -m genericx86-64-ext

```

after some time i get the following error:

> ERROR: libpcre-8.44-r0 do\_package\_qa: QA Issue: libpcre: The install log indicates that host include and/or library paths were used.  
> Please check the log ‘/workspaces/yocto/2/balena-generic/build/tmp/work/core2-64-poky-linux/libpcre/8.44-r0/temp/log.do\_install’ for more information. [install-host-path]  
> ERROR: libpcre-8.44-r0 do\_package\_qa: QA run found fatal errors. Please consider fixing them.  
> ERROR: Logfile of failure stored in: /workspaces/yocto/2/balena-generic/build/tmp/work/core2-64-poky-linux/libpcre/8.44-r0/temp/log.do\_package\_qa.3485810  
> ERROR: Task (/workspaces/yocto/2/balena-generic/build/…/layers/poky/meta/recipes-support/libpcre/libpcre\_8.44.bb:do\_package\_qa) failed with exit code ‘1’

> Summary: 1 task failed:  
> /workspaces/yocto/2/balena-generic/build/…/layers/poky/meta/recipes-support/libpcre/libpcre\_8.44.bb:do\_package\_qa  
> Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

so i can’t even get the normal balena-generic image building process working.  
What is the Problem? Am i something missing? How can this be resolved?

Thanks

---

<div class="post-metadata">

**Author:** ![zwhitchcox](https://avatars.discourse-cdn.com/v4/letter/z/8e7dd6/32.png) [@zwhitchcox](https://forums.balena.io/u/zwhitchcox)\
**Post date:** [May 13, 2022, 5:27pm UTC](https://forums.balena.io/t/error-on-building-my-own-generic-balena-image/357723/2 "2022-05-13T17:27:37Z")

</div>

Hi, did you follow the steps in the Yocto setup? [https://www.yoctoproject.org/docs/current/brief-yoctoprojectqs/brief-yoctoprojectqs.html](https://www.yoctoproject.org/docs/current/brief-yoctoprojectqs/brief-yoctoprojectqs.html)

From the link you mentioned:

> you will first need to make sure you have a working Yocto environment setup

Yocto is the underlying technology used to build BalenaOS, and it’s BalenaOS is able to run on so many different device types.

---

<div class="post-metadata">

**Author:** ![SqaureRoot](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@SqaureRoot](https://forums.balena.io/u/SqaureRoot)\
**Post date:** [May 14, 2022, 6:30am UTC](https://forums.balena.io/t/error-on-building-my-own-generic-balena-image/357723/5 "2022-05-14T06:30:12Z")

</div>

yes i did follow it step by step.  
My build system looks like this:

- Ubuntu 22.04 Jammy
- installed packages like stated in [Welcome to the Yocto Project Documentation — The Yocto Project ® 4.0.999 documentation](https://www.yoctoproject.org/docs/current/brief-yoctoprojectqs/brief-yoctoprojectqs.html:) gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm
- also tried to run source oe-init-build-env, but error stays the same.
- i am building in docker container

---

<div class="post-metadata">

**Author:** ![SqaureRoot](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@SqaureRoot](https://forums.balena.io/u/SqaureRoot)\
**Post date:** [May 14, 2022, 6:33am UTC](https://forums.balena.io/t/error-on-building-my-own-generic-balena-image/357723/6 "2022-05-14T06:33:01Z")

</div>

I think there is something i missed in the documentation. I am using Ubuntu 22.04, but it is not in the supported linux distributions section of the documentation. i’ll have a try with Debian Buster later this day.

---

<div class="post-metadata">

**Author:** ![SqaureRoot](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@SqaureRoot](https://forums.balena.io/u/SqaureRoot)\
**Post date:** [May 17, 2022, 12:18pm UTC](https://forums.balena.io/t/error-on-building-my-own-generic-balena-image/357723/7 "2022-05-17T12:18:38Z")

</div>

Changed my OS from Ubuntu 22.04 to Debian, compiling and image creation is now working as expected. Thanks for all the help.

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [May 18, 2022, 10:19am UTC](https://forums.balena.io/t/error-on-building-my-own-generic-balena-image/357723/8 "2022-05-18T10:19:29Z")

</div>

Thank you for sharing the solution @SqaureRoot
