Bug 12519 - [2.2.3 rc2] ccache-native-3.2.5-r0: oe-runmake failed
Summary: [2.2.3 rc2] ccache-native-3.2.5-r0: oe-runmake failed
Status: CLOSED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.2.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2.4
Assignee: Armin Kuster
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-02-01 03:23 UTC by Aaron Chan
Modified: 2018-04-05 08:33 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Found by QA test)
Verified:
Documentation change: Don't know


Attachments
2.2.3 rc2 oe-selftest on Fedora26/27 (20.54 KB, application/octet-stream)
2018-02-01 03:23 UTC, Aaron Chan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Chan 2018-02-01 03:23:18 UTC
Created attachment 4191 [details]
2.2.3 rc2 oe-selftest on Fedora26/27

Description: 
Found Testcase 286: test_ccache_tool found to fail oe-runmake on Distro on Fedora 26/27 running task do_compile on recipe ccache-native-3.2.5-r0.

Build Configuration:
BB_VERSION        = "1.32.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "qemux86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "2.2.3"
TUNE_FEATURES     = "m64 core2"
TARGET_FPU        = ""
meta              
meta-poky         
meta-yocto-bsp    
meta-selftest     = "heads/morty:e6626951501cdf8c5516ad42fd585894f19c2327"

======================================================================
FAIL [16.430s]: test_ccache_tool (oeqa.selftest.buildoptions.ImageOptionsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora27/build/meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f
    return func(*args, **kwargs)
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora27/build/meta/lib/oeqa/selftest/buildoptions.py", line 35, in test_ccache_tool
    bitbake("ccache-native")
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora27/build/meta/lib/oeqa/utils/commands.py", line 136, in bitbake
    return runCmd(cmd, ignore_status, timeout, **options)
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora27/build/meta/lib/oeqa/utils/commands.py", line 114, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, result.output))
AssertionError: Command 'bitbake  ccache-native' returned non-zero exit status 1:


Issue was narrow down on the gcc compilation on statement define at murmurhashneutral2.c:39

gcc  -DHAVE_CONFIG_H -DSYSCONFDIR=/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora27/build/build/tmp/sysroots/x86_64-linux/etc -I. -I../git -isystem/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora27/build/build/tmp/sysroots/x86_64-linux/usr/include -MD -MP -MF .deps/snprintf.c.d -isystem/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora27/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -Wall -W -Werror -c -o snprintf.o ../git/snprintf.c
../git/murmurhashneutral2.c: In function ‘murmurhashneutral2’:
../git/murmurhashneutral2.c:39:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
  case 3: h ^= data[2] << 16;
          ~~^~~~~~~~~~~~~~~~
../git/murmurhashneutral2.c:40:2: note: here
  case 2: h ^= data[1] << 8;
  ^~~~
../git/murmurhashneutral2.c:40:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
  case 2: h ^= data[1] << 8;
          ~~^~~~~~~~~~~~~~~
../git/murmurhashneutral2.c:41:2: note: here
  case 1: h ^= data[0];
  ^~~~
../git/util.c: In function ‘parse_size_with_suffix’:
../git/util.c:1060:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
    x *= multiplier;
    ~~^~~~~~~~~~~~~
../git/util.c:1061:3: note: here
   case 'G':
   ^~~~
../git/util.c:1062:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
    x *= multiplier;
    ~~^~~~~~~~~~~~~
../git/util.c:1063:3: note: here
   case 'M':
   ^~~~
../git/util.c:1064:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
    x *= multiplier;
    ~~^~~~~~~~~~~~~
../git/util.c:1065:3: note: here
   case 'K':
   ^~~~
cc1: all warnings being treated as errors
make: *** [Makefile:131: murmurhashneutral2.o] Error 1
make: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make: *** [Makefile:131: util.o] Error 1
ERROR: Function failed: do_compile (log file is located at /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-fedora27/build/build/tmp/work/x86_64-linux/ccache-native/3.2.5-r0/temp/log.do_compile.34790)

Source code murmurhashneutral.c where the statements are pass through and 3 latest commits for murmurhashneutral.c code are listed below:

[ab@fedora26 git]$ cat -n murmurhashneutral2.c
     1  /*
     2   * MurmurHashNeutral2, by Austin Appleby. Released to the public domain. See
     3   * <http://murmurhash.googlepages.com>.
     4   */
     5
     6  #include "murmurhashneutral2.h"
     7
     8  unsigned int
     9  murmurhashneutral2(const void *key, int len, unsigned int seed)
    10  {
    11          const unsigned int m = 0x5bd1e995;
    12          const int r = 24;
    13
    14          unsigned int h = seed ^ len;
    15
    16          const unsigned char *data = (const unsigned char *)key;
    17
    18          while (len >= 4) {
    19                  unsigned int k;
    20
    21                  k = data[0];
    22                  k |= data[1] << 8;
    23                  k |= data[2] << 16;
    24                  k |= data[3] << 24;
    25
    26                  k *= m;
    27                  k ^= k >> r;
    28                  k *= m;
    29
    30                  h *= m;
    31                  h ^= k;
    32
    33                  data += 4;
    34                  len -= 4;
    35          }
    36
    37          switch (len)
    38          {
    39          case 3: h ^= data[2] << 16;
    40          case 2: h ^= data[1] << 8;
    41          case 1: h ^= data[0];
    42                  h *= m;
    43          };
    44
    45          h ^= h >> 13;
    46          h *= m;
    47          h ^= h >> 15;
    48
    49          return h;
    50  }
[ab@fedora26 git]$ git log murmurhashneutral2.c
commit b5294d87a7306f77c0e9ddf0f904d224ca99a752
Author: Joel Rosdahl <joel@rosdahl.net>
Date:   Sat Aug 1 22:56:03 2015 +0200

    Update source code style according to uncrustify

commit 530dfe7c114eae25d594be539febf3e60c438e8d
Author: Joel Rosdahl <joel@rosdahl.net>
Date:   Sun Aug 1 10:47:52 2010 +0200

    Format code to use a more consistent coding style

commit e53af1a618c68b455a68ed5615bfb3bb5487035d
Author: Joel Rosdahl <joel@rosdahl.net>
Date:   Sat Nov 14 16:14:55 2009 +0100

    First working version of the direct mode

References to the oe-runmake failed ccache-tool:

Autobuilder (stdio):
http://centaurus01.png.intel.com:8010/builders/nightly-oe-selftest-fedora27/builds/13/steps/Running%20oe-selftest/logs/stdio
http://centaurus01.png.intel.com:8010/builders/nightly-oe-selftest-fedora26/builds/16/steps/Running%20oe-selftest/logs/stdio

ccache-native 3.2.5-r0 & do_compile logs on (murmurhashneutral.c)
http://centaurus01.png.intel.com:8080/workspace/fedora27/nightly-oe-selftest-fedora27/build/build/tmp/work/x86_64-linux/ccache-native/3.2.5-r0/temp/log.do_compile.34790
http://centaurus01.png.intel.com:8080/workspace/fedora27/nightly-oe-selftest-fedora27/build/build/tmp/work/x86_64-linux/ccache-native/3.2.5-r0/git/murmurhashneutral2.c
Comment 1 Armin Kuster 2018-02-04 04:54:12 UTC
my guess is that we should see this error in Master.

This fix went into 3.3.5

https://github.com/ccache/ccache/commit/3c448a4566db97676b2de1f7a270d3f8daad013b

Add some fallthrough comments to work around GCC compiler warnings 

this needs to be tested in Master
Comment 3 Armin Kuster 2018-04-05 08:33:56 UTC
done