Bug 12839

Summary: [2.2.4 rc1] gcc compiler not found leads to test_install_libraries_headers and test_image_generation_binary_feeds failed on Fedora 26/27
Product: [QA/Testing] Runtime Testing Reporter: Mohamad Noor Alim <mohamad.noor.alim.hussin>
Component: generalAssignee: Armin Kuster <akuster>
Status: CLOSED WONTFIX QA Contact: Mohamad Noor Alim <mohamad.noor.alim.hussin>
Severity: normal    
Priority: Medium+ CC: richard.purdie
Version: 2.2.4   
Target Milestone: 2.2.5   
Hardware: x86   
OS: Multiple   
URL: http://centaurus02.png.intel.com:8010/#/builders/35/builds/25/steps/6/logs/stdio
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Mohamad Noor Alim 2018-07-02 10:19:05 UTC
Could not find compiler "gcc" in PATH. 
When use $ which gcc in host server, it show /usr/lib64/ccache/gcc, & gcc --version is 7.3.1.


======================================================================
FAIL [1.713s]: test_image_generation_binary_feeds (oeqa.selftest.eSDK.oeSDKExtSelfTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ab/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f
    return func(*args, **kwargs)
  File "/home/ab/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/eSDK.py", line 111, in test_image_generation_binary_feeds
    oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
  File "/home/ab/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/eSDK.py", line 38, in run_esdk_cmd
    runCmd("cd %s; . %s; %s" % (tmpdir_eSDKQA, env_eSDK, cmd), **options)
  File "/home/ab/yocto-worker/nightly-oe-selftest/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 'cd /tmp/eSDKQA33n8r6zf; . /tmp/eSDKQA33n8r6zf/environment-setup-core2-64-poky-linux; devtool build-image core-image-minimal' returned non-zero exit status 1:
SDK environment now set up; additionally you may now run devtool to perform development tasks.
Run devtool --help for further details.
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.
Parsing recipes..ccache: error: Could not find compiler "gcc" in PATH
ERROR: Error running gcc  --version: 
WARNING: Exception during build_dependencies for create_shar
WARNING: Error during finalise of /tmp/eSDKQA33n8r6zf/layers/build/meta-selftest/recipes-test/images/wic-image-minimal.bb
ccache: error: Could not find compiler "gcc" in PATH
ERROR: Error running gcc  --version: 
WARNING: Exception during build_dependencies for create_shar
WARNING: Error during finalise of /tmp/eSDKQA33n8r6zf/layers/build/meta-selftest/recipes-test/images/test-empty-image.bb
ccache: error: Could not find compiler "gcc" in PATH
ERROR: Error running gcc  --version: 
WARNING: Exception during build_dependencies for create_shar
WARNING: Error during finalise of /tmp/eSDKQA33n8r6zf/layers/build/meta-selftest/recipes-test/images/oe-selftest-image.bb
ccache: error: Could not find compiler "gcc" in PATH
ERROR: Error running gcc  --version: 
WARNING: Exception during build_dependencies for create_shar
WARNING: Error during finalise of /tmp/eSDKQA33n8r6zf/layers/build/meta-selftest/recipes-test/images/error-image.bb
Traceback (most recent call last):
  File "/tmp/eSDKQA33n8r6zf/sysroots/x86_64-pokysdk-linux/usr/bin/devtool", line 344, in <module>
    ret = main()
  File "/tmp/eSDKQA33n8r6zf/sysroots/x86_64-pokysdk-linux/usr/bin/devtool", line 331, in main
    ret = args.func(args, config, basepath, workspace)
  File "/tmp/eSDKQA33n8r6zf/layers/build/scripts/lib/devtool/build_image.py", line 63, in build_image
    result, outputdir = build_image_task(config, basepath, workspace, image, add_packages)
  File "/tmp/eSDKQA33n8r6zf/layers/build/scripts/lib/devtool/build_image.py", line 88, in build_image_task
    tinfoil = setup_tinfoil(basepath=basepath)
  File "/tmp/eSDKQA33n8r6zf/layers/build/scripts/lib/devtool/__init__.py", line 116, in setup_tinfoil
    tinfoil.prepare(config_only)
  File "/tmp/eSDKQA33n8r6zf/layers/build/bitbake/lib/bb/tinfoil.py", line 94, in prepare
    self.parseRecipes()
  File "/tmp/eSDKQA33n8r6zf/layers/build/bitbake/lib/bb/tinfoil.py", line 77, in parseRecipes
    self.cooker.updateCache()
  File "/tmp/eSDKQA33n8r6zf/layers/build/bitbake/lib/bb/cooker.py", line 1647, in updateCache
    raise bb.BBHandledException()
bb.BBHandledException

======================================================================
FAIL [11.177s]: test_install_libraries_headers (oeqa.selftest.eSDK.oeSDKExtSelfTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ab/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f
    return func(*args, **kwargs)
  File "/home/ab/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/eSDK.py", line 105, in test_install_libraries_headers
    oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
  File "/home/ab/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/eSDK.py", line 38, in run_esdk_cmd
    runCmd("cd %s; . %s; %s" % (tmpdir_eSDKQA, env_eSDK, cmd), **options)
  File "/home/ab/yocto-worker/nightly-oe-selftest/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 'cd /tmp/eSDKQA33n8r6zf; . /tmp/eSDKQA33n8r6zf/environment-setup-core2-64-poky-linux; devtool sdk-install bc ' returned non-zero exit status 1:
SDK environment now set up; additionally you may now run devtool to perform development tasks.
Run devtool --help for further details.
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.
Parsing recipes..ccache: error: Could not find compiler "gcc" in PATH
ccache: error: Could not find compiler "gcc" in PATH
ERROR: Error running gcc  --version: 
WARNING: Exception during build_dependencies for create_shar
WARNING: Error during finalise of /tmp/eSDKQA33n8r6zf/layers/build/meta-selftest/recipes-test/images/wic-image-minimal.bb
ERROR: Error running gcc  --version: 
WARNING: Exception during build_dependencies for create_shar
WARNING: Error during finalise of /tmp/eSDKQA33n8r6zf/layers/build/meta-selftest/recipes-test/images/oe-selftest-image.bb
ccache: error: Could not find compiler "gcc" in PATH
ERROR: Error running gcc  --version: 
WARNING: Exception during build_dependencies for create_shar
WARNING: Error during finalise of /tmp/eSDKQA33n8r6zf/layers/build/meta-selftest/recipes-test/images/error-image.bb
ccache: error: Could not find compiler "gcc" in PATH
ERROR: Error running gcc  --version: 
WARNING: Exception during build_dependencies for create_shar
WARNING: Error during finalise of /tmp/eSDKQA33n8r6zf/layers/build/meta-selftest/recipes-test/images/test-empty-image.bb
Traceback (most recent call last):
  File "/tmp/eSDKQA33n8r6zf/sysroots/x86_64-pokysdk-linux/usr/bin/devtool", line 344, in <module>
    ret = main()
  File "/tmp/eSDKQA33n8r6zf/sysroots/x86_64-pokysdk-linux/usr/bin/devtool", line 331, in main
    ret = args.func(args, config, basepath, workspace)
  File "/tmp/eSDKQA33n8r6zf/layers/build/scripts/lib/devtool/sdk.py", line 270, in sdk_install
    tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
  File "/tmp/eSDKQA33n8r6zf/layers/build/scripts/lib/devtool/__init__.py", line 116, in setup_tinfoil
    tinfoil.prepare(config_only)
  File "/tmp/eSDKQA33n8r6zf/layers/build/bitbake/lib/bb/tinfoil.py", line 94, in prepare
    self.parseRecipes()
  File "/tmp/eSDKQA33n8r6zf/layers/build/bitbake/lib/bb/tinfoil.py", line 77, in parseRecipes
    self.cooker.updateCache()
  File "/tmp/eSDKQA33n8r6zf/layers/build/bitbake/lib/bb/cooker.py", line 1647, in updateCache
    raise bb.BBHandledException()
bb.BBHandledException
Comment 1 Richard Purdie 2018-07-05 14:50:57 UTC
I think this patch addressed this kind of issues in master: http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/toolchain-scripts.bbclass?id=00302da3991ea7dea298f475091b35b6d73cefe1

We may want to try a version without the oe-init-build-env?
Comment 2 Armin Kuster 2018-08-05 19:03:00 UTC
The changes proposed by Richard are evasive and will not be back ported for this release.
Comment 3 Armin Kuster 2018-08-05 19:03:25 UTC
We do not plan on fixing this issue at this time.
Comment 4 Armin Kuster 2018-08-05 19:07:33 UTC
.