<?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>5335</bug_id>
          
          <creation_ts>2013-10-10 13:53:09 +0000</creation_ts>
          <short_desc>libav and libpostproc read_subpackage_metadata fails with &quot;Recipe libpostproc is trying to change PR from &apos;r1&apos; to &apos;r0&apos;&quot; when build in an image</short_desc>
          <delta_ts>2014-04-22 08:18:00 +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>multimedia</component>
          <version>1.5</version>
          <rep_platform>Other</rep_platform>
          <op_sys>arm</op_sys>
          <bug_status>VERIFIED</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>1.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Diego">diego.ml</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>dvhart</cc>
    
    <cc>ionutx.chisanovici</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>37807</commentid>
    <comment_count>0</comment_count>
    <who name="Diego">diego.ml</who>
    <bug_when>2013-10-10 13:53:09 +0000</bug_when>
    <thetext>When doing a clean build of a custom image recipe with libav and libpostproc you get:
ERROR: Recipe libav is trying to change PR from &apos;r0&apos; to &apos;r1&apos;. This will cause do_package_write_* failures since the incorrect data will be used and they will be unable to find the right workdir.
ERROR: Function failed: read_subpackage_metadata
ERROR: Logfile of failure stored in: /opt/yocto_builder/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libav/0.8.8-r0/temp/log.do_package_write_rpm.6157
ERROR: Task 417 (/opt/yocto_builder/sources/poky/meta/recipes-multimedia/libav/libav_0.8.8.bb, do_package_write_rpm) failed with exit code &apos;1&apos;

or, for libpostproc:
ERROR: Recipe libpostproc is trying to change PR from &apos;r1&apos; to &apos;r0&apos;. This will cause do_package_write_* failures since the incorrect data will be used and they will be unable to find the right work.
ERROR: Function failed: read_subpackage_metadata
ERROR: Logfile of failure stored in: /opt/yocto_builder/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libpostproc/0.0.0+gitAUTOINC+3b7053f46d-r1/temp/log.do_package_write_rpm.8140
ERROR: Task 430 (/opt/yocto_builder/sources/meta-openembedded/meta-oe/recipes-multimedia/libpostproc/libpostproc_git.bb, do_package_write_rpm) failed with exit code &apos;1&apos;


This is easy to reproduce (dora branch as of today).
1) create your own image recipe based on &quot;core-image-x11&quot;
2) add:
IMAGE_INSTALL += &quot;libavcodec \
                libavdevice \
                libavformat \
                libavutil \
                libswscale \
                libpostproc \
                libavfilter \
&quot;
3) bitbake your-image

You&apos;ll get this problem.

Cleaning and rebuilding the &quot;libav&quot; and &quot;libpostproc&quot; workarounds the bugs, and then you are able to build the whole image. For example:
bitbake -c clean libav &amp;&amp; bitbake libav
and then:
bitbake your-image</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37817</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-10-10 15:06:05 +0000</bug_when>
    <thetext>This looks like the external libpostproc recipe in meta-oe conflicting with the libpostproc library supplied by libav 0.8.x. Basically if you&apos;re building libav 0.8.x then you shouldn&apos;t be building the external libpostproc at all. I&apos;m not entirely sure how we can automatically stop libpostproc building but allow it to build with the git version of libav though - perhaps we should have an RCONFLICTS, but I&apos;m not sure if that would completely solve the problem in any case.

Just checking, do you definitely need libpostproc? It seems that one of the reasons it was split out in libav 9 was because it wasn&apos;t widely used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38233</commentid>
    <comment_count>2</comment_count>
    <who name="Diego">diego.ml</who>
    <bug_when>2013-10-28 18:18:01 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; This looks like the external libpostproc recipe in meta-oe conflicting with
&gt; the libpostproc library supplied by libav 0.8.x. Basically if you&apos;re
&gt; building libav 0.8.x then you shouldn&apos;t be building the external libpostproc
&gt; at all. I&apos;m not entirely sure how we can automatically stop libpostproc
&gt; building but allow it to build with the git version of libav though -
&gt; perhaps we should have an RCONFLICTS, but I&apos;m not sure if that would
&gt; completely solve the problem in any case.
&gt; 

Yeah, removing libpostproc from the image recipe is solving the problem.

