Pynq Ultra96 gcc-mb build fails

I am trying to build the pynq image for ultra96, I am using the xenail vagrant file however it fails at ct-ng build for gcc-mb

+ target=/etc/alternatives/vtrgb
+ sudo rm ./etc/vtrgb
+ sudo ln -s /sdbuild/pynq/sdbuild/build/gcc-mb/sysroot.aarch64/etc/alternatives/vtrgb ./etc/vtrgb
+ export -n LD_LIBRARY_PATH
+ ct-ng aarch64-linux-gnu,microblazeel-xilinx-elf
make[1]: Entering directory '/sdbuild/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"
make[1]: Leaving directory '/sdbuild/pynq/sdbuild/build/gcc-mb'
+ ct-ng build
make[1]: Entering directory '/sdbuild/pynq/sdbuild/build/gcc-mb'
[INFO ]  Performing some trivial sanity checks
[ERROR]  Don't set CFLAGS. It screws up the build.
[ERROR]   
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_Abort[scripts/functions@487]
[ERROR]  >>        called from: CT_TestAndAbort[scripts/functions@507]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@65]
[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: 26323303:22.42)
[00:01] / /opt/crosstool-ng/bin/ct-ng:261: recipe for target 'build' failed
make[1]: *** [build] Error 1
make[1]: Leaving directory '/sdbuild/pynq/sdbuild/build/gcc-mb'
+ unmount_delete
+ /sdbuild/pynq/sdbuild/scripts/unmount_image.sh /sdbuild/pynq/sdbuild/build/gcc-mb/sysroot.aarch64 /sdbuild/pynq/sdbuild/build/gcc-mb/sysroot.aarch64.img
+ set -e
+ target=/sdbuild/pynq/sdbuild/build/gcc-mb/sysroot.aarch64
+ image_file=/sdbuild/pynq/sdbuild/build/gcc-mb/sysroot.aarch64.img
+ sudo umount /sdbuild/pynq/sdbuild/build/gcc-mb/sysroot.aarch64/boot
+ sudo umount /sdbuild/pynq/sdbuild/build/gcc-mb/sysroot.aarch64
+ sleep 5
+ sudo kpartx -d /sdbuild/pynq/sdbuild/build/gcc-mb/sysroot.aarch64.img
loop deleted : /dev/loop0
+ rm /sdbuild/pynq/sdbuild/build/gcc-mb/sysroot.aarch64.img
make: *** [/sdbuild/pynq/sdbuild/packages/gcc-mb/Makefile:17: /sdbuild/pynq/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/bin/mb-gcc] Error 2
vagrant@ubuntu-xenial:/sdbuild/pynq/sdbuild$

Here is the gcc-mb build log:

[DEBUG]  Testing '! ( -n  )'
[INFO ]  Performing some trivial sanity checks
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n set )'
[ERROR]  Don't set CFLAGS. It screws up the build.
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_Abort[scripts/functions@487]
[ERROR]  >>        called from: CT_TestAndAbort[scripts/functions@507]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@65]
[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: 26323529:59.24)

Would you be able to print the output of env in your build environment. It looks like something is setting CFLAGS environment and cross-tool refuses to run if that is case. Hopefully seeing what it’s set to can narrow down which component is causing the problem.

Peter

I restarted my vagrant machine and it gets past this point, however I now run into a “temporary failure in name resolution”.

I think I best create a separate thread as I don’t think they are related issues.