Errors building source for cross development



  • I don't know why the problem occurred with the config file. I was using the work computer for the last attempt when I downloaded the .config file.

    I am back on my main machine where I have checked each time that I am using Media Ralink MIPS/MT76x8 based coards/Multiple Devices/Onion Omega 2 & Onion Omega 2.

    However, things have deteriorated on my main machine. I cant even get as far as I did previously. Here are the exact steps I have done using a clean install

    $ git clone https://github.com/OnionIoT/source.git
    $ cd source
    $ sh scripts/onion-feed-setup.sh
    $ sh scripts/onion-minimal-build.sh
    ( Also tried adding $ python scripts/onion-setup-build.py but same result)

    Edit: /usr/include/asm-generic/int-ll64.h line 31
    from: extension typedef unsigned long long __64;
    to: typedef uint64_t __64;
    This prevents errors with __u64 different typedef's

    $ make menuconfig
    Target System : MediaTek Ralink MIPS default
    Subtarget : MT76x8 based boards default
    Target Profile: Multiple Devices default
    Target Devices: Onion Omega2, Onion Omega2+ default

       Added: 
                   Development: gdb
                    Libraries: libgpiod
       Save and exit
    

    $ make -j1 V=s

    Error is:
    checking whether sleep is declared... no
    checking for socklen_t... no
    checking for socklen_t equivalent... configure: error: Cannot find a type to use in place of socklen_t
    make[3]: *** [Makefile:46: /home/lachlan/omega/source/build_dir/host/sed-4.5/.configured] Error 1
    make[3]: Leaving directory '/home/lachlan/omega/source/tools/sed'
    Command exited with non-zero status 2
    time: tools/sed/compile#10.72#3.68#13.83
    make[2]: *** [tools/Makefile:154: tools/sed/compile] Error 2
    make[2]: Leaving directory '/home/lachlan/omega/source'
    make[1]: *** [tools/Makefile:150: /home/lachlan/omega/source/staging_dir/target-mipsel_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyy] Error 2
    make[1]: Leaving directory '/home/lachlan/omega/source'
    make: *** [/home/lachlan/omega/source/include/toplevel.mk:218: world] Error 2

    The .config file is attached:
    config.bin

    Previously 'make' went way past this point.
    Dont know why the compile is failing even earlier than it did before on a clean 'git'



  • @Lachlan-Peter I built using your new config and it builds fine. I recall that when I upgraded my Ubuntu 18.x to 20 my build system broke and needed to install some additional stuff on my Ubuntu 20 system. I was able to identify the required stuff by working though the buld log. Alas I didn't record the steps because I have so many backups and images I never expect to do it again. If you send the entire build log I can probably work it out again for you.

    just run make clean, then make -j1 V=s > build.log, post the file and I will take a look.



  • I didnt see this previously as the errors scrolled off the page, but it seems that the errors are in
    $ sh scripts/onion-feed-setup.sh

    I get the following warnings when running scripts/onion-feed-setup.sh:
    WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
    WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
    WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
    WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
    WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
    WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
    WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
    WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist

    WARNING: No feed for package 'Onion-Console' found
    WARNING: No feed for package 'transmission-daemon' found
    WARNING: No feed for source package 'libuuid' found

    WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'Onion-Console', which does not exist
    WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'transmission-daemon', which does not exist
    WARNING: Makefile 'package/feeds/onion/zeromq/Makefile' has a build dependency on 'libuuid', which does not exist

    WARNING: bluez-examples not installed
    WARNING: bluez-libs not installed
    WARNING: bluez-utils not installed
    WARNING: pulseaudio-daemon not installed
    WARNING: pulseaudio-profiles not installed
    WARNING: pulseaudio-tools not installed
    Uninstalling package 'avrdude'
    Collecting package info: done
    WARNING: Makefile 'package/feeds/onion/arduino-dock/Makefile' has a dependency on 'avrdude', which does not exist
    WARNING: Makefile 'package/feeds/onion/arduino-dock/Makefile' has a dependency on 'avrdude', which does not exist

    I tried addressing this with the following but it did not work:
    $ sudo apt-get install libpam0g-dev libgnutls28-dev libldap2-dev libidn2-0-dev libssh2-1-dev liblzma-dev libnet-snmp-perl

    Im not sure if I need to provide these packages as architecture specific but I cant find mips versions of them



  • @Lachlan-Peter These warnings are usual. I need to see your complete build log.

    make -j1 V=s > build.log



  • build.bin
    I have added the build log.
    Note that it has started to fail much earlier in the build now (at the build of sed instead of findutils). This happens on two separate machines.
    Thanks for any insight.



  • @Lachlan-Peter The log you attached is not that of the verbose make, it looks like a standard make. Are you sure you are using the command I gave you?

    make -j1 V=s > build.log

    The log file will be large as it contains a lot of detail, so you probably need to zip it, but without it, I can't assist you further.



  • I have attached a zip file (you will need to change the extension from .bin) which contains two files.

    the build.log file is the file from :
    make -j1 V=s > build.log

    the build.terminal.log is a copy of the output on the terminal during the build process.

    Thanks
    build.bin



  • @Lachlan-Peter Can you post the output of make -v also gcc -v



  • lachlan@xps:~/omega/source$ make -v
    GNU Make 4.2.1
    Built for x86_64-pc-linux-gnu
    Copyright (C) 1988-2016 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    lachlan@xps:~/omega/source$ gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
    OFFLOAD_TARGET_NAMES=nvptx-none:hsa
    OFFLOAD_TARGET_DEFAULT=1
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
    Thread model: posix
    gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
    lachlan@xps:~/omega/source$



  • The above make and gcc details are from my work machine, not my main machine at home, but this has the same errors and is running 20.04.2 LTS the same as my home machine, and both are fully up-to-date and should be setup identical.

    Also, I notice in the output:
    "checking whether we are cross compiling... no"
    I would have though that we are cross compiling to build libraries for the omega?



  • Also I notice these warning in the output that relate directly to findutils. The following modules are present but are not usable, resulting in the 'bug' warning for 'findutils'.

    checking sys/param.h usability... no
    checking sys/socket.h usability... no
    checking dirent.h usability... no
    checking wctype.h usability... no
    checking stdio_ext.h usability... no
    checking sys/vfs.h usability... no
    checking netdb.h usability... no
    checking getopt.h usability... no
    checking sys/time.h usability... no
    checking wchar.h usability... no
    checking langinfo.h usability... no
    checking math.h usability... no
    checking sys/mman.h usability... no
    checking sys/statvfs.h usability... no
    checking malloc.h usability... no
    checking sys/uio.h usability... no
    checking sys/utsname.h usability... no
    checking sys/wait.h usability... no
    checking features.h usability... no
    checking arpa/inet.h usability... no
    checking netinet/in.h usability... no
    checking sys/select.h usability... no
    checking sys/ioctl.h usability... no

    configure: WARNING: xxxx: present but cannot be compiled
    configure: WARNING: xxxx: check for missing prerequisite headers?
    configure: WARNING: xxxx: see the Autoconf documentation
    configure: WARNING: xxxx: section "Present But Cannot Be Compiled"
    configure: WARNING: xxxx: proceeding with the compiler's result
    configure: WARNING: ## ------------------------------------ ##
    configure: WARNING: ## Report this to bug-findutils@gnu.org ##
    configure: WARNING: ## ------------------------------------ ##

    Regards



  • @Lachlan-Peter Try as I might I cannot recreate your issue, so maybe it is a good idea to go back to basics and see if this resolves your issue. Rename your existing source directory, or delete it if you have nothing there you want.

    To create a new build system use this list of commands and nothing else from your home directory:

    git clone https://github.com/OnionIoT/source.git
    cd source
    git checkout openwrt-18.06
    ./scripts/feeds clean
    ./scripts/feeds update -a
    ./scripts/feeds install -a

    sh scripts/onion-feed-setup.sh
    python scripts/onion-setup-build.py

    sh scripts/onion-minimal-build.sh

    vi build_dir/host/u-boot-2018.03/include/compiler.h //comment out line 69

    make -j9



  • Thanks for the information but I failed to get the build working with Ubuntu 20.4 .
    I started by updating the tools/findutils from 4.6.0 to 4.8.0 but soon decided to take another tack.

    I setup an Ubuntu 18.04 environment and the build worked fine using onion-minimal-build.sh. The standard build had lots of problems trying to find libraries related to stm32.

    I will keep a copy of the tool chain from 18.04 rather than trying to rebuild it with 20.4

    Thanks for your time and help.



  • @Lachlan-Peter what Ubuntu version are (were) you using? 20.??.??



  • I am building the source for cross development to Omega2/2+ from Ubuntu 20.4 but a number of errors occurs.

    Makefile:187: recipe for target 'alldig.o' failed
    make: *** [alldig.o] Error 1
    make: Leaving directory '/root/source/build_dir/target-mipsel_24kc_musl/postfix-3.3.0/src/util'
    Makefile:92: recipe for target 'update' failed
    make[4]: *** [update] Error 1
    make[4]: Leaving directory '/root/source/build_dir/target-mipsel_24kc_musl/postfix-3.3.0'
    Makefile:265: recipe for target '/root/source/build_dir/target-mipsel_24kc_musl/postfix-3.3.0/.built' failed
    make[3]: *** [/root/source/build_dir/target-mipsel_24kc_musl/postfix-3.3.0/.built] Error 2
    make[3]: Leaving directory '/root/source/feeds/packages/mail/postfix'
    Command exited with non-zero status 2
    time: package/feeds/packages/postfix/compile#0.12#0.04#0.18
    package/Makefile:107: recipe for target 'package/feeds/packages/postfix/compile' failed
    make[2]: *** [package/feeds/packages/postfix/compile] Error 2
    make[2]: Leaving directory '/root/source'
    package/Makefile:103: recipe for target '/root/source/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile' failed
    make[1]: *** [/root/source/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
    make[1]: Leaving directory '/root/source'
    /root/source/include/toplevel.mk:216: recipe for target 'world' failed
    make: *** [world] Error 2

    Does anyone know how I can fix this problem:
    I cannot find where in the make system this error comes from, so I cant determent the source of the problem.

    Any ideas would be well received



  • @Ioannis please run make -j 1 V=s and post the log, Ubuntu 20 needs a few tweaks to work correctly but the log will show me what you need to do.



  • @crispyoz I correct the issue with this commands :
    ./scripts/feeds update onion
    ./scripts/feeds update -a
    from this repository https://github.com/OnionIoT/source


Log in to reply
 

22 out of 29

Looks like your connection to Community was lost, please wait while we try to reconnect.