PYNQ: PYTHON PRODUCTIVITY FOR ZYNQ

Compiling pynq 2.4 for Ultra96 using Ubuntu 18.4

Hi anyone successully compiled Pynq2.4 for Utra96 V1 on Ubuntu 18.4.
Just seem to have a continuous flow of errors / failures.

[EXTRA] Dumping internal crosstool-NG configuration: done in 0.08s (at 00:01)
[INFO ] =================================================================
[INFO ] Retrieving needed toolchain components’ tarballs
[EXTRA] Retrieving ‘gmp-6.1.2’
[EXTRA] Saving ‘gmp-6.1.2.tar.xz’ to local storage
[EXTRA] Retrieving ‘mpfr-3.1.5’
[EXTRA] Saving ‘mpfr-3.1.5.tar.xz’ to local storage
[EXTRA] Retrieving ‘isl-0.18’
[EXTRA] Saving ‘isl-0.18.tar.xz’ to local storage
[EXTRA] Retrieving ‘mpc-1.0.3’
[EXTRA] Saving ‘mpc-1.0.3.tar.gz’ to local storage
[EXTRA] Retrieving ‘ncurses-6.0’
[EXTRA] Saving ‘ncurses-6.0.tar.gz’ to local storage
[EXTRA] Retrieving ‘libiconv-1.15’
[EXTRA] Saving ‘libiconv-1.15.tar.gz’ to local storage
[EXTRA] Retrieving ‘gettext-0.19.8.1’
[EXTRA] Saving ‘gettext-0.19.8.1.tar.xz’ to local storage
[ERROR] binutils: Custom version setting is empty
[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@448]
[ERROR] >> called from: CT_TestAndAbort[scripts/functions@468]
[ERROR] >> called from: CT_GetCustom[scripts/functions@752]
[ERROR] >> called from: do_binutils_get[scripts/build/binutils/binutils.sh@8]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@605]
[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.23.0/B - Known issues.txt’
[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:32.02)
[00:32] / /opt/crosstool-ng/bin/ct-ng:147: recipe for target ‘build’ failed
gmake[1]: *** [build] Error 1
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

As far as I am aware the 2.4 release is dependent on crosstool-ng 1.22.0 whereas you are using 1.23.0. It’s possible that the configuration scripts we use to build the microblaze cross-compiler don’t work with the newer version. Can you try using the older version of crosstool-ng?

Peter

thansk Peter, Got futher, but different problems… almost there but not quite…

[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] >>
[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/100-gcc.sh@537]
[ERROR] >> called from: do_gcc_for_build[scripts/build/cc/100-gcc.sh@625]
[ERROR] >> called from: do_cc_for_build[scripts/build/cc.sh@49]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@646]
[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]
[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

The output of the crosstool-ng log may contain more clues as to what’s going on - you can find it in sdbuild/build/gcc-mb/build.log

Peter

Hi Peter,

PLease see the tail end of the build.log… still none the wiser.

[ALL ] if [ -d …/prev-gcc ]; then cd …/prev-gcc && /usr/bin/gmake real-install-headers-tar DESTDIR=pwd/…/gcc/ libsubdir=. ; else set -e; for ml in cat fixinc_list; do sysroot_headers_suffix=echo ${ml} | sed -e 's/;.*$//'; multi_dir=echo ${ml} | sed -e 's/^[^;]*;//'; fix_dir=include-fixed${multi_dir}; if ! false && test ! -d echo /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/microblazeel-xilinx-elf/sysroot${sysroot_headers_suffix}/usr/include | sed -e :a -e 's,[^/]*/../,,' -e ta; then echo The directory that should contain system headers does not exist: >&2 ; echo " echo /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/microblazeel-xilinx-elf/sysroot${sysroot_headers_suffix}/usr/include | sed -e :a -e 's,[^/]*/../,,' -e ta" >&2 ; tooldir_sysinc=echo "/home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/.build/microblazeel-xilinx-elf/buildtools/lib/gcc/microblazeel-xilinx-elf/5.2.0/../../../../microblazeel-xilinx-elf/sys-include" | sed -e :a -e "s,[^/]*/../,," -e ta; if test “xecho /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/microblazeel-xilinx-elf/sysroot${sysroot_headers_suffix}/usr/include | sed -e :a -e 's,[^/]*/../,,' -e ta” = “x${tooldir_sysinc}”; then sleep 1; else exit 1; fi; fi; /bin/bash /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/.build/src/gcc-5.2.0/gcc/…/mkinstalldirs {fix_dir}; chmod a+rx {fix_dir} || true; (TARGET_MACHINE=‘microblazeel-xilinx-elf’; srcdir=cd /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/.build/src/gcc-5.2.0/gcc; ${PWDCMD-pwd}; SHELL=’/bin/bash’; MACRO_LIST=${PWDCMD-pwd}/macro_list ; gcc_dir=${PWDCMD-pwd} ; export TARGET_MACHINE srcdir SHELL MACRO_LIST && cd …/build-x86_64-build_pc-linux-gnu/fixincludes && /bin/bash ./fixinc.sh “{gcc_dir}/{fix_dir}” echo /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/microblazeel-xilinx-elf/sysroot${sysroot_headers_suffix}/usr/include | sed -e :a -e 's,[^/]*/../,,' -e ta ); rm -f {fix_dir}/syslimits.h; if [ -f {fix_dir}/limits.h ]; then mv {fix_dir}/limits.h {fix_dir}/syslimits.h; else cp /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/.build/src/gcc-5.2.0/gcc/gsyslimits.h {fix_dir}/syslimits.h; fi; chmod a+r {fix_dir}/syslimits.h; done; fi
[ALL ] cp/except.o: In function nothrow_libfn_p(tree_node const*)': [ALL ] except.c:(.text+0x1efb): undefined reference tolibc_name_p(char const*, unsigned int)’
[ERROR] collect2: error: ld returned 1 exit status
[ALL ] /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/.build/src/gcc-5.2.0/gcc/cp/Make-lang.in:99: recipe for target ‘cc1plus’ failed
[ERROR] gmake[3]: *** [cc1plus] Error 1
[ALL ] gmake[3]: *** Waiting for unfinished jobs…
[ALL ] Fixing headers into /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/.build/microblazeel-xilinx-elf/build/build-cc-gcc-final-build-x86_64-build_pc-linux-gnu/gcc/include-fixed for microblazeel-xilinx-elf target
[ALL ] No forbidden identifiers defined by this target
[ALL ] Finding directories and links to directories
[ALL ] Searching /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/microblazeel-xilinx-elf/sysroot/usr/include/.
[ALL ] Making symbolic directory links
[ALL ] Fixing directory /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/microblazeel-xilinx-elf/sysroot/usr/include into /home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/.build/microblazeel-xilinx-elf/build/build-cc-gcc-final-build-x86_64-build_pc-linux-gnu/gcc/include-fixed
[ALL ] Applying sysv68_string to string.h
[ALL ] Applying sun_malloc to malloc.h
[ALL ] Cleaning up unneeded directories:
[ALL ] fixincludes is done
[ALL ] echo timestamp > stmp-fixinc
[ALL ] rm gcc.pod
[ALL ] gmake[3]: Leaving directory ‘/home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/.build/microblazeel-xilinx-elf/build/build-cc-gcc-final-build-x86_64-build_pc-linux-gnu/gcc’
[ALL ] Makefile:4115: recipe for target ‘all-gcc’ failed
[ERROR] gmake[2]: *** [all-gcc] Error 2
[ALL ] gmake[2]: Leaving directory ‘/home/iain/pynq/pynq2.4/sdbuild/build/gcc-mb/.build/microblazeel-xilinx-elf/build/build-cc-gcc-final-build-x86_64-build_pc-linux-gnu’
[ERROR]
[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/100-gcc.sh@537]
[ERROR] >> called from: do_gcc_for_build[scripts/build/cc/100-gcc.sh@625]
[ERROR] >> called from: do_cc_for_build[scripts/build/cc.sh@49]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@646]
[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]
[ERROR] (elapsed: 20:22.87)

Might be the default gcc version on ubuntu 18.04 is different than 16.04? I have not tried 18.04 but the flow for ct-ng is somewhat fragile for now.

went back to 16.04! shame i was determined to do it… hoy hum