Compiling Pynq for Ultra96

Hi all,

Im still having issue trying to compile Pynq for Ultra96 using Ubuntu 18.04 and Vivado 2018.3 tools. I have followed Peters advice for CT-NG and the solution almost gets there apart from the following error which i have no idea how to fix / resolve. Was wondering if anyone has any ideas.

Thanks in advance :slight_smile:

[INFO ] =================================================================
[INFO ] Installing C library headers & start files
[INFO ] Installing C library headers & start files: done in 0.01s (at 09:38)
[INFO ] =================================================================
[INFO ] Installing pass-2 core C gcc compiler
[INFO ] Installing pass-2 core C gcc compiler: done in 254.20s (at 13:52)
[INFO ] =================================================================
[INFO ] Installing C library
[INFO ] Installing C library: done in 27.13s (at 14:19)
[INFO ] =================================================================
[INFO ] Installing final gcc compiler for build
[ERROR] collect2: error: ld returned 1 exit status
[ERROR] gmake[3]: *** [cc1plus] Error 1
[ERROR] gmake[2]: *** [all-gcc] Error 2
[ERROR] >>
[ERROR] >> Build failed in step ‘Installing final gcc compiler for build’
[ERROR] >> called in step ‘(top-level)’
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR] >> called from: do_gcc_core_backend[scripts/build/cc/]
[ERROR] >> called from: do_gcc_for_build[scripts/build/cc/]
[ERROR] >> called from: do_cc_for_build[scripts/build/]
[ERROR] >> called from: main[scripts/]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: ‘build.log’
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> ‘/opt/crosstool-ng/share/doc/crosstool-ng/crosstool-ng-1.22.0/B - Known issues.txt’
[ERROR] (elapsed: 16:45.81)
[16:46] / /opt/crosstool-ng/bin/ct-ng:152: recipe for target ‘build’ failed
gmake[1]: *** [build] Error 2
gmake[1]: Leaving directory ‘/home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb’
/home/iain/pynq/pynq2.4/sdbuild/packages/gcc-mb/Makefile:22: recipe for target ‘/home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/bin/mb-gcc’ failed
make: *** [/home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/bin/mb-gcc] Error 2

Why are you trying to recompile the PYNQ image? A pre-compiled v2.4 image for the Ultra96 is available here:


Hi Cathal

I would like to add my own poackages to the bitbake build process. So just trying to prove the process is working for me.

Have you managed to compile it at all under ubuntu 18.04?



Hi Darth, I have compiled it under 18.04 but… I used a VirtualBox VM running Ubuntu 16. Sorry, I would help if I could.

If you go down this path you are going to have to learn a lot about all kinds of cross dependencies that are untested. For the most reliable results maybe give the Ubuntu 16 VM approach a try? The creative PYNQ engineers have also included a vagrant config file for setting up the VirtualBox VM, you can find it in the main PYNQ github.

Do also keep in mind if you add recipes into the PetaLinux bsp nothing in the rootfs of PetaLinux is built with PYNQ, that includes modules. You can look through the github for Ultra96 PYNQ and look at the wifi driver for U96 v2 and see that the .ko is in a set of sidecar folders with installation scripts. The there hints at how to generate the .ko.

Kind regards

1 Like