# Failed to build image for custom board

**URL:** <https://discuss.pynq.io/t/failed-to-build-image-for-custom-board/3117>\
**Category:** Support\
**Created:** [October 10, 2021, 1:23pm UTC](https://discuss.pynq.io/t/failed-to-build-image-for-custom-board/3117 "2021-10-10T13:23:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shalom](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/shalom/32/1308_2.png) [@shalom](https://discuss.pynq.io/u/shalom)\
**Post date:** [October 10, 2021, 1:23pm UTC](https://discuss.pynq.io/t/failed-to-build-image-for-custom-board/3117/1 "2021-10-10T13:23:18Z")

</div>

Hello

Iam trying to build pynq2.6 for zcu102  
I have installed petalinux / vivado / and vitis 2020.1  
then running the cmd : make BOARDS=ZCU102

I get the following error:  
version | fgrep 4.0.0  
/bin/bash: version: command not found  
Makefile:339: recipe for target ‘qemu\_check\_aarch64’ failed  
make: [qemu\_check\_aarch64] Error 1 (ignored)  
vivado -version | fgrep 2020.1  
Vivado v2020.1 (64-bit)  
vitis -version | fgrep 2020.1  
\*\*\*\*\*\* Vitis v2020.1 (64-bit)  
which petalinux-config  
/home/shal/petalinux/2020.1/tools/common/petalinux/bin/petalinux-config  
which arm-linux-gnueabihf-gcc  
/home/shal/Xilinx/Vitis/2020.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-gcc  
which microblaze-xilinx-elf-gcc  
/home/shal/petalinux/2020.1/tools/xsct/gnu/microblaze/lin/bin/microblaze-xilinx-elf-gcc  
which ct-ng  
Makefile:356: recipe for target ‘checkenv’ failed  
make: \*\*\* [checkenv] Error 1

I dont understand what the issue  
Thank you very much  
Shal

---

<div class="post-metadata">

**Author:** ![abdyoyo](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/abdyoyo/32/2297_2.png) [@abdyoyo](https://discuss.pynq.io/u/abdyoyo)\
**Post date:** [October 11, 2021, 4:50am UTC](https://discuss.pynq.io/t/failed-to-build-image-for-custom-board/3117/2 "2021-10-11T04:50:40Z")

</div>

Please write the code part of the post inside the code blockquote (Ctrl+Shift+9 to use it here).

Have you seen the documentation on the meta-pynq and image building for pynq? If not, reading that and figuring out will solve your issue.

Abhijeet

---

<div class="post-metadata">

**Author:** ![shalom](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/shalom/32/1308_2.png) [@shalom](https://discuss.pynq.io/u/shalom)\
**Post date:** [October 12, 2021, 8:12am UTC](https://discuss.pynq.io/t/failed-to-build-image-for-custom-board/3117/3 "2021-10-12T08:12:40Z")

</div>

Ok thank you  
will check that

---

<div class="post-metadata">

**Author:** ![ATchelet](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/atchelet/32/2439_2.png) [@ATchelet](https://discuss.pynq.io/u/ATchelet)\
**Post date:** [October 12, 2021, 11:47am UTC](https://discuss.pynq.io/t/failed-to-build-image-for-custom-board/3117/4 "2021-10-12T11:47:03Z")

</div>

I think I might have had this error after not specifying the architecture in the \*.spec file. It’s not written in the how-to guide, but I saw it on the \*.spec file of the prebuilt boards.

For the ZCU102, which has the AArch64 CPU, you need to add this line to your \*.spec file. I assume you replaced MyBoard from the guide with ZCU102:

> ARCH\_ZCU102 := aarch64

Hope it works for you

---

<div class="post-metadata">

**Author:** ![shalom](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/shalom/32/1308_2.png) [@shalom](https://discuss.pynq.io/u/shalom)\
**Post date:** [October 12, 2021, 12:54pm UTC](https://discuss.pynq.io/t/failed-to-build-image-for-custom-board/3117/5 "2021-10-12T12:54:44Z")

</div>

Hi

Yes set the correct arch for the board : here is my .spec file  
ARCH\_ZCU102 := aarch64  
BSP\_ZCU102 := xilinx-zcu102-v2020.1-final.bsp

FPGA\_MANAGER\_ZCU102 := 1

STAGE4\_PACKAGES\_ZCU102 := ethernet

I currently check , maybe some linux packages have not been correctly installed

Thanks  
Shal

---

<div class="post-metadata">

**Author:** ![shalom](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/shalom/32/1308_2.png) [@shalom](https://discuss.pynq.io/u/shalom)\
**Post date:** [October 14, 2021, 7:10am UTC](https://discuss.pynq.io/t/failed-to-build-image-for-custom-board/3117/6 "2021-10-14T07:10:41Z")

</div>

Hello

So i recheck all my setup , reinstall packages that petalinux need and I successfully generate an image for petalinux for zcu102

when I go though the pynq procedure , I run the **./scripts/setup\_host.sh**  
and get the following error :  
**The following packages have unmet dependencies:  
libglib2.0-dev : Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.56.4-0ubuntu0.18.04.4 is to be installed  
Depends: libglib2.0-bin (= 2.56.1-2ubuntu1)  
libsdl1.2-dev : Depends: libasound2-dev but it is not going to be installed  
Depends: libcaca-dev but it is not going to be installed  
Depends: libglu1-mesa-dev but it is not going to be installed or  
libglu-dev  
Depends: libpulse-dev but it is not going to be installed  
Depends: libx11-dev but it is not going to be installed  
Depends: libxext-dev but it is not going to be installed  
libssl-dev : Depends: libssl1.1 (= 1.1.0g-2ubuntu4) but 1.1.1-1ubuntu2.1~18.04.5 is to be installed  
Recommends: libssl-doc but it is not going to be installed  
E: Unable to correct problems, you have held broken packages.**

Is there any script that arrange all those dependencies automatically as petalinux do ?

Thanks  
Shal

---

<div class="post-metadata">

**Author:** ![shalom](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/shalom/32/1308_2.png) [@shalom](https://discuss.pynq.io/u/shalom)\
**Post date:** [October 19, 2021, 8:03pm UTC](https://discuss.pynq.io/t/failed-to-build-image-for-custom-board/3117/7 "2021-10-19T20:03:19Z")

</div>

I delete the VMs and recreate a new one bionic 18.04.6 instead of 18.04.4

So the **./scripts/setup\_host.sh** passed successfully  
Now going to next steps…

Thanks  
Shal
