Omega2+ Cross Compilation on Ubuntu 18.04 LEDE Build failing



  • @Carst-Dan
    It's impossible to know why the build fails without seeing the error. You shouldn't have to post the entire build output since make will usually terminate on a fatal error, so the last lines from where the error is reported up until the shell prompt should be sufficient.

    My usual suggestion is for people to use the Onion docker container to do their initial build. This allows you (usually) a working completed build, so you can have confidence that the source builds correctly. Thereafter, you can go in and make modifications from a known working base to which you can always revert in the case of future build failures.

    With the wide variety of configuration choices, it's not always possible to identify the true source of an error when building within your own environment.

    Not preaching, just food for thought if you continue to get build errors that you aren't able to resolve.



  • Thanks, trying docker.



  • Unfortunately there was no download link for ubuntu on docker website (only windows and mac), so
    i used
    sudo apt install docker.io
    to install it. Installation process works fine, but make returns an error again.
    Make-Debug fails too. See below.

    root@6f1e6fb7d4da:~/source# make -j1 V=s
    WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!
    make[1]: Entering directory '/root/source'
    make[2]: Entering directory '/root/source'

    • mkdir -p /root/source/staging_dir/target-mipsel_24kc_musl-1.1.16
    • cd /root/source/staging_dir/target-mipsel_24kc_musl-1.1.16
    • mkdir -p bin lib include stamp
      mkdir -p /root/source/build_dir/target-mipsel_24kc_musl-1.1.16/stamp
      touch /root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/.prepared
    • mkdir -p /root/source/staging_dir/host
    • cd /root/source/staging_dir/host
    • mkdir -p bin lib include stamp
      mkdir -p /root/source/build_dir/host/stamp /root/source/staging_dir/host/include/sys
      install -m0644 /root/source/tools/include/.h /root/source/staging_dir/host/include/
      install -m0644 /root/source/tools/include/sys/
      .h /root/source/staging_dir/host/include/sys/
      ln -sf lib /root/source/staging_dir/host/lib64
      touch /root/source/staging_dir/host/.prepared
      make[3]: Entering directory '/root/source/tools/flock'
      make[3]: Leaving directory '/root/source/tools/flock'
      make[3]: Entering directory '/root/source/tools/flock'
      make[3]: Leaving directory '/root/source/tools/flock'
      make[3]: Entering directory '/root/source/tools/sed'
      mkdir -p /root/source/dl
      SHELL= flock /root/source/tmp/.sed-4.2.2.tar.bz2.flock -c ' /root/source/scripts/download.pl "/root/source/dl" "sed-4.2.2.tar.bz2" "f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7" "" "@GNU/sed" '
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20539 milliseconds
      Download failed.
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20535 milliseconds
      Download failed.
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20537 milliseconds
      Download failed.
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20532 milliseconds
      Download failed.
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20545 milliseconds
      Download failed.
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20543 milliseconds
      Download failed.
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20546 milliseconds
      Download failed.
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20539 milliseconds
      Download failed.
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20543 milliseconds
      Download failed.
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20545 milliseconds
      Download failed.
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 1 seconds. 5 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 2 seconds. 4 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 4 seconds. 3 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 8 seconds. 2 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      Warning: Transient problem: timeout Will retry in 16 seconds. 1 retries left.
      0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
      curl: (28) Resolving timed out after 20539 milliseconds
      Download failed.
      No more mirrors to try - giving up.
      Makefile:46: recipe for target '/root/source/dl/sed-4.2.2.tar.bz2' failed
      make[3]: *** [/root/source/dl/sed-4.2.2.tar.bz2] Error 2
      make[3]: Leaving directory '/root/source/tools/sed'
      tools/Makefile:147: recipe for target 'tools/sed/compile' failed
      make[2]: *** [tools/sed/compile] Error 2
      make[2]: Leaving directory '/root/source'
      tools/Makefile:145: recipe for target '/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny' failed
      make[1]: *** [/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
      make[1]: Leaving directory '/root/source'
      /root/source/include/toplevel.mk:198: recipe for target 'world' failed
      make: *** [world] Error 2


  • @Carst-Dan
    Did you follow the Docker instructions from here and also update the build system?

    I don't know your setup, but since you mention you installed docker on Ubuntu, does this mean you are running docker within virtual box? If so, I'm not sure if that works or is a good idea...
    You should probably try using docker on your native OS, be it Windows, Mac or Linux.

    But with respect to your errors, make is not able to download the necessary files (for sed in this case).
    This points to transient network problems between your build environment and the Internet. Due to unstable Internet connectivity, I get that same problem sometimes. To resolve it requires repeatedly running make after make after make, each one progressing a bit further into the process each time until it builds successfully.

    Of course you should check and confirm that you have an operational Internet connection from within your build environment, otherwise you will make forever to no avail.



  • Thanks for the fast reply.

    Yes, i followed the instuctions from the mentioned link.
    Yes, my Ubuntu runs in virtual box and so docker runs too.
    Unfortunately the actual docker version runs only on win 10, I'am using win 7.
    The network connection of the Ubuntu system is totally ok.

    By the way, it's not clear to me how to integrate the resulting toolchain of the docker procedure in an IDE like eclipse.
    For the direct linux procedure exists a manual from mediatek.
    So i would normally perfer the linux procedure.
    I think this is a lack in onion docs.

    At moment i am contacting some colleagues, maybe they can help.

    Thanks for first !



  • See my question: http://community.onion.io/topic/3446/can-t-build-lede-under-linux

    I finally got it working with Ubuntu 17.10 and a dynamic VM with an initial 30gB size with 8gB RAM. It was building for 4 hours before I went to bed, but had finally completed by the morning.

    I feel that Onion ought to provide standard VM/Dockers for us to download



  • @Carst-Dan

    Unfortunately the actual docker version runs only on win 10, I'am using win 7.

    If you decide to follow the docker route any further, they do provide Docker Toolbox for older systems Docker Toolbox overview

    At moment i am contacting some colleagues, maybe they can help.

    Ok, best of luck, I hope that you are successful. But if not, we can always keep exploring options here.



  • @mawg

    I feel that Onion ought to provide standard VM/Dockers for us to download

    I haven't seen a VM, but there is a standard docker image available via:

    docker pull onion/omega2-source
    

    Or did I misunderstand and you meant something different?



  • Sounds great! Thanks. I have never user Dicker; seems like it's time to learn :-)



  • I followed mawg's suggestion and compiled the latest stable release on Ubuntu 17.10. This works, but the the git-version did not.
    I think i can live with this little disadvantage for the first.

    Thanks !!!



  • I spent a week trying different configurations to solve this issue, the two main docker platforms I list below:

    1. Windows 10 running linux docker container
    2. Ubuntu 18.04 LTS running linux docker container

    The final result on both platforms were consistent:

    1. libwebsockets.h not found error
    2. Mosquitto build fails
    3. Not enough space available on the container

    Workarounds (note: this works on a failed container):

    1. Increase the default docker container size allocated by the docker daemon form 20Gb to 40Gb. I found the final build is 20.7Gb total and takes about 7 hours on Windows and 4 hours on Ubuntu...Give or take. This is done by modifying the docker daemon.json file.
    docker attach <container ID>  (note: CTRL-p CTRL-Q to SIGKILL)
    
    1. Attach to the docker container and use VIM to modify the .config file and:
      a. Search for all instances of the keyword "mosquitto" and comment them out from the build configuration. If you need mosquitto, you'll have to find another way around the issue.
      note: I recommend addding the "is not used" value after commenting out the line
    vim .config
    
    make menuconfig
    
    1. Either run make menuconfig to add libwebsockets library and the libwesockets examples to the build configuration. Or while you're modifying the .config file, do a search using VIM for libwebsockets and add the library and examples to the build.
      note: I built libwebsockets library by [using an * in menuconfig or =y in .config they are accomplishing the same thing] and set the libwebsockets examples [M in menuconfig or =m in .config]
    make -j1 V=s
    
    1. Run make [options] inside of the attached container. Docker automatically creates several intermediate containers when necessary and I found that using a Dockerfile can be problematic for Cross-Compile build process.

    Optional Build: use my Dockerfile

    This workaround definitely builds on Windows 10 and Ubuntu 18.04 but it's not for the faint of heart!

    Happy Hacking!


Log in to reply
 

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