Bug 5335 - libav and libpostproc read_subpackage_metadata fails with "Recipe libpostproc is trying to change PR from 'r1' to 'r0'" when build in an image
Summary: libav and libpostproc read_subpackage_metadata fails with "Recipe libpostproc...
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: multimedia (show other bugs)
Version: 1.5
Hardware: Other arm
: Medium normal
Target Milestone: 1.6
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-10-10 13:53 UTC by Diego
Modified: 2014-04-22 08:18 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego 2013-10-10 13:53:09 UTC
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 'r0' to 'r1'. 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 '1'

or, for libpostproc:
ERROR: Recipe libpostproc is trying to change PR from 'r1' to 'r0'. 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 '1'


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

You'll get this problem.

Cleaning and rebuilding the "libav" and "libpostproc" workarounds the bugs, and then you are able to build the whole image. For example:
bitbake -c clean libav && bitbake libav
and then:
bitbake your-image
Comment 1 Paul Eggleton 2013-10-10 15:06:05 UTC
This looks like the external libpostproc recipe in meta-oe conflicting with the libpostproc library supplied by libav 0.8.x. Basically if you're building libav 0.8.x then you shouldn't be building the external libpostproc at all. I'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'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't widely used.
Comment 2 Diego 2013-10-28 18:18:01 UTC
(In reply to comment #1)
> This looks like the external libpostproc recipe in meta-oe conflicting with
> the libpostproc library supplied by libav 0.8.x. Basically if you're
> building libav 0.8.x then you shouldn't be building the external libpostproc
> at all. I'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'm not sure if that would
> completely solve the problem in any case.
> 

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

> 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't widely used.

I'm not sure I really need it, but the problems holds anyway.
Comment 3 Paul Eggleton 2013-12-20 14:57:46 UTC
I've sent a patch to add libpostproc to PROVIDES in the libav 0.8.x recipe, so that you get a "multiple provider" 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.
Comment 5 Ionut Chisanovici 2014-01-14 15:51:42 UTC
(In reply to comment #0)
> 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 'r0' to 'r1'. 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 '1'
> 
> or, for libpostproc:
> ERROR: Recipe libpostproc is trying to change PR from 'r1' to 'r0'. 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
> '1'
> 
> 
> This is easy to reproduce (dora branch as of today).
> 1) create your own image recipe based on "core-image-x11"
> 2) add:
> IMAGE_INSTALL += "libavcodec \
>                 libavdevice \
>                 libavformat \
>                 libavutil \
>                 libswscale \
>                 libpostproc \
>                 libavfilter \
> "
> 3) bitbake your-image
> 
> You'll get this problem.
> 
> Cleaning and rebuilding the "libav" and "libpostproc" workarounds the bugs,
> and then you are able to build the whole image. For example:
> bitbake -c clean libav && bitbake libav
> and then:
> 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 += "libavcodec \
                 libavdevice \
                 libavformat \
                 libavutil \
                 libswscale \
                 libpostproc \
                 libavfilter \
"
Also, in the local.conf file I have MACHINE ?="qemuarm".
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 'libavcodec' (but /home/ionut/work/poky/meta/recipes-graphics/images/core-image-x11.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'libavcodec' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['libavcodec']
ERROR: Required build target 'core-image-x11' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-x11', 'libavcodec']

Cheers,
Ionut
Comment 6 Diego 2014-01-15 09:51:13 UTC
(In reply to comment #5)
> ERROR: Nothing RPROVIDES 'libavcodec' (but
> /home/ionut/work/poky/meta/recipes-graphics/images/core-image-x11.bb
> RDEPENDS on or otherwise requires it)
> NOTE: Runtime target 'libavcodec' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['libavcodec']
> ERROR: Required build target 'core-image-x11' has no buildable providers.
> Missing or unbuildable dependency chain was: ['core-image-x11', 'libavcodec']

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.
Comment 7 Ionut Chisanovici 2014-01-15 13:14:08 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > ERROR: Nothing RPROVIDES 'libavcodec' (but
> > /home/ionut/work/poky/meta/recipes-graphics/images/core-image-x11.bb
> > RDEPENDS on or otherwise requires it)
> > NOTE: Runtime target 'libavcodec' is unbuildable, removing...
> > Missing or unbuildable dependency chain was: ['libavcodec']
> > ERROR: Required build target 'core-image-x11' has no buildable providers.
> > Missing or unbuildable dependency chain was: ['core-image-x11', 'libavcodec']
> 
> 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.

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 = "6"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

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

Regards,
Ionut C
Comment 8 Ionut Chisanovici 2014-04-16 09:17:35 UTC
Hi Diego,

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

Thanks,
Ionut C
Comment 9 Diego 2014-04-16 14:11:31 UTC
(In reply to comment #8)
> Hi Diego,
> 
> Can you please update the bug and let me know if this is still an issue ?
> 
> Thanks,
> Ionut C

Hi Ionut,

it works for me now.

Diego
Comment 10 Ionut Chisanovici 2014-04-22 08:18:00 UTC
The it is verified.

Ionut C