Bug 13902

Summary: Compile failure for qemu-system-native on autobuilder oe_selftest runs
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Steve Sakoman <steve>
Component: coreAssignee: Unassigned <unassigned>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: meta.mr.watcher, meta.watcher
Version: 3.1   
Target Milestone: ---   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Steve Sakoman 2020-05-17 09:08:10 UTC
Somewhat intermittent, but occurring more often than not:

In file included from /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-18265/reproducibleB/tmp/work/x86_64-linux/qemu-system-native/4.2.0-r0/qemu-4.2.0/include/qemu/timer.h:4,
                 from /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-18265/reproducibleB/tmp/work/x86_64-linux/qemu-system-native/4.2.0-r0/qemu-4.2.0/include/qemu/timed-average.h:29,
                 from /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-18265/reproducibleB/tmp/work/x86_64-linux/qemu-system-native/4.2.0-r0/qemu-4.2.0/include/block/accounting.h:28,
                 from /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-18265/reproducibleB/tmp/work/x86_64-linux/qemu-system-native/4.2.0-r0/qemu-4.2.0/include/block/block_int.h:27,
                 from /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-18265/reproducibleB/tmp/work/x86_64-linux/qemu-system-native/4.2.0-r0/qemu-4.2.0/block/file-posix.c:30:
/usr/include/linux/swab.h: In function â__swabâ:
/home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-18265/reproducibleB/tmp/work/x86_64-linux/qemu-system-native/4.2.0-r0/qemu-4.2.0/include/qemu/bitops.h:20:34: warning: "sizeof" is not defined, evaluates to 0 [-Wundef]
 #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
                                  ^~~~~~
/home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-18265/reproducibleB/tmp/work/x86_64-linux/qemu-system-native/4.2.0-r0/qemu-4.2.0/include/qemu/bitops.h:20:41: error: missing binary operator before token "("
 #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
                                         ^
  CC      block/io.o
  CC      block/create.o
make: *** [/home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-18265/reproducibleB/tmp/work/x86_64-linux/qemu-system-native/4.2.0-r0/qemu-4.2.0/rules.mak:69: block/file-posix.o] Error 1
make: *** Waiting for unfinished jobs....
WARNING: exit code 1 from a shell command.
Comment 2 Steve Sakoman 2020-05-17 09:14:57 UTC
Some discussion of this issue on launchpad.net over the past week:

https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1847361
Comment 3 Steve Sakoman 2020-05-21 07:12:57 UTC
Problem was traced to a bug in the headers /usr/include/linux/swab.h of linux-libc-dev on the build machine:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1877123

Issue has now been fixed upstream and autobuilders are updated.
Comment 4 Steve Sakoman 2020-05-21 07:13:51 UTC
See previous comment