&gt; Just checking, do you definitely need libpostproc? It seems that one of the
&gt; reasons it was split out in libav 9 was because it wasn&apos;t widely used.

I&apos;m not sure I really need it, but the problems holds anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39527</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-12-20 14:57:46 +0000</bug_when>
    <thetext>I&apos;ve sent a patch to add libpostproc to PROVIDES in the libav 0.8.x recipe, so that you get a &quot;multiple provider&quot; error at the start of the build if you try to add meta-oe and explicitly request to build libpostproc without selecting a provider. I think this is the best we can do for this situation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39546</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-12-21 18:17:24 +0000</bug_when>
    <thetext>Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8ee784e0a027b50ac9d8cb2db55e59fa6c7e29da</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39805</commentid>
    <comment_count>5</comment_count>
    <who name="Ionut Chisanovici">ionutx.chisanovici</who>
    <bug_when>2014-01-14 15:51:42 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; When doing a clean build of a custom image recipe with libav and libpostproc
&gt; you get:
&gt; ERROR: Recipe libav is trying to change PR from &apos;r0&apos; to &apos;r1&apos;. This will
&gt; cause do_package_write_* failures since the incorrect data will be used and
&gt; they will be unable to find the right workdir.
&gt; ERROR: Function failed: read_subpackage_metadata
&gt; ERROR: Logfile of failure stored in:
&gt; /opt/yocto_builder/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/
&gt; libav/0.8.8-r0/temp/log.do_package_write_rpm.6157
&gt; ERROR: Task 417
&gt; (/opt/yocto_builder/sources/poky/meta/recipes-multimedia/libav/libav_0.8.8.
&gt; bb, do_package_write_rpm) failed with exit code &apos;1&apos;
&gt; 
&gt; or, for libpostproc:
&gt; ERROR: Recipe libpostproc is trying to change PR from &apos;r1&apos; to &apos;r0&apos;. This
&gt; will cause do_package_write_* failures since the incorrect data will be used
&gt; and they will be unable to find the right work.
&gt; ERROR: Function failed: read_subpackage_metadata
&gt; ERROR: Logfile of failure stored in:
&gt; /opt/yocto_builder/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/
&gt; libpostproc/0.0.0+gitAUTOINC+3b7053f46d-r1/temp/log.do_package_write_rpm.8140
&gt; ERROR: Task 430
&gt; (/opt/yocto_builder/sources/meta-openembedded/meta-oe/recipes-multimedia/
&gt; libpostproc/libpostproc_git.bb, do_package_write_rpm) failed with exit code
&gt; &apos;1&apos;
&gt; 
&gt; 
&gt; This is easy to reproduce (dora branch as of today).
&gt; 1) create your own image recipe based on &quot;core-image-x11&quot;
&gt; 2) add:
&gt; IMAGE_INSTALL += &quot;libavcodec \
&gt;                 libavdevice \
&gt;                 libavformat \
&gt;                 libavutil \
&gt;                 libswscale \
&gt;                 libpostproc \
&gt;                 libavfilter \
&gt; &quot;
&gt; 3) bitbake your-image
&gt; 
&gt; You&apos;ll get this problem.
&gt; 
&gt; Cleaning and rebuilding the &quot;libav&quot; and &quot;libpostproc&quot; workarounds the bugs,
&gt; and then you are able to build the whole image. For example:
&gt; bitbake -c clean libav &amp;&amp; bitbake libav
&gt; and then:
&gt; bitbake your-image

Hi Diego,

I cannot reproduce the issue.
Can you please tell me if there is something else to setup ?

What I did for reproducing this was to edit meta/recipes-graphics/images/core-image-x11.bb and add 
IMAGE_INSTALL += &quot;libavcodec \
                 libavdevice \
                 libavformat \
                 libavutil \
                 libswscale \
                 libpostproc \
                 libavfilter \
&quot;
Also, in the local.conf file I have MACHINE ?=&quot;qemuarm&quot;.
Finally bitbake core-image-x11

On both dora and master (latest commits), I get the below errors:

