when building PYNQ 2.5 on a Ubuntu 18.04 virtual machine then the build process stops at the ct-ng build step with following error
[INFO] building environment variables
[ERROR] collect2: error: ld returned 1 exit status
The board for which I’m building PYNQ 2.5 is a ZEDBOARD with ZYNQ 2020 and a dual 32 bit ARM core. I’m able to build a working image file for this platform using a prebuilt ARM image but when using it I get a lot of ext4 error messages. And these errors return, also if I remove them with the e2fsck utility. Therefore I want to do a clean build. But I’m stuck at this stage. The detailed build log of the ct-ng flow is included below.
After the virtual machine setup the crosstool-ng scripts are available at /opt/crosstool-ng
I saw that the source code is available in PYNQ/sdbuild/scripts/tools/crosstool-ng-1.24.0
Doeing a make install installs the crosstoo-ng tools in /usr/local/bin
With both crosstool versions I run into the same problem.
What can I do to avoid this error??
Thanks for the support!
Detailed log of ct-ng tool - see lines with [ERROR]
[DEBUG] Testing ‘! ( -n )’
[INFO ] Performing some trivial sanity checks
… left away intitial checks to stay within topic line limits
[DEBUG] Missing: ‘arm-linux-gnueabihf-gnatmake’ or ‘arm-linux-gnueabihf-gnatmake’ or ‘gnatmake’ : not required.
[DEBUG] ‘arm-host_unknown-linux-gnueabihf-ld’ → ‘/home/xilinx/xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-ld’
[DEBUG] ==> Executing: ‘chmod’ ‘700’ ‘/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/bin/arm-host_unknown-linux-gnueabihf-ld’
[DEBUG] ==> Return status 0
[DEBUG] ‘arm-host_unknown-linux-gnueabihf-nm’ → ‘/home/xilinx/xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-nm’
[DEBUG] ==> Executing: ‘chmod’ ‘700’ ‘/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/bin/arm-host_unknown-linux-gnueabihf-nm’
[DEBUG] ==> Return status 0
[DEBUG] ‘arm-host_unknown-linux-gnueabihf-objcopy’ → ‘/home/xilinx/xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-objcopy’
[DEBUG] ==> Executing: ‘chmod’ ‘700’ ‘/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/bin/arm-host_unknown-linux-gnueabihf-objcopy’
[DEBUG] ==> Return status 0
[DEBUG] ‘arm-host_unknown-linux-gnueabihf-objdump’ → ‘/home/xilinx/xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-objdump’
[DEBUG] ==> Executing: ‘chmod’ ‘700’ ‘/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/bin/arm-host_unknown-linux-gnueabihf-objdump’
[DEBUG] ==> Return status 0
[DEBUG] ‘arm-host_unknown-linux-gnueabihf-ranlib’ → ‘/home/xilinx/xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-ranlib’
[DEBUG] ==> Executing: ‘chmod’ ‘700’ ‘/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/bin/arm-host_unknown-linux-gnueabihf-ranlib’
[DEBUG] ==> Return status 0
[DEBUG] ‘arm-host_unknown-linux-gnueabihf-strip’ → ‘/home/xilinx/xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-strip’
[DEBUG] ==> Executing: ‘chmod’ ‘700’ ‘/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/bin/arm-host_unknown-linux-gnueabihf-strip’
[DEBUG] ==> Return status 0
[DEBUG] Missing: ‘arm-linux-gnueabihf-windres’ or ‘arm-linux-gnueabihf-windres’ or ‘windres’ : not required.
[DEBUG] ‘makeinfo’ → ‘/usr/bin/makeinfo’
[DEBUG] ==> Executing: ‘chmod’ ‘700’ ‘/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/bin/makeinfo’
[DEBUG] ==> Return status 0
[DEBUG] CFLAGS for build compiler: '-O2 -g -I/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/include ’
[DEBUG] LDFLAGS for build compiler: '-L/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/lib ’
[DEBUG] CFLAGS for host compiler: ‘-O2 -g -pipe -I/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/complibs-host/include --sysroot=/home/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.arm’
[DEBUG] LDFLAGS for host compiler: ‘-L/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/complibs-host/lib --sysroot=/home/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.arm’
[DEBUG] =================================================================
[DEBUG] Checking that we can run gcc -v
[DEBUG] ==> Executing: ‘arm-host_unknown-linux-gnueabihf-gcc’ ‘-v’
[DEBUG] Using built-in specs.
[DEBUG] COLLECT_GCC=/home/xilinx/xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-gcc
[DEBUG] COLLECT_LTO_WRAPPER=/home/xilinx/xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/…/libexec/gcc/arm-linux-gnueabihf/8.2.0/lto-wrapper
[DEBUG] Target: arm-linux-gnueabihf
[DEBUG] Configured with: /proj/esdt_sdk/gnu_abe/ABE/builds/lin/arm/arm-linux/snapshots/gcc-8.2.0/configure SHELL=/bin/sh --with-bugurl=://bugs.linaro.org --with-mpc=/proj/esdt_sdk/gnu_abe/ABE/builds/lin/arm/arm-linux/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/proj/esdt_sdk/gnu_abe/ABE/builds/lin/arm/arm-linux/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/proj/esdt_sdk/gnu_abe/ABE/builds/lin/arm/arm-linux/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libstdcxx-pch --disable-libmudflap --with-cloog=no --with-ppl=no --with-isl=no --disable-nls --enable-c99 --enable-gnu-indirect-function --disable-multilib --with-tune=cortex-a9 --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=arm --disable-multilib --enable-multiarch CFLAGS=-O2 CXXFLAGS=-O2 --disable-silent-rules --enable-libquadmath --enable-libg2c --enable-symvers=gnu --enable-libstdcxx-pch --disable-libssp --disable-libmudflap --enable-checking=release --enable-cheaders=c_global --enable-poison-system-directories --enable-clocale=generic --enable-shared --enable-threads=posix --disable-multilib --enable-c99 --without-local-prefix --enable-lto --disable-bootstrap --with-linker-hash-style=gnu --with-ppl=no --with-cloog=no --without-isl --enable-nls --enable-__cxa_atexit --with-build-sysroot=/proj/esdt_sdk/gnu_abe/ABE/builds/lin/arm/arm-linux/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/libc --enable-plugins --enable-linker-build-id --enable-long-long --enable-shared --with-sysroot=/proj/esdt_sdk/gnu_abe/ABE/builds/lin/arm/arm-linux/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/libc --enable-languages=c,c++,lto --enable-checking=yes --disable-bootstrap --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabihf --prefix=/proj/esdt_sdk/gnu_abe/ABE/builds/lin/arm/arm-linux/builds/destdir/x86_64-unknown-linux-gnu
[DEBUG] Thread model: posix
[DEBUG] gcc version 8.2.0 (GCC)
[DEBUG] ==> Return status 0
[DEBUG] Checking that we can run gcc -v: done in 0.01s (at 00:02)
[DEBUG] =================================================================
[DEBUG] Checking that gcc can compile a trivial program
[DEBUG] ==> Executing: ‘arm-host_unknown-linux-gnueabihf-gcc’ ‘-O2’ ‘-g’ ‘-pipe’ ‘-I/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/complibs-host/include’ ‘–sysroot=/home/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.arm’ ‘-L/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/buildtools/complibs-host/lib’ ‘–sysroot=/home/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.arm’ ‘/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/build/test.c’ ‘-o’ ‘/home/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-arm-linux-gnueabihf/microblazeel-xilinx-elf/build/.gccout’
[DEBUG] /home/xilinx/xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/…/lib/gcc/arm-linux-gnueabihf/8.2.0/…/…/…/…/arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
[DEBUG] /home/xilinx/xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/…/lib/gcc/arm-linux-gnueabihf/8.2.0/…/…/…/…/arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
[ERROR] collect2: error: ld returned 1 exit status
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step ‘Checking that gcc can compile a trivial program’
[ERROR] >> called in step ‘(top-level)’
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@376]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@611]
[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] >> //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] >> ://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] >> //crosstool-ng.github.io/support/
[ERROR]
[ERROR] (elapsed: 0:00.81)