Failed to build SD image for ZCU111

  • PYNQ version & Board name & Tool Version
    PYNQ master branch, commit 59515a9b5d
  • Full details of the error message you see, or a detailed description of the problem you experience.
+ ct-ng build
gmake[1]: Entering directory '/workspace/PYNQ/sdbuild/build/gcc-mb'
[INFO ]  Performing some trivial sanity checks
[WARN ]  Number of open files 1024 may not be sufficient to build the toolchain; increasing to 2048
[INFO ]  Build started 20220823.205016
[INFO ]  Building environment variables
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[ERROR]    isl: download failed
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Retrieving needed toolchain components' tarballs'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_Abort[scripts/functions@487]
[ERROR]  >>        called from: CT_DoFetch[scripts/functions@2103]
[ERROR]  >>        called from: CT_PackageRun[scripts/functions@2063]
[ERROR]  >>        called from: CT_Fetch[scripts/functions@2174]
[ERROR]  >>        called from: do_isl_get[scripts/build/companion_libs/121-isl.sh@16]
[ERROR]  >>        called from: do_companion_libs_get[scripts/build/companion_libs.sh@15]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@648]
[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]  >>      https://crosstool-ng.github.io/docs/known-issues/
[ERROR]  >>
[ERROR]  >> NOTE: Your configuration includes features marked EXPERIMENTAL.
[ERROR]  >> Before submitting a bug report, try to reproduce it without enabling
[ERROR]  >> any experimental features. Otherwise, you'll need to debug it
[ERROR]  >> and present an explanation why it is a bug in crosstool-NG - or
[ERROR]  >> preferably, a fix.
[ERROR]  >>
[ERROR]  >> NOTE: You configuration uses non-default patch sets. Please
[ERROR]  >> select 'bundled' as the set of patches applied and attempt
[ERROR]  >> to reproduce this issue. Issues reported with other patch
[ERROR]  >> set selections (none, local, bundled+local) are going to be
[ERROR]  >> closed without explanation.
[ERROR]  >>
[ERROR]  >>  If you feel this is a bug in crosstool-NG, report it at:
[ERROR]  >>      https://github.com/crosstool-ng/crosstool-ng/issues/
[ERROR]  >>
[ERROR]  >>  Make sure your report includes all the information pertinent to this issue.
[ERROR]  >>  Read the bug reporting guidelines here:
[ERROR]  >>      http://crosstool-ng.github.io/support/
[ERROR]
[ERROR]  (elapsed: 5:18.10)
  • Steps to reproduce the problem, and if needed: source code and bitstream or any relevant files
  1. Cloned the latest PYNQ repo on windows machine
  2. Follow the instruction started the virtualbox 18.04
  3. Followed the instruction run the sudo scripts/setup_host.sh
  4. Setup the Vivado/Vitis/Petalinux 20.04
  5. in the vbox, I clone the PYNQ again to the /workspace
  6. clone the GitHub - Xilinx/ZCU111-PYNQ: Board files to build the ZCU111 PYNQ image and place the ZCU111 folder under the boards
  7. from the sdbuild, Make BOARDS=ZCU111
    After hours run, it give me this error message

The terminal doesn’t have the full log, but there are lots of them are in the attached e.txt

Actually, I also got the same message for the ZCU104 earlier.
I will try the Pynq-Z1 now.

1 Like

Hi,

Please find the following build guide and issue report:

@briansune Thank you for the reply.

I have the vivado/vitis/petalinux installed on a shared folder, and mounted at /opt/Xilinx/2020.2, so the directory structure is slightly different from yours.
And I am reusing the virtualbox machine setup by the vagrant, but manually configuration the ubuntu 18.04. I even installed the gnome as a GUI.

This still not giving me the right result. The same error happened.

Hello Gang,

The tutorial of the official build no longer good to follow.
So as my first link proposed, vagrant is not a good method to setup env.
Second shared folder placement introduce all kinds of unexpected right issues.
Please follow the link I had proposed which different developers show no issues and myself as well.
Botj ZYNQ and Ultra-ZYNQ build are success and show no fail as mostly on Ultra-ZYNQ is missing so DTSI setup.

