checking whether the C compiler works... no

Hello, 

I am running Xilinx SDK/Vivado 2017.4.1

I am running Ubuntu 18.04 on Windows 10. Followed these instructions for setting it up: www.howtogeek.com/.../

I followed the README on the following link: https://github.com/analogdevicesinc/plutosdr-fw

I got two errors, one of which I was able to get past but I'm not sure if what I did actually fixed the problem:

First error: 

ERROR: No hash found for doc/COPYING
ERROR: No hash found for doc/COPYING.LGPL
>>> host-makedevs Collecting legal info
WARNING: the Buildroot source code has not been saved
Legal info produced in /home/george/plutosdr-fw/buildroot/output/legal-info
make[1]: Leaving directory '/home/george/plutosdr-fw/buildroot'
scripts/legal_info_html.sh "PlutoSDR" "/home/george/plutosdr-fw/buildroot/board/pluto/VERSIONS"
curl: (7) Failed to connect to sourceforge.net port 443: Connection refused
unknown error while trying sourceforge.net/.../expat

cp build/LICENSE.html buildroot/board/pluto/msd/LICENSE.html
make -C buildroot TOOLCHAIN_EXTERNAL_INSTALL_DIR= ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- BUSYBOX_CONFIG_FILE=/home/george/plutosdr-fw/buildroot/board/pluto/busybox-1.25.0.config all
make[1]: Entering directory '/home/george/plutosdr-fw/buildroot'
>>> toolchain-external-custom Configuring
>>> toolchain-external-custom Building
/usr/bin/gcc -O2 -I/home/george/plutosdr-fw/buildroot/output/host/include -DBR_CPU='"cortex-a9"' -DBR_ABI='"aapcs-linux"' -DBR_FPU='"neon"' -DBR_FLOAT_ABI='"hard"' -DBR_MODE='"arm"' -DBR_CROSS_PATH_SUFFIX='""' -DBR_CROSS_PATH_ABS='"/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/"' -DBR_SYSROOT='"arm-buildroot-linux-gnueabihf/sysroot"' -DBR_ADDITIONAL_CFLAGS='' -s -Wl,--hash-style=both toolchain/toolchain-wrapper.c -o /home/george/plutosdr-fw/buildroot/output/build/toolchain-external-custom/toolchain-wrapper
>>> toolchain-external-custom Installing to staging directory
/usr/bin/install -D -m 0755 /home/george/plutosdr-fw/buildroot/output/build/toolchain-external-custom/toolchain-wrapper /home/george/plutosdr-fw/buildroot/output/host/bin/toolchain-wrapper
ln: failed to create symbolic link '/home/george/plutosdr-fw/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib': No such file or directory
package/pkg-generic.mk:260: recipe for target '/home/george/plutosdr-fw/buildroot/output/build/toolchain-external-custom/.stamp_staging_installed' failed
make[2]: *** [/home/george/plutosdr-fw/buildroot/output/build/toolchain-external-custom/.stamp_staging_installed] Error 1
Makefile:79: recipe for target '_all' failed
make[1]: *** [_all] Error 2
make[1]: Leaving directory '/home/george/plutosdr-fw/buildroot'
Makefile:91: recipe for target 'buildroot/output/images/rootfs.cpio.gz' failed
make: *** [buildroot/output/images/rootfs.cpio.gz] Error 2
george@LAPTOP-LGQGTOAE:~/plutosdr-fw$

I "fixed" this by creating a "usr" directory at "/home/george/plutosdr-fw/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/"

cd /home/george/plutosdr-fw/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot

mkdir usr

Second error:

