Bug 10900

Summary: selftest test_sstate_allarch_samesigs_multilib fails with 'nodistro' distro
Product: [QA/Testing] Build Testing Reporter: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Component: generalAssignee: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: benjamin.esquivel, ross.burton
Version: 2.3   
Target Milestone: 2.4 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Leonardo Sandoval Gonzalez 2017-01-09 16:03:49 UTC
if oe-selftest --run-all is run using DISTRO='nodistro', the following error is observed on output. Code should either skip (base on a missing distro feature, for example) it or the bitbake target changed in order to avoid the failure.

----snip----
======================================================================
FAIL [29.565s]: test_sstate_allarch_samesigs_multilib (oeqa.selftest.sstatetests.SStateTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/lib/oeqa/selftest/sstatetests.py", line 359, in test_sstate_allarch_samesigs_multilib
    self.sstate_allarch_samesigs(configA, configB)
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/lib/oeqa/selftest/sstatetests.py", line 368, in sstate_allarch_samesigs
    bitbake("world meta-toolchain -S none")
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/lib/oeqa/utils/commands.py", line 143, in bitbake
    return runCmd(cmd, ignore_status, timeout, **options)
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/lib/oeqa/utils/commands.py", line 121, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, result.output))
AssertionError: Command 'bitbake  world meta-toolchain -S none' returned non-zero exit status 1:
NOTE: Started PRServer with DBfile: /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 33145, PID: 20160
Parsing recipes...done.
Parsing of 865 .bb files complete (0 cached, 865 parsed). 2181 targets, 217 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'virtual/lib32-libgl' (but virtual:multilib:lib32:/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/recipes-graphics/waffle/waffle_1.5.2.bb DEPENDS on or otherwise requires it). Close matches:
  virtual/lib32-libsdl
  virtual/lib32-libc
  virtual/lib32-libsdl2
ERROR: Required build target 'lib32-meta-world-pkgdata' has no buildable providers.
Missing or unbuildable dependency chain was: ['lib32-meta-world-pkgdata', 'meta-world-pkgdata', 'lib32-waffle', 'virtual/lib32-libgl']
----snip----
Comment 1 Leonardo Sandoval Gonzalez 2017-01-09 16:06:55 UTC
Another test failing with the same conditions ('nodistro')

----snip----
FAIL [27.996s]: test_sstate_sametune_samesigs (oeqa.selftest.sstatetests.SStateTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/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-nodistro/build/meta/lib/oeqa/selftest/sstatetests.py", line 415, in test_sstate_sametune_samesigs
    bitbake("world meta-toolchain -S none")
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/lib/oeqa/utils/commands.py", line 143, in bitbake
    return runCmd(cmd, ignore_status, timeout, **options)
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/lib/oeqa/utils/commands.py", line 121, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, result.output))
AssertionError: Command 'bitbake  world meta-toolchain -S none' returned non-zero exit status 1:
NOTE: Started PRServer with DBfile: /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 37573, PID: 18893
Parsing recipes...done.
Parsing of 865 .bb files complete (0 cached, 865 parsed). 2181 targets, 216 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'virtual/lib32-libgl' (but virtual:multilib:lib32:/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-nodistro/build/meta/recipes-graphics/waffle/waffle_1.5.2.bb DEPENDS on or otherwise requires it). Close matches:
  virtual/lib32-libsdl
  virtual/lib32-libc
  virtual/lib32-libsdl2
ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'lib32-meta-world-pkgdata', 'lib32-waffle', 'virtual/lib32-libgl']

----snip----
Comment 2 Leonardo Sandoval Gonzalez 2017-08-29 14:12:14 UTC
Instead of using oe-selftest, one can reproduce it with the following conf

DISTRO = "nodistro"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

then executing

$ bitbake world  -S none
Loading cache: 100% |##########################################################################################################################################################################################################| Time: 0:00:03
Loaded 1267 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.35.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "opensuse-42.2"
TARGET_SYS        = "i586-oe-linux"
MACHINE           = "qemux86"
DISTRO            = "nodistro"
DISTRO_VERSION    = "nodistro.0"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-poky
meta-yocto-bsp    = "dev:55b68d62a3e1986f5c4482e500ed883c35976673"

Initialising tasks: 100% |#####################################################################################################################################################################################################| Time: 0:00:07
NOTE: Reparsing files to collect dependency data
Writing locked sigs to /home/lsandov1/poky-testing/poky-selftest-sstate-nodistro/build/locked-sigs.inc
NOTE: Tasks Summary: Attempted 0 tasks of which 0 didn't need to be rerun and all succeeded.
lsandov1@yctb05:~/poky-testing/poky-selftest-sstate-nodistro/build> bitbake world  -S none
Loading cache: 100% |##########################################################################################################################################################################################################| Time: 0:00:05
Loaded 2076 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'virtual/lib32-libgl' (but virtual:multilib:lib32:/home/lsandov1/poky-testing/poky-selftest-sstate-nodistro/meta/recipes-graphics/waffle/waffle_1.5.2.bb DEPENDS on or otherwise requires it). Close matches:
  virtual/lib32-libsdl
  virtual/lib32-libc
  virtual/lib32-libsdl2
ERROR: Required build target 'lib32-meta-world-pkgdata' has no buildable providers.
Missing or unbuildable dependency chain was: ['lib32-meta-world-pkgdata', 'meta-world-pkgdata', 'lib32-waffle', 'virtual/lib32-libgl']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Comment 3 Leonardo Sandoval Gonzalez 2017-09-13 15:37:51 UTC
Fixed by

commit 1f3e46b6a1d12a597aa9baf82c91db12a8513f67
Author: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Date:   Thu Aug 31 07:00:41 2017 -0700

    waffle: fix REQUIRED_DISTRO_FEATURES and PACKAGECONFIG virtual/libgl dependencies
    
    Waffle's REQUIRED_DISTRO_FEATURES statement looks into DEPENDS and if
    virtual/libgl is present, it includes opengl as distro feature. However,
    in a multilib environment, recipes provides virtual/${MLPREFIX}libgl,
    thus waffle recipe needs to include the prefix. Also PACKAGECONFIG
    statements need this change in order to properly include the libgl
    dependency.
    
    The way this error showed up was in a multilib environment and a distro
    not containing opengl, i.e. nodistro, leading the following error when
    building world -S none (because opengl was not included as required distro
    feature):
    
        ERROR: Nothing PROVIDES 'virtual/lib32-libgl' (but virtual:multilib:lib32:/meta/recipes-graphics/waffle/waffle_1.5.2.bb DEPENDS on or otherwise requires it). Close matches:
          virtual/lib32-libsdl
          virtual/lib32-libc
          virtual/lib32-libsdl2
        ERROR: Required build target 'lib32-meta-world-pkgdata' has no buildable providers.
        Missing or unbuildable dependency chain was: ['lib32-meta-world-pkgdata', 'meta-world-pkgdata', 'lib32-waffle', 'virtual/lib32-libgl']
    
        Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
    
    [YOCTO #10900]
    
    (From OE-Core rev: 2e3344a3b6d5c709ab0d368dd171240ab5cc6e22)