Unable to build mainline u-boot error [checkgcc6]

Started by Backloz, October 23, 2018, 05:44:04 PM

Previous topic - Next topic

Backloz

Hello.
I purchased the A13-OLinuXino board. According to the instructions from your site https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/A13-build
I am trying to build the mainline u-boot and the linux kernel for A13-OLinuXino. I have Ubuntu 16.04.4 LTS installed on my computer.
During the build process of the u-boot, the following error occurs:

*** Your GCC is older than 6.0 and is not supported
arch / arm / config.mk: 66: recipe for target 'checkgcc6' failed
make: *** [checkgcc6] Error 1

Please advise how to fix this problem.

Melange

Maybe you can upgrade to Ubuntu 18.04.1 LTS (Bionic Beaver)? It comes with GCC 7.3.0 (see https://packages.ubuntu.com/bionic/gcc-7). From what I see your 16.04.4 LTS (Xenial Xerus) comes with GCC 5.3.1, and the error tells you that you'll need at least version 6 of it.

If you want to stick with 16.04.4 LTS then you should be able to install a newer GCC with one of these PPA's (Personal Package Archives): https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test?field.series_filter=xenial, however I do not use Ubuntu so good luck.

Backloz

Thanks for the help. I installed Ubuntu 04/18/1 LTS. GCC 7.3.0 solved all the problems with the compilation of u-boot. But now I have problems with building the kernel from the source a13-olinuxino-kernel_3.4.90. The following error occurs during the build process.

  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
In file included from include/linux/compiler.h:48:0,
                 from include/linux/stddef.h:4,
                 from include/linux/posix_types.h:4,
                 from include/linux/types.h:17,
                 from include/linux/page-flags.h:8,
                 from kernel/bounds.c:9:
include/linux/compiler-gcc.h:103:1: fatal error: linux/compiler-gcc7.h: No such file or directory
#include gcc_header(__GNUC__)
^~~~
compilation terminated.
~/a13-olinuxino-kernel_3.4.90/linux-sunxi/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:987: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2