>>> fftw 3.3.7 Configuring
(cd /home/george/plutosdr-fw/buildroot/output/build/fftw-3.3.7/ && rm -rf config.cache && PATH="/home/george/plutosdr-fw/buildroot/output/host/bin:/home/george/plutosdr-fw/buildroot/output/host/sbin:/bin:/usr/bin:/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin:/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin" AR="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-ar" AS="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-as" LD="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-ld" NM="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-nm" CC="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-gcc" GCC="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-gcc" CPP="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-cpp" CXX="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-g++" FC="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-gfortran" F77="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-gfortran" RANLIB="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-ranlib" READELF="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-readelf" STRIP="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-strip" OBJCOPY="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-objcopy" OBJDUMP="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/home/george/plutosdr-fw/buildroot/output/host/include" CFLAGS_FOR_BUILD="-O2 -I/home/george/plutosdr-fw/buildroot/output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I/home/george/plutosdr-fw/buildroot/output/host/include" LDFLAGS_FOR_BUILD="-L/home/george/plutosdr-fw/buildroot/output/host/lib -Wl,-rpath,/home/george/plutosdr-fw/buildroot/output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-as" DEFAULT_LINKER="/home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os " LDFLAGS="" FCFLAGS=" -Os " FFLAGS=" -Os " PKG_CONFIG="/home/george/plutosdr-fw/buildroot/output/host/bin/pkg-config" STAGING_DIR="/home/george/plutosdr-fw/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot" INTLTOOL_PERL=/usr/bin/perl ac_cv_lbl_unaligned_fail=yes ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_memcmp_working=yes ac_cv_have_decl_malloc=yes gl_cv_func_malloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes ac_cv_func_calloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes lt_cv_sys_lib_search_path_spec="" ac_cv_c_bigendian=no CONFIG_SITE=/dev/null ./configure --target=arm-buildroot-linux-gnueabihf --host=arm-buildroot-linux-gnueabihf --build=x86_64-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --program-prefix="" --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no --disable-dependency-tracking --enable-ipv6 --disable-nls --disable-static --enable-shared --disable-fortran --disable-single --disable-long-double --disable-quad-precision --disable-sse --disable-sse2 --disable-neon --enable-threads --with-combined-threads --disable-openmp CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os " )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-gtk-doc-html, --disable-docs, --disable-documentation, --with-xmlto, --with-fop, --enable-ipv6, --disable-nls
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-buildroot-linux-gnueabihf-strip... /home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... arm-buildroot-linux-gnueabihf
checking for arm-buildroot-linux-gnueabihf-gcc... /home/george/plutosdr-fw/buildroot/output/host/bin/arm-linux-gnueabihf-gcc
checking whether the C compiler works... no
configure: error: in `/home/george/plutosdr-fw/buildroot/output/build/fftw-3.3.7':
configure: error: C compiler cannot create executables
See `config.log' for more details
package/pkg-generic.mk:211: recipe for target '/home/george/plutosdr-fw/buildroot/output/build/fftw-3.3.7/.stamp_configured' failed
make[2]: *** [/home/george/plutosdr-fw/buildroot/output/build/fftw-3.3.7/.stamp_configured] Error 77
Makefile:79: recipe for target '_all' failed
make[1]: *** [_all] Error 2
make[1]: Leaving directory '/home/george/plutosdr-fw/buildroot'
Makefile:91: recipe for target 'buildroot/output/images/rootfs.cpio.gz' failed
make: *** [buildroot/output/images/rootfs.cpio.gz] Error 2

I have not been able to fix this. If i go to /opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin

and use the 'file' command george@LAPTOP-LGQGTOAE:/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin$ file arm-linux-gnueabihf-gcc

I get this result: arm-linux-gnueabihf-gcc: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=cd21eee65126f75334ef35233218c51374367fd6, not stripped

Which i believe is causing the problem. Why would aarch32/lin/ggc-arm-linus-gnueabi have 64-bit executables in it? I am stumped, please help! 



font and colors
[edited by: paxtakor2265 at 1:24 AM (GMT -5) on 9 Nov 2018]
  • I got past the errors above but hit a new obstacle: 

    >>> Generating root filesystem image rootfs.cpio
    rm -rf /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs
    mkdir -p /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs
    if [ ! -e /home/george/plutosdr-fw/buildroot/output/target/init ]; then /usr/bin/install -m 0755 fs/cpio/init /home/george/plutosdr-fw/buildroot/output/target/init; fi
    echo '#!/bin/sh' > /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/fakeroot.fs
    echo "set -e" >> /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/fakeroot.fs
    echo "chown -h -R 0:0 /home/george/plutosdr-fw/buildroot/output/target" >> /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/fakeroot.fs
    printf ' avahi -1 avahi -1 * - - -\n dbus -1 dbus -1 * /var/run/dbus - dbus DBus messagebus user\n\n' >> /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/users_table.txt
    PATH="/home/george/plutosdr-fw/buildroot/output/host/bin:/home/george/plutosdr-fw/buildroot/output/host/sbin:/bin:/usr/bin:/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin:/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin:/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin" /home/george/plutosdr-fw/buildroot/support/scripts/mkusers /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/users_table.txt /home/george/plutosdr-fw/buildroot/output/target >> /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/fakeroot.fs
    cat system/device_table.txt > /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/device_table.txt
    printf ' /bin/busybox f 4755 0 0 - - - - -\n /usr/libexec/dbus-daemon-launch-helper f 4755 0 0 - - - - -\n /dev/console c 622 0 0 5 1 - - -\n\n' >> /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/device_table.txt
    echo "/home/george/plutosdr-fw/buildroot/output/host/bin/makedevs -d /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/device_table.txt /home/george/plutosdr-fw/buildroot/output/target" >> /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/fakeroot.fs
    printf ' cd /home/george/plutosdr-fw/buildroot/output/target && find . | cpio --quiet -o -H newc > /home/george/plutosdr-fw/buildroot/output/images/rootfs.cpio\n' >> /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/fakeroot.fs
    chmod a+x /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/fakeroot.fs
    rm -f /home/george/plutosdr-fw/buildroot/output/target/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
    PATH="/home/george/plutosdr-fw/buildroot/output/host/bin:/home/george/plutosdr-fw/buildroot/output/host/sbin:/bin:/usr/bin:/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin:/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin:/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin" /home/george/plutosdr-fw/buildroot/output/host/bin/fakeroot -- /home/george/plutosdr-fw/buildroot/output/build/buildroot-fs/fakeroot.fs
    fakeroot, while creating message channels: Function not implemented
    This may be due to a lack of SYSV IPC support.
    fakeroot: error while starting the `faked' daemon.
    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
    fs/cpio/cpio.mk:43: recipe for target '/home/george/plutosdr-fw/buildroot/output/images/rootfs.cpio' failed
    make[2]: *** [/home/george/plutosdr-fw/buildroot/output/images/rootfs.cpio] Error 1
    Makefile:79: recipe for target '_all' failed
    make[1]: *** [_all] Error 2
    make[1]: Leaving directory '/home/george/plutosdr-fw/buildroot'
    Makefile:91: recipe for target 'buildroot/output/images/rootfs.cpio.gz' failed
    make: *** [buildroot/output/images/rootfs.cpio.gz] Error 2

    Found this online: https://superuser.com/questions/1236338/a-workaround-which-lets-you-use-mk-build-deps-and-fakeroot-on-the-windows-li

    But it does not help. Still getting the same error. Please help!

  • Got around this by doing 

    https://superuser.com/questions/1236338/a-workaround-which-lets-you-use-mk-build-deps-and-fakeroot-on-the-windows-li

    &

    cp /usr/bin/fakeroot /home/george/plutosdr-fw/buildroot/output/host/bin

    New problem:

    bash -c "source /opt/Xilinx/Vivado/2017.4/settings64.sh && xsdk -batch -source scripts/create_fsbl_project.tcl"
    INFO: [Hsi 55-1698] elapsed time for repository loading 0 seconds
    Starting xsdk. This could take few seconds... Eclipse:
    GTK+ Version Check
    Eclipse:
    An error has occurred. See the log file
    /home/george/plutosdr-fw/build/sdk/.metadata/.log.
    timeout while establishing a connection with SDK
    while executing
    "error "timeout while establishing a connection with SDK""
    (procedure "getsdkchan" line 111)
    invoked from within
    "getsdkchan"
    (procedure "::sdk::createhw" line 26)
    invoked from within
    "sdk createhw -name hw_0 -hwspec build/system_top.hdf"
    (file "scripts/create_fsbl_project.tcl" line 5)
    Makefile:119: recipe for target 'build/sdk/hw_0/system_top.bit' failed
    make: *** [build/sdk/hw_0/system_top.bit] Error 1
    rm linux/arch/arm/boot/dts/zynq-pluto-sdr-revc.dtb linux/arch/arm/boot/dts/zynq-pluto-sdr.dtb linux/arch/arm/boot/dts/zynq-pluto-sdr-revb.dtb

    and running  export SWT_GTK3=0 before make does not work.

    Any suggestions? Thank you!