<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13092</bug_id>
          
          <creation_ts>2018-12-19 09:06:22 +0000</creation_ts>
          <short_desc>build failed in docker container</short_desc>
          <delta_ts>2018-12-21 00:52:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="jinzhou">jinzhou.zjz</reporter>
          <assigned_to name="jinzhou">jinzhou.zjz</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82532</commentid>
    <comment_count>0</comment_count>
    <who name="jinzhou">jinzhou.zjz</who>
    <bug_when>2018-12-19 09:06:22 +0000</bug_when>
    <thetext>I set up a build ENV with docker container based on Ubuntu 16.04 image.
and configure the ENV followed the guide as https://www.yoctoproject.org/docs/1.6.1/yocto-project-qs/yocto-project-qs.html

but when I build the core-image-base with bitbake, It failed. report error logs as bellow

iot@c1dddc62eb15:/workspace/yocto/build$ bitbake core-image-base
ERROR: /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-selftest/images/secureboot-selftest-image-unsigned.bb: Error running gcc  --version: | ETA:  0:00:05
WARNING: /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-selftest/images/secureboot-selftest-image-unsigned.bb: Exception during build_dependencies for create_shar
WARNING: /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-selftest/images/secureboot-selftest-image-unsigned.bb: Error during finalise of /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-selftest/images/secureboot-selftest-image-unsigned.bb
ERROR: /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-core/images/core-image-tiny.bb: Error running gcc  --version:                        | ETA:  0:00:04
WARNING: /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-core/images/core-image-tiny.bb: Exception during build_dependencies for create_shar
WARNING: /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-core/images/core-image-tiny.bb: Error during finalise of /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-core/images/core-image-tiny.bb
ERROR: /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-selftest/images/secureboot-selftest-image-signed.bb: Error running gcc  --version:
WARNING: /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-selftest/images/secureboot-selftest-image-signed.bb: Exception during build_dependencies for create_shar
WARNING: /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-selftest/images/secureboot-selftest-image-signed.bb: Error during finalise of /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-selftest/images/secureboot-selftest-image-signed.bb
ERROR: ExpansionError during parsing /workspace/yocto/build/../meta-bsp/meta-intel/common/recipes-core/images/core-image-tiny.bb                         | ETA:  0:00:04
Traceback (most recent call last):
bb.data_smart.ExpansionError: Failure expanding variable create_shar, expression was    # copy in the template shar extractor script
        cp /workspace/yocto/meta-yp/meta/files/toolchain-shar-extract.sh /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/x86_64-deploy-core-image-tiny-populate-sdk/alios-glibc-x86_64-core-image-tiny-core2-64-toolchain-1.2.0.sh

        rm -f /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/temp/pre_install_command /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/temp/post_install_command

        if [ 1 -eq 1 ] ; then
                cp /workspace/yocto/meta-yp/meta/files/toolchain-shar-relocate.sh /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/temp/post_install_command
        fi
        cat &lt;&lt; &quot;EOF&quot; &gt;&gt; /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/temp/pre_install_command

EOF

        cat &lt;&lt; &quot;EOF&quot; &gt;&gt; /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/temp/post_install_command

EOF
        sed -i -e &apos;/@SDK_PRE_INSTALL_COMMAND@/r /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/temp/pre_install_command&apos; \
                -e &apos;/@SDK_POST_INSTALL_COMMAND@/r /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/temp/post_install_command&apos; \
                /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/x86_64-deploy-core-image-tiny-populate-sdk/alios-glibc-x86_64-core-image-tiny-core2-64-toolchain-1.2.0.sh

        # substitute variables
        sed -i -e &apos;s#@SDK_ARCH@#x86_64#g&apos; \
                -e &apos;s#@SDKPATH@#/opt/alios/1.2.0#g&apos; \
                -e &apos;s#@SDKEXTPATH@#~/alios_sdk#g&apos; \
                -e &apos;s#@OLDEST_KERNEL@#3.2.0#g&apos; \
                -e &apos;s#@REAL_MULTIMACH_TARGET_SYS@#core2-64-alios-linux#g&apos; \
                -e &apos;s#@SDK_TITLE@#${@d.getVar(&quot;SDK_TITLE&quot;).replace(&apos;&amp;&apos;, &apos;\&amp;&apos;)}#g&apos; \
                -e &apos;s#@SDK_VERSION@#1.2.0#g&apos; \
                -e &apos;/@SDK_PRE_INSTALL_COMMAND@/d&apos; \
                -e &apos;/@SDK_POST_INSTALL_COMMAND@/d&apos; \
                -e &apos;s#@SDK_GCC_VER@#${@oe.utils.host_gcc_version(d)}#g&apos; \
                /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/x86_64-deploy-core-image-tiny-populate-sdk/alios-glibc-x86_64-core-image-tiny-core2-64-toolchain-1.2.0.sh

        # add execution permission
        chmod +x /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/x86_64-deploy-core-image-tiny-populate-sdk/alios-glibc-x86_64-core-image-tiny-core2-64-toolchain-1.2.0.sh

        # append the SDK tarball
        cat /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/x86_64-deploy-core-image-tiny-populate-sdk/alios-glibc-x86_64-core-image-tiny-core2-64-toolchain-1.2.0.tar.xz &gt;&gt; /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/x86_64-deploy-core-image-tiny-populate-sdk/alios-glibc-x86_64-core-image-tiny-core2-64-toolchain-1.2.0.sh

        # delete the old tarball, we don&apos;t need it anymore
        rm /workspace/yocto/build/tmp/work/qemux86_64-alios-linux/core-image-tiny/1.0-r0/x86_64-deploy-core-image-tiny-populate-sdk/alios-glibc-x86_64-core-image-tiny-core2-64-toolchain-1.2.0.tar.xz
 which triggered exception BBHandledException:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82533</commentid>
    <comment_count>1</comment_count>
    <who name="jinzhou">jinzhou.zjz</who>
    <bug_when>2018-12-19 09:07:24 +0000</bug_when>
    <thetext>gcc version as below:
iot@c1dddc62eb15:/workspace/yocto/build$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82549</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-12-20 16:07:38 +0000</bug_when>
    <thetext>Hi,

Could you tell us which version of the project you&apos;re using? You pointed at documentation for 1.6 which is quite an old release and no longer supported.

To fix this you&apos;d need to track down where gcc --version is being called from. It not quite clear exactly what the error is here...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82550</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-12-20 16:07:58 +0000</bug_when>
    <thetext>Also, please let us know which layers you&apos;re using and how you triggered the error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82574</commentid>
    <comment_count>4</comment_count>
    <who name="jinzhou">jinzhou.zjz</who>
    <bug_when>2018-12-21 00:50:40 +0000</bug_when>
    <thetext>I have solved this issue, thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82575</commentid>
    <comment_count>5</comment_count>
    <who name="jinzhou">jinzhou.zjz</who>
    <bug_when>2018-12-21 00:52:12 +0000</bug_when>
    <thetext>it caused by the ENV configuration</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>