[ionut@ionut-fedora build]$ bitbake core-image-x11
Parsing recipes: 100% |#######################################################################################################################################################################################################| Time: 00:00:28
Parsing of 842 .bb files complete (0 cached, 842 parsed). 1188 targets, 53 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES &apos;libavcodec&apos; (but /home/ionut/work/poky/meta/recipes-graphics/images/core-image-x11.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target &apos;libavcodec&apos; is unbuildable, removing...
Missing or unbuildable dependency chain was: [&apos;libavcodec&apos;]
ERROR: Required build target &apos;core-image-x11&apos; has no buildable providers.
Missing or unbuildable dependency chain was: [&apos;core-image-x11&apos;, &apos;libavcodec&apos;]

Cheers,
Ionut</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39822</commentid>
    <comment_count>6</comment_count>
    <who name="Diego">diego.ml</who>
    <bug_when>2014-01-15 09:51:13 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; ERROR: Nothing RPROVIDES &apos;libavcodec&apos; (but
&gt; /home/ionut/work/poky/meta/recipes-graphics/images/core-image-x11.bb
&gt; RDEPENDS on or otherwise requires it)
&gt; NOTE: Runtime target &apos;libavcodec&apos; is unbuildable, removing...
&gt; Missing or unbuildable dependency chain was: [&apos;libavcodec&apos;]
&gt; ERROR: Required build target &apos;core-image-x11&apos; has no buildable providers.
&gt; Missing or unbuildable dependency chain was: [&apos;core-image-x11&apos;, &apos;libavcodec&apos;]

It seems bitbake is not finding libav recipe, which is in:
poky/meta/recipes-multimedia/libav

Is your bblayers.conf configured correctly?

This bug should be fixed however.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39825</commentid>
    <comment_count>7</comment_count>
    <who name="Ionut Chisanovici">ionutx.chisanovici</who>
    <bug_when>2014-01-15 13:14:08 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; ERROR: Nothing RPROVIDES &apos;libavcodec&apos; (but
&gt; &gt; /home/ionut/work/poky/meta/recipes-graphics/images/core-image-x11.bb
&gt; &gt; RDEPENDS on or otherwise requires it)
&gt; &gt; NOTE: Runtime target &apos;libavcodec&apos; is unbuildable, removing...
&gt; &gt; Missing or unbuildable dependency chain was: [&apos;libavcodec&apos;]
&gt; &gt; ERROR: Required build target &apos;core-image-x11&apos; has no buildable providers.
&gt; &gt; Missing or unbuildable dependency chain was: [&apos;core-image-x11&apos;, &apos;libavcodec&apos;]
&gt; 
&gt; It seems bitbake is not finding libav recipe, which is in:
&gt; poky/meta/recipes-multimedia/libav
&gt; 
&gt; Is your bblayers.conf configured correctly?
&gt; 
&gt; This bug should be fixed however.

This is my bblayers.conf (the default one):

ionut@ionut-ubuntu:~/work/poky/build$ cat conf/bblayers.conf
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = &quot;6&quot;

BBPATH = &quot;${TOPDIR}&quot;
BBFILES ?= &quot;&quot;

BBLAYERS ?= &quot; \
  /home/ionut/work/poky/meta \
  /home/ionut/work/poky/meta-yocto \
  /home/ionut/work/poky/meta-yocto-bsp \
  &quot;
BBLAYERS_NON_REMOVABLE ?= &quot; \
  /home/ionut/work/poky/meta \
  /home/ionut/work/poky/meta-yocto \
  &quot;
Tried one more time today, same issue.

Regards,
Ionut C</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42693</commentid>
    <comment_count>8</comment_count>
    <who name="Ionut Chisanovici">ionutx.chisanovici</who>
    <bug_when>2014-04-16 09:17:35 +0000</bug_when>
    <thetext>Hi Diego,

Can you please update the bug and let me know if this is still an issue ?

Thanks,
Ionut C</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42700</commentid>
    <comment_count>9</comment_count>
    <who name="Diego">diego.ml</who>
    <bug_when>2014-04-16 14:11:31 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; Hi Diego,
&gt; 
&gt; Can you please update the bug and let me know if this is still an issue ?
&gt; 
&gt; Thanks,
&gt; Ionut C

Hi Ionut,

it works for me now.

Diego</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42809</commentid>
    <comment_count>10</comment_count>
    <who name="Ionut Chisanovici">ionutx.chisanovici</who>
    <bug_when>2014-04-22 08:18:00 +0000</bug_when>
    <thetext>The it is verified.

Ionut C</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>