<?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>13355</bug_id>
          
          <creation_ts>2019-05-20 16:37:20 +0000</creation_ts>
          <short_desc>RDEPENDS does not work properly for native builds (only supports recipe names, not package names)</short_desc>
          <delta_ts>2021-01-31 10:45:41 +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>configuration</component>
          <version>unspecified</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>3.3 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Kanavin">alex.kanavin</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>randy.macleod</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>83864</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2019-05-20 16:37:20 +0000</bug_when>
    <thetext>RDEPENDS should be listing package names, not recipe names. Yet for native
recipes, the package list is empty, as set by the native.bbclass. Which results in a situation where only recipe names are allowed in RDEPENDS, or otherwise bitbake will complain about missing dependencies.

A reproducer:

add
RDEPENDS_${PN} = &apos;libicuio&apos; to libyaml recipe. (libicuio is a package
from icu recipe)

Then libyaml builds, but libyaml-native fails:

ERROR: Nothing RPROVIDES &apos;libicuio-native&apos; (but
virtual:native:/home/alexander/development/poky/meta/recipes-support/libyaml/libyaml_0.2.2.bb
RDEPENDS on or otherwise requires it)
NOTE: Runtime target &apos;libicuio-native&apos; is unbuildable, removing...
Missing or unbuildable dependency chain was: [&apos;libicuio-native&apos;]
ERROR: Required build target &apos;libyaml-native&apos; has no buildable providers.
Missing or unbuildable dependency chain was: [&apos;libyaml-native&apos;,
&apos;libicuio-native&apos;]

I do believe this is a proper bug. We work around it across many recipes by setting RDEPENDS_native to an empty string, but it should be addressed properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83872</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-05-21 22:05:18 +0000</bug_when>
    <thetext>Just to be clear whilst PACKAGES is empty there is:

native.bbclass:RPROVIDES = &quot;${PN}&quot;

which is why the PN value works as an RDEPENDS. 

Bitbake isn&apos;t mixing the DEPENDS and RDEPENDS namespaces and this issue is entirely an OE-Core problem related to the way OE has handled native recipes.

We&apos;d likely be able to do much better than the original situation where native recipes were entirely different to their target versions. Its really a question of someone having the time to unravel the mess and fix the issues. The question is then whether that is a lower or higher priority than all the other issues going on...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83874</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-05-21 22:19:27 +0000</bug_when>
    <thetext>There is also an additional problem.

The dependency mapping code in bbclass extend uses prefixes for a reason (nativesdk-bash, not bash-nativesdk). Somewhere there is an email from me which goes through all the options and explains why it was near impossible to implement a suffix extension which would work in all cases, it was only possible to make prefixes work generically.

If we wanted to make -native work magically with packages, I think we&apos;d run into that problem and I never did figure out a solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89098</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-01-31 10:45:41 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c4257ed8b1040a5a0e9a95846d81961741239116

RDEPENDS_${PN} = &apos;libicuio&apos; in the libyaml recipe now works as expected.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>