The first problem I got is the package conflict between gcc-multilib and the gcc-arm-linux-gnueabihf .
I saw other forums talking about make symbolic link or other work around. I can also remove the check for the gcc-multilib in the check_env.sh.
I want to know how do you solve this conflict?
Thanks

My attempt of make the ZCU111 image failed again.
This time I try to follow your instruction above, except:
With the gcc-multilib in the check_env.sh removed, the compilation

give me error

@ubuntu1804:~/PYNQ/sdbuild$ make BOARDS=ZCU111
/opt/qemu/bin//qemu-aarch64-static -version | fgrep 5.2.0
qemu-aarch64 version 5.2.0
vivado -version | fgrep 2020.2
Vivado v2020.2 (64-bit)
vitis -version | fgrep 2020.2
****** Vitis v2020.2 (64-bit)
which petalinux-config
/opt/Xilinx/PetaLinux/2020.2/tool/tools/common/petalinux/bin/petalinux-config
which arm-linux-gnueabihf-gcc
/usr/bin/arm-linux-gnueabihf-gcc
which microblaze-xilinx-elf-gcc
/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/microblaze/lin/bin/microblaze-xilinx-elf-gcc
which ct-ng
/usr/local/bin/ct-ng
bash /home/ghuang/PYNQ/sdbuild/scripts/check_env.sh
Checking system for required packages:
bc gperf bison flex texi2html texinfo help2man gawk libtool libtool-bin build-essential automake libglib2.0-dev device-tree-compiler qemu-user-static binfmt-support multistrap git lib32z1 libbz2-1.0 lib32stdc++6 libssl-dev kpartx zerofree u-boot-tools rpm2cpio libsdl1.2-dev rsync python3-pip libidn11 curl libncurses5-dev lib32ncurses5
cd /home/ghuang/PYNQ/sdbuild/build/gcc-mb && /home/ghuang/PYNQ/sdbuild/packages/gcc-mb//build.sh aarch64 
+ ARCH=aarch64
+ ROOT_IMAGE=
+++ dirname /home/ghuang/PYNQ/sdbuild/packages/gcc-mb//build.sh
++ cd /home/ghuang/PYNQ/sdbuild/packages/gcc-mb
++ pwd
+ SCRIPT_DIR=/home/ghuang/PYNQ/sdbuild/packages/gcc-mb
+ case ${ARCH} in
+ sample=aarch64-linux-gnu,microblazeel-xilinx-elf
++ find /home/ghuang/PYNQ/sdbuild/build/gcc-mb/native -name bin -maxdepth 2
find: warning: you have specified the -maxdepth option after a non-option argument -name, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: ‘/home/ghuang/PYNQ/sdbuild/build/gcc-mb/native’: No such file or directory
+ for f in `find $CT_COMPILE_ROOT/native -name bin -maxdepth 2`:
+ export PATH=::/usr/local/bin:/opt/crosstool-ng/bin:/opt/qemu/bin/:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/petalinux/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/common/petalinux/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/microblaze/lin/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/armr5/lin/gcc-arm-none-eabi/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/aarch64/lin/aarch64-none/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/petalinux/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/common/petalinux/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/microblaze/lin/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/armr5/lin/gcc-arm-none-eabi/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/aarch64/lin/aarch64-none/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/Xilinx/Vivado/2020.2/bin:/bin:/opt/Xilinx/Vitis/2020.2/bin:/home/ghuang/Xilinx/PetaLinux/2020.2/tool/tools/common/petalinux/bin/bin:/opt/Xilinx/Vitis_HLS/2020.2/bin:/opt/riscv32im/bin/
+ PATH=::/usr/local/bin:/opt/crosstool-ng/bin:/opt/qemu/bin/:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/petalinux/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/common/petalinux/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/microblaze/lin/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/armr5/lin/gcc-arm-none-eabi/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/aarch64/lin/aarch64-none/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/petalinux/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/common/petalinux/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/microblaze/lin/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/armr5/lin/gcc-arm-none-eabi/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/aarch64/lin/aarch64-none/bin:/opt/Xilinx/PetaLinux/2020.2/tool/tools/xsct/gnu/aarch32/lin/gcc-arm-none-eabi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/Xilinx/Vivado/2020.2/bin:/bin:/opt/Xilinx/Vitis/2020.2/bin:/home/ghuang/Xilinx/PetaLinux/2020.2/tool/tools/common/petalinux/bin/bin:/opt/Xilinx/Vitis_HLS/2020.2/bin:/opt/riscv32im/bin/
+ export -n LD_LIBRARY_PATH
+ ct-ng aarch64-linux-gnu,microblazeel-xilinx-elf
gmake[1]: Entering directory '/home/ghuang/PYNQ/sdbuild/build/gcc-mb'
  CONF  aarch64-linux-gnu,microblazeel-xilinx-elf
#
# configuration written to .config
#

***********************************************************

Initially reported by: Peter Ogden
URL: 

***********************************************************

WARNING! This sample may enable experimental features.
         Please be sure to review the configuration prior
         to building and using your toolchain!
Now, you have been warned!

***********************************************************

Now configured for "aarch64-linux-gnu,microblazeel-xilinx-elf"
gmake[1]: Leaving directory '/home/ghuang/PYNQ/sdbuild/build/gcc-mb'
+ ct-ng build
gmake[1]: Entering directory '/home/ghuang/PYNQ/sdbuild/build/gcc-mb'
[INFO ]  Performing some trivial sanity checks
[WARN ]  Number of open files 1024 may not be sufficient to build the toolchain; increasing to 2048
[INFO ]  Build started 20220826.000836
[INFO ]  Building environment variables
[ERROR]  Missing: 'aarch64-linux-gnu-ar' or 'aarch64-linux-gnu-ar' or 'ar' : either needed!
[ERROR]   
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_Abort[scripts/functions@487]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@472]
[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]  >>      https://crosstool-ng.github.io/docs/known-issues/
[ERROR]  >>
[ERROR]  >> NOTE: Your configuration includes features marked EXPERIMENTAL.
[ERROR]  >> Before submitting a bug report, try to reproduce it without enabling
[ERROR]  >> any experimental features. Otherwise, you'll need to debug it
[ERROR]  >> and present an explanation why it is a bug in crosstool-NG - or
[ERROR]  >> preferably, a fix.
[ERROR]  >>
[ERROR]  >> NOTE: You configuration uses non-default patch sets. Please
[ERROR]  >> select 'bundled' as the set of patches applied and attempt
[ERROR]  >> to reproduce this issue. Issues reported with other patch
[ERROR]  >> set selections (none, local, bundled+local) are going to be
[ERROR]  >> closed without explanation.
[ERROR]  >>
[ERROR]  >>  If you feel this is a bug in crosstool-NG, report it at:
[ERROR]  >>      https://github.com/crosstool-ng/crosstool-ng/issues/
[ERROR]  >>
[ERROR]  >>  Make sure your report includes all the information pertinent to this issue.
[ERROR]  >>  Read the bug reporting guidelines here:
[ERROR]  >>      http://crosstool-ng.github.io/support/
[ERROR]   
[ERROR]  (elapsed: 0:01.29)
[00:03] / /usr/local/bin/ct-ng:261: recipe for target 'build' failed
gmake[1]: *** [build] Error 1
gmake[1]: Leaving directory '/home/ghuang/PYNQ/sdbuild/build/gcc-mb'
/home/ghuang/PYNQ/sdbuild/packages/gcc-mb/Makefile:17: recipe for target '/home/ghuang/PYNQ/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/bin/mb-gcc' failed
make: *** [/home/ghuang/PYNQ/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/bin/mb-gcc] Error 2

Am I missing some step?

Thanks

Hello Gang,

In my installation guide there are no gcc-multilib need to patch during the setup.
Make sure all the Ubuntu version, Vivado version and HLS patch is done correctly.
Meantime, always build the image with prebuilt as this can reduce difficulties on build. Building from sketch may require more understanding so if it is just a base overlay modified without diver change then this is better for you to follow.

Follow the readme step in the build guide about the command usage of the official PYNQ about PREBUILT=… the compressed file can be download from the PYNQ SD Image webpage make sure you are using ARM for ZYNQ and AARCH64 for ZYNQ-ULTRASCALE.

ok, I will
er.txt (19.6 KB)
ry to use the PREBUILT today.

Although I really want to be able to build Pynq from the source, because I want to be able to use Pynq on the HTG-ZRF16 board, but there is no bsp to be downloaded yet. And I also hope I can use the latest ubuntu or debian instead of the focal, so that will definite require build from the source. As a learning step, I should be able to rebuild the focal from source before I can even try the other distributions.

Regarding the versions:

I think they all correct, although I didn’t install the Xilinx tools in my home directory, is that a critical step?

Does the HLS patch step mean the plnx-env-setup.sh?
The log for that step is attached, most of the packages are already installed, with few exceptions:

  1. git-core is using git
  2. The problem for the gcc-multilib and gcc-arm-linux-gnueabihf

    You can see it automatically removed the gcc-arm-linux-gnueabihf
  3. zlib1g:i386 is installed again

Under this condition, if I run the

make BOARDS=ZCU111

I will get


So I have to manually install the gcc-arm-linux-gnueabihf, which will remove the gcc-multilib

Gang,

I really don’t understand why there are issue related to gcc.
If this is virtualbox manually installed virtual machine.
Follow 100% my step on any PC no matter CPU brand AMD or Intel show no issue.
So did you run the setup script provide in the PYNQ repository?
Are you sure u are using the correct revision along with the Vivado 2020.2?
Aka PYNQ 2.7 rather than older revision?
Can you capture the load tools when a new terminal is open. There should be couples of tools printed once a new terminal is opened.

Meantime, even with my install guide I can build from sketch as well, but time will be longer.

Here is a simple print once the terminal is open:

I will suggest not to take risk on the right issue here.
Install Xilinx tools to /home/current_usr instead of /opt/ as this is not necessary.

@briansune Thank you for you guidance.
In the last couple days, I rearrange stuff on my computer to setup another 200G space for a new virtualbox.
Following exact your direction, but I am building the Pynq-Z1 instead of ZCU111, because I think that is the one came with PYNQ, which should make things more straight forward, and also in your instruction you didn’t mention about download the zcu111 bsp, although I think I know what to do with them, but let me not risk that now.

  1. The gcc problem is still there. I have to install gcc-9-arm-linux-gnueabihf and that will remove the gcc-multilib, and I also remove the check for gcc-multilib in the check_env.sh so the program can go forward. Because of this error, my source of petalinux have an error of missing gcc-multilib error.

  2. This time it does move forward a lot compare to before and even got the xrt built successfully. Unfortunately, it still ended with error, but the error is not on building the Pynq-Z1, it is try to build the base.bit fro Pynq-Z2. Please see the attached log for the last session of the log including the error.
    log.txt (18.8 KB)

source run_ippack.tcl -notrace
bad lexical cast: source type value could not be interpreted as target
    while executing
"rdi::set_property core_revision 2209011310 {component component_1}"
    invoked from within
"set_property core_revision $Revision $core"
    (file "run_ippack.tcl" line 937)
INFO: [Common 17-206] Exiting Vivado at Thu Sep  1 13:11:09 2022...
ERROR: [IMPL 213-28] Failed to generate IP.
  1. Regarding the vivado/vitis/petalinux/Pynq version all seems correct for me, please see below:

  1. At the end when the error on the Pynq-Z2 happen, in the sdbuild/build, I do have


    image
    Are the folders in the build the final result? I think it should be moved to output if it finished successfully, is that correct?

I have also captured the screen video for the whole process, if interested, I can spend some time to edit it to a reasonable speed and file size to share.

That a bit long:

In my first post instruction, I do mention about bsp issues see:

You can see there are two link 1st targeting general linux environment setup:
2nd post is targeted ZYNQ-ULTRA-SCALE issues.

I personally built xc7z010 xc7z020 xc7z100 and ZYNQ ultra-scale forgot the part #.
Above the different boards image build and installed two PCs or even more as virtual environment I am using. There are no GCC issue.
However, there might be all board build issue which can be ignore by modifying the build.sh and run build command again without “CLEAN”.
see: Pynq 2.7 for Zybo-Z7

As for IP issue, please setup HDMI license from limited time use and make sure lic is loaded to the virtual environment.

From the log you can also see there are nothing to do with the environment but HLS and IP build fail.
Any LIC CPU not enough RAM not enough could introduce such issues.
Also please do a clean once you see such issue.