Building from poky the raspberry pi2 qt4 demo or any other raspberry pi demo. Can go directly from a clean build and still fails. This succeeds on other hosts but fails for some reason on my Ubuntu 14.04 host. I have no clue why it passes wrong amount of parameters to the fcntl2.h open call. DEBUG: Executing shell function do_compile NOTE: make -j 8 gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/closure.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/error.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/graph.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/lalr.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/lr0.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/main.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/mkpar.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/mstring.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/output.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/reader.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/yaccpar.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/symtab.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/verbose.c gcc -c -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -I. -I/media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711 -DHAVE_CONFIG_H -DYYPATCH=`cat /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/VERSION` -isystem/media/lars/Data/rpi2/build/tmp/sysroots/x86_64-linux/usr/include -D_GNU_SOURCE /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/warshall.c In file included from /usr/include/fcntl.h:279:0, from /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/main.c:16: In function 'open', inlined from 'my_mkstemp' at /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/main.c:529:5, inlined from 'open_tmpfile' at /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/byacc-20150711/main.c:588:5: /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments __open_missing_mode (); ^ make: *** [main.o] Error 1 make: *** Waiting for unfinished jobs.... WARNING: exit code 1 from a shell command. ERROR: oe_runmake failed ERROR: Function failed: do_compile (log file is located at /media/lars/Data/rpi2/build/tmp/work/x86_64-linux/byacc-native/20150711-r0/temp/log.do_compile.11051)
I believe Ubuntu passes hardening flags by default which is exposing a bug in byacc.
Yes, https://wiki.ubuntu.com/ToolChain/CompilerFlags.
I'm guessing there must be something weird about the raspberry pi layer that is making this happen as I can't replicate it with base poky...
Fixed in oe-core f906c5eb722de07eb09858fd058eb7e20103df71.
Verified on master: no compiler errors: 1b25a70991589ed1f123015c16ee4806c46e3199 bitbake rpi-basic-image Parsing recipes: 100% |##########################################################################################################################################################| Time: 00:00:19 Parsing of 907 .bb files complete (0 cached, 907 parsed). 1332 targets, 59 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "1.28.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Ubuntu-14.04" TARGET_SYS = "arm-poky-linux-gnueabi" MACHINE = "raspberrypi2" DISTRO = "poky" DISTRO_VERSION = "2.0" TUNE_FEATURES = "arm armv7a vfp thumb neon callconvention-hard vfpv4 cortexa7" TARGET_FPU = "vfp-vfpv4-neon" meta meta-yocto meta-yocto-bsp = "master:1b25a70991589ed1f123015c16ee4806c46e3199" meta-raspberrypi = "master:0776b86c6629b7294ff61e67609f2d4e10e9712c" lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS Release: 14.04 Codename: trusty