<?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>11631</bug_id>
          
          <creation_ts>2017-06-07 22:44:23 +0000</creation_ts>
          <short_desc>sysroot population needs to give better errors if files already exist</short_desc>
          <delta_ts>2017-09-13 23:28:33 +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>OE-Core</product>
          <component>core</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>jon.richardson</cc>
    
    <cc>juro.bystricky</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>scott.branden</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>73849</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-06-07 22:44:23 +0000</bug_when>
    <thetext>If DEPENDS has two recipes that provide the same file, the error isn&apos;t obvious:

ERROR: gst-player-0.0.1+gitAUTOINC+ee3c226c82-r0 do_prepare_recipe_sysroot: Function failed: extend_recipe_sysroot
ERROR: Logfile of failure stored in: /data/poky-master/tmp/work/corei7-64-poky-linux/gst-player/0.0.1+gitAUTOINC+ee3c226c82-r0/temp/log.do_prepare_recipe_sysroot.17492
ERROR: gstreamer1.0-vaapi-1.10.4-r0 do_prepare_recipe_sysroot: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:extend_recipe_sysroot(d)
     0003:
File: &apos;/home/ross/Yocto/poky/meta/classes/staging.bbclass&apos;, lineno: 592, function: extend_recipe_sysroot
     0588:                    dest = newmanifest[l]
     0589:                    if l.endswith(&quot;/&quot;):
     0590:                        staging_copydir(l, targetdir, dest, seendirs)
     0591:                        continue
 *** 0592:                    staging_copyfile(l, targetdir, dest, postinsts, seendirs)
     0593:
     0594:    for f in fixme:
     0595:        if f == &apos;&apos;:
     0596:            staging_processfixme(fixme[f], recipesysroot, recipesysroot, recipesysrootnative, d)
File: &apos;/home/ross/Yocto/poky/meta/classes/staging.bbclass&apos;, lineno: 233, function: staging_copyfile
     0229:        os.symlink(linkto, dest)
     0230:        #bb.warn(c)
     0231:    else:
     0232:        try:
 *** 0233:            os.link(c, dest)
     0234:        except OSError as err:
     0235:            if err.errno == errno.EXDEV:
     0236:                bb.utils.copyfile(c, dest)
     0237:            else:
Exception: FileExistsError: [Errno 17] File exists: &apos;/data/poky-master/tmp/sysroots-components/corei7-64/gstreamer1.0-plugins-base/usr/lib/gstreamer-1.0/libgstrawparse.so&apos; -&gt; &apos;/data/poky-master/tmp/work/corei7-64-poky-linux/gstreamer1.0-vaapi/1.10.4-r0/recipe-sysroot/usr/lib/gstreamer-1.0/libgstrawparse.so&apos;

If it could just say something like this then it would be a lot nicer:

ERROR: gstreamer1.0-vaapi depends on gstreamer1.0-plugins-base that provides /usr/lib/gstreamer-1.0/libgstrawparse.so but that is already provided by &lt;LOOK THIS UP&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76802</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2017-09-13 17:55:05 +0000</bug_when>
    <thetext>We&apos;re seeing this error too but it is caused by something else. If we have a recipe with an intertask dependency on a recipe using a different multilib config we get many instances of errors caused by exceptions thrown in staging.bbclass.

A recipe using aarch64 tuning (not that it matters) depends on do_deploy from a recipe that needs to be built with a multilib config named softfp:
do_compile[depends] += &quot;softfp-brcm-crmu:do_deploy&quot;

ML config defined as:
require conf/multilib.conf
MULTILIB_GLOBAL_VARIANTS += &quot;softfp&quot;
MULTILIBS += &quot;multilib:softfp&quot;
DEFAULTTUNE_virtclass-multilib-softfp = &quot;armv6t&quot;

I caught all the exceptions throwing in staging.bbclass but other errors show up as well later.

ERROR: brcm-atf-gitAUTOINC+e0ccbe65dd-r0 do_install: Error executing a python function in exec_python_func() autogenerated:
 
The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:extend_recipe_sysroot(d)
     0003:
File: &apos;/home/pramodku/repos/yocto/12092017/poky/build/../meta/classes/staging.bbclass&apos;, lineno: 592, function: extend_recipe_sysroot
     0588:                    dest = newmanifest[l]
     0589:                    if l.endswith(&quot;/&quot;):
     0590:                        staging_copydir(l, targetdir, dest, seendirs)
     0591:                        continue
 *** 0592:                    staging_copyfile(l, targetdir, dest, postinsts, seendirs)
     0593:
     0594:    for f in fixme:
     0595:        if f == &apos;&apos;:
     0596:            staging_processfixme(fixme[f], recipesysroot, recipesysroot, recipesysrootnative, d)
File: &apos;/home/pramodku/repos/yocto/12092017/poky/build/../meta/classes/staging.bbclass&apos;, lineno: 233, function: staging_copyfile
     0229:        os.symlink(linkto, dest)
     0230:        #bb.warn(c)
     0231:    else:
     0232:        try:
 *** 0233:            os.link(c, dest)
     0234:        except OSError as err:
     0235:            if err.errno == errno.EXDEV:
     0236:                bb.utils.copyfile(c, dest)
     0237:            else:
Exception: FileExistsError: [Errno 17] File exists: &apos;/home/pramodku/repos/yocto/12092017/poky/build/tmp/sysroots-components/armv6-vfp/softfp-gcc-runtime/usr/share/gcc-7.1.0/python/libstdcxx/__init__.py&apos; -&gt; &apos;/home/pramodku/repos/yocto/12092017/poky/build/tmp/work/bcm958802a8021-pokymlsoftfp-linux-gnueabi/brcm-atf/gitAUTOINC+e0ccbe65dd-r0/softfp-recipe-sysroot/usr/share/gcc-7.1.0/python/libstdcxx/__init__.py&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76803</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-09-13 18:01:32 +0000</bug_when>
    <thetext>Jonathan: current master should be giving you a nice error message now, can you test with that?

(fixed in oe-core 2ebbeb61114e4b847e9164c621ac87b5cf03a299)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76808</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2017-09-13 23:21:15 +0000</bug_when>
    <thetext>Thanks Ross. I noticed we were behind a bit. I don&apos;t see a warning but your commit actually fixes the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76809</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2017-09-13 23:28:33 +0000</bug_when>
    <thetext>Actually looking more closely at your fix it should print a warning only. Not sure why I don&apos;t see the issue anymore. Maybe it will re-appear, or a different commit fixed it. I&apos;ll file a different bug if it comes back.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>