Error compiling the kernel



  • Hey guys,

    I followed the official youtube video talking about compiling the kernel using docker.

    Unfortunately, I'm unable to do so.

    I get the following error after a while :

    make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
    /root/source/include/toplevel.mk:198: recipe for target 'world' failed
    make: *** [world] Error 1

    I've tried various option, but none of them work.

    Does anyway know what I'm doing wrong?



  • Hi Nick,

    I saw exactly the same thing.
    I ran make -j1 V=s as advised by the error message and saw that the error was in i2c-exp-driver:

    .
    .
    .
    make[3]: Entering directory '/root/source/feeds/onion/i2c-exp-driver'
    make -C /root/source/build_dir/target-mipsel_24kc_musl-1.1.16/i2c-exp-driver CC="mipsel-openwrt-linux-musl-gcc" CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -iremap /root/source/build_dir/target-mipsel_24kc_musl-1.1.16/i2c-exp-driver:i2c-exp-driver -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -fpic" LDFLAGS="-L/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/usr/lib -L/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/lib -L/root/source/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/lib -L/root/source/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/lib -znow -zrelro" LIB="-l m" PYINC=""-I/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/usr/include/python"2.7"/""
    make[4]: Entering directory '/root/source/build_dir/target-mipsel_24kc_musl-1.1.16/i2c-exp-driver'
    **makefile:210: *** "PYTHON_VERSION variable is not set".  Stop.**
    make[4]: Leaving directory '/root/source/build_dir/target-mipsel_24kc_musl-1.1.16/i2c-exp-driver'
    Makefile:339: recipe for target '/root/source/build_dir/target-mipsel_24kc_musl-1.1.16/i2c-exp-driver/.built' failed
    make[3]: *** [/root/source/build_dir/target-mipsel_24kc_musl-1.1.16/i2c-exp-driver/.built] Error 2
    make[3]: Leaving directory '/root/source/feeds/onion/i2c-exp-driver'
    package/Makefile:105: recipe for target 'package/feeds/onion/i2c-exp-driver/compile' failed
    make[2]: *** [package/feeds/onion/i2c-exp-driver/compile] Error 2
    make[2]: Leaving directory '/root/source'
    package/Makefile:101: recipe for target '/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.package_compile' failed
    make[1]: *** [/root/source/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.package_compile] Error 2
    make[1]: Leaving directory '/root/source'
    /root/source/include/toplevel.mk:198: recipe for target 'world' failed
    make: *** [world] Error 2
    

    In other words, the build for i2x-exp-driver wants to know the installed Python version but this information is not available due to PYTHON_VERSION not being defined. I don't know how to fix that.

    I pressed on anyway, running

    ~/source#: **make clean**
    ~/source#: **git clean -dxf**
    ~/source#: **git pull**
    ~/source#: **make**
    

    and the build ran to completion.

    HOWEVER ...

    I then tried downloading and building the "cross-compile" example from [https://onion.io/2bt-c-program-cross-compiling-video-tutorial/] but it failed because the Onion/LEDE build environment does not include libugpio (or, not after my git clean, anyway).

    At this point I suspect that the Onion/LEDE environment in the Docker container is broken (i2c-exp-driver does not build), and it includes code which is not part of the corresponding Git repository (e.g. libugpio).

    Both of those need to be fixed. Being on the bleeding edge can be "fun" but it's very frustrating if the very basics don't work!



  • I did not use the Docker but i am using build system on seperate machines, in virtual machine it takes about 4 hours full compile process (i5-4210U cpu), other than that on a DigitalOcean 32CPU machine 20minutes.
    You can try if you want this way. Here is the compile machine and process. http://community.onion.io/topic/3056/omega2-omega2plus-image-build-process-for-fbtft-frame-buffer-tftlcd-devices

    it is not the same but this is a errorless compile machine setup that tested!0_1537349092951_cdc0c77c-95fd-4ef5-8f76-3644a6743a31-image.png

    P.S: I coud not create time for update the topic, installing node part; just "argon" is enough don't install others. On KernelMenuConfig you can pass append staging drivers, those are for tftlcd display.

    nvm install lts/argon
    npm install -g node-gyp
    

    and be careful the make download and stay connected with the internet. There should be no problem.



  • @Jeremy-Begg

    I have a same issue. Did you solve the problem?


  • administrators

    The Fix:

    Run ./scripts/feeds update onion and run the compile again. This will fix the compilation error.

    Root Cause:

    This issue was caused by a change in the i2c-exp-driver makefile. It now uses a PYTHON_VERSION variable since we compile it for Python3 as well as Python2.
    The error you've observed is caused by trying to build the new code with the old package makefile. The command above will update the package makefiles for the entire Onion feed, resolving this issue.

    Build System Documented

    Check out the Omega2 Build System repo Readme on Github, I've updated it to have initial setup, updating, and debugging instructions.

    Docker Container Updated

    We've also updated the onion/omega2-source Docker container to the latest b196 build:
    https://hub.docker.com/r/onion/omega2-source/

    Happy hacking!



  • @Lazar-Demin Thank you! I'll try again.


Log in to reply
 

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