kraj / meta-altera

Old Altera BSP layer for OpenEmbedded/Yocto Project ( please use https://github.com/altera-opensource/meta-intel-fpga-refdes)
MIT License
47 stars 58 forks source link

u-boot-socfpga_2014.10 broken with poky master (arria10) #42

Closed gizero closed 7 years ago

gizero commented 7 years ago

While crafting #41 I checked if the same issue applied to u-boot-socfpga_2014.10 also, which is the preferred version for arria10 machine. This is not the case since it re-defines all the variable that have been moved out of u-boot.inc, but I noticed that u-boot-socfpga_2014.10 is broken anyway. I did some bisecting on poky repo and it seems that the commit to blame is 239efccccaa74912b3fc9ec717e93f528e2c3836 which bumps GCCVERSION. I'm not very familiar with arria10 and the error gcc is throwing, hence I'm filing this ticket for people more involved.

kraj commented 7 years ago

can you post the error message that you are seeing ?

gizero commented 7 years ago

This is the log when baking virtual/bootloader...

Build Configuration:
BB_VERSION        = "1.32.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "arria10"
DISTRO            = "poky"
DISTRO_VERSION    = "2.2"
TUNE_FEATURES     = "arm armv7a vfp  neon"
TARGET_FPU        = "softfp"
meta
meta-poky
meta-yocto-bsp    = "master:927ed6cbefbaea2905919e158ceda9546e3e710e"
meta-altera       = "master:c56e9935de14385e03e8af6a3221b1f158ce4f0a"

Initialising tasks: 100% |###################################################| Time: 0:00:00
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: u-boot-socfpga-2014.10-r0 do_compile: oe_runmake failed
ERROR: u-boot-socfpga-2014.10-r0 do_compile: Function failed: do_compile (log file is located at /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/
2014.10-r0/temp/log.do_compile.25668)
ERROR: Logfile of failure stored in: /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/temp/log.do_compile.25668
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 1 CROSS_COMPILE=arm-poky-linux-gnueabi- CC=arm-poky-linux-gnueabi-gcc  --sysroot=/home/gizero/work/upstreaming/build2/tmp/sysroots/arria10 V=1 HOSTCC=gcc  -isystem/home/
gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -L/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -L/home/gizero/work/upstreaming/b
uild2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/home/gizero/work/upstreaming/build2/tmp/sysro
ots/x86_64-linux/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/lib -Wl,
-O1 -C /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git O=/home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/
u-boot-socfpga/2014.10-r0/build socfpga_arria10_defconfig
| NOTE: make -j 1 CROSS_COMPILE=arm-poky-linux-gnueabi- CC=arm-poky-linux-gnueabi-gcc  --sysroot=/home/gizero/work/upstreaming/build2/tmp/sysroots/arria10 V=1 HOSTCC=gcc  -isystem/home/
gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -L/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -L/home/gizero/work/upstreaming/b
uild2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/home/gizero/work/upstreaming/build2/tmp/sysro
ots/x86_64-linux/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/lib -Wl,
-O1 -C /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git O=/home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/
u-boot-socfpga/2014.10-r0/build all
| make: Entering directory `/home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git'
| make -C /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/build \
|       KBUILD_SRC=/home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git \
|       KBUILD_EXTMOD="" -f /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/Makefile \
|       socfpga_arria10_defconfig
| make -f /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/Makefile.build obj=scripts/basic
|   gcc  -isystem/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -L/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -L/home/gi
zero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/home/gizero/work/upstr
eaming/build2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroot
s/x86_64-linux/lib -Wl,-O1 -Wp,-MD,scripts/basic/.fixdep.d -Iscripts/basic -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/basic/fixdep /home/gizero/work/upstreaming/build
2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/basic/fixdep.c
| rm -f .tmp_quiet_recordmcount
| ln -fsn /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git source
| /bin/bash /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/mkmakefile \
|           /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnuea
bi/u-boot-socfpga/2014.10-r0/build 2014 10
|   GEN     /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/build/Makefile
| /bin/bash /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/multiconfig.sh socfpga_arria10_defconfig
|   gcc  -isystem/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -L/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -L/home/gi
zero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/home/gizero/work/upstr
eaming/build2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroot
s/x86_64-linux/lib -Wl,-O1 -Wp,-MD,scripts/kconfig/.conf.o.d -Iscripts/kconfig -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o scripts/kconf
ig/conf.o /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/kconfig/conf.c
|   cat /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/kconfig/zconf.tab.c_shipped > scripts/kconfig/zconf.tab.c
|   cat /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/kconfig/zconf.lex.c_shipped > scripts/kconfig/zconf.lex.c
|   cat /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/kconfig/zconf.hash.c_shipped > scripts/kconfig/zconf.hash.c
|   gcc  -isystem/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -L/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -L/home/gi
zero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/home/gizero/work/upstr
eaming/build2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroot
s/x86_64-linux/lib -Wl,-O1 -Wp,-MD,scripts/kconfig/.zconf.tab.o.d -Iscripts/kconfig -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DCURSES_LOC="<ncurses.h>" -DLOCALE  -I/home/gizer
o/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/kconfig -Iscripts/kconfig -c -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab
.c
|   gcc  -isystem/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -L/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -L/home/gi
zero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/home/gizero/work/upstr
eaming/build2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/home/gizero/work/upstreaming/build2/tmp/sysroot
s/x86_64-linux/lib -Wl,-O1  -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/zconf.tab.o
| scripts/kconfig/conf --defconfig=arch/../configs/.tmp_defconfig Kconfig
| #
| # configuration written to .config
| #
| make: Leaving directory `/home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git'
| make: Entering directory `/home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git'
| make -C /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/build \
|       KBUILD_SRC=/home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git \
|       KBUILD_EXTMOD="" -f /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/Makefile \
|       all
| make -f /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/Makefile silentoldconfig
| make -f /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/Makefile.build obj=scripts/basic
| rm -f .tmp_quiet_recordmcount
| ln -fsn /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git source
| /bin/bash /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/mkmakefile \
|           /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnuea
bi/u-boot-socfpga/2014.10-r0/build 2014 10
|   GEN     /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/build/Makefile                                                    [7/1270]
| /bin/bash /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/multiconfig.sh silentoldconfig
| mkdir -p include/config include/generated
| scripts/kconfig/conf --silentoldconfig Kconfig
| mkdir -p include/asm
| ln -fsn /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/arch/arm/include/asm/arch-socfpga_arria10 \
|               include/asm/arch
| set -e; : '  CHK     include/config.h'; mkdir -p include/;    (echo "/* Automatically generated - do not edit */"; for i in $(echo "" | sed 's/,/ /g'); do echo \#define CONFIG_$i | se
d '/=/ {s/=/   /;q; } ; { s/$/ 1/; }'; done; echo \#define CONFIG_BOARDDIR board/altera/socfpga_arria10; echo \#include \<config_defaults.h\>; echo \#include \<configs/"socfpga_arria10"
.h\>; echo \#include \<asm/config.h\>; echo \#include \<config_fallbacks.h\>; echo \#include \<config_uncmd_spl.h\>; ) < /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux
-gnueabi/u-boot-socfpga/2014.10-r0/git/scripts/Makefile.autoconf > include/config.h.tmp; if [ -r include/config.h ] && cmp -s include/config.h include/config.h.tmp; then rm -f include/c
onfig.h.tmp; else : '  UPD     include/config.h'; mv -f include/config.h.tmp include/config.h; fi
| ERROR: oe_runmake failed
|   arm-poky-linux-gnueabi-gcc  --sysroot=/home/gizero/work/upstreaming/build2/tmp/sysroots/arria10 -E -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -D__KER
NEL__ -D__UBOOT__  -D__ARM__ -marm -mno-thumb-interwork  -mabi=aapcs-linux  -mword-relocations  -march=armv7-a  -mno-unaligned-access  -ffunction-sections -fdata-sections -fno-common -f
fixed-r9  -msoft-float  -I/board/ -pipe -Iinclude -Iinclude  -I/home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/include -I/home/giz
ero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/arch/arm/include -include /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-
gnueabi/u-boot-socfpga/2014.10-r0/git/include/linux/kconfig.h  -nostdinc -isystem /home/gizero/work/upstreaming/build2/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-p
oky-linux-gnueabi/6.2.0/include -DDO_DEPS_ONLY -dM /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/include/common.h > include/auto
conf.mk.tmp && { sed -n -f /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/tools/scripts/define2mk.sed include/autoconf.mk.tmp | w
hile read line; do if ! grep -q "${line%=*}=" include/config/auto.conf; then echo "$line"; fi done > include/autoconf.mk; rm include/autoconf.mk.tmp; } || { rm include/autoconf.mk.tmp;
false; }
| In file included from /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/include/linux/compiler.h:54:0,
|                  from /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/include/linux/byteorder/little_endian.h:12,
|                  from /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/arch/arm/include/asm/byteorder.h:29,
|                  from /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/arch/arm/include/asm/io.h:26,
|                  from include/asm/arch/clock_manager.h:11,
|                  from /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/include/configs/socfpga_arria10.h:11,
|                  from include/config.h:4,
|                  from /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/include/common.h:18:
| /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git/include/linux/compiler-gcc.h:114:30: fatal error: linux/compiler-gcc6.h: No such
 file or directory
|  #include gcc_header(__GNUC__)
|                               ^
| compilation terminated.
| make[3]: *** [include/autoconf.mk] Error 1
| make[2]: *** [silentoldconfig] Error 1
| make[1]: *** No rule to make target `include/config/auto.conf', needed by `include/config/uboot.release'.  Stop.
| make: *** [sub-make] Error 2
| make: Leaving directory `/home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/git'
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/gizero/work/upstreaming/build2/tmp/work/arria10-poky-linux-gnueabi/u-boot-socfpga/2014.10-r0/temp/log.do_compile.25668
)
ERROR: Task (/home/gizero/work/upstreaming/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 393 tasks of which 387 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/gizero/work/upstreaming/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_2014.10.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
dwesterg commented 7 years ago

I have replicated this issue, the v2014.10 version of uboot does not currently support GCC6. It may be possible to patch this in as at this time arria10 is not supported in mainline uboot. For yocto I would suggest just setting your preferred compiled version to 5.3.

--dalon

kraj commented 7 years ago

Can be fixed with patch like https://github.com/Freescale/meta-fsl-arm/blob/master/recipes-bsp/u-boot/u-boot-ls1/fix-build-error-under-gcc6.patch

I will be willing to accept such a patch into layer.

dwesterg commented 7 years ago

fixed