<?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>11725</bug_id>
          
          <creation_ts>2017-06-27 15:49:08 +0000</creation_ts>
          <short_desc>sanity.bbclass: check for libsdl-native is broken</short_desc>
          <delta_ts>2017-10-04 09:44:47 +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>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>2.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Yau Wai Gan">yau.wai.gan</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>juro.bystricky</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
    
    <cc>yau.wai.gan</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>74574</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-06-27 15:49:08 +0000</bug_when>
    <thetext>To reproduce:

- set up a clean build directory (in particular, conf/sanity_info must not exist)
- add ASSUME_PROVIDED += &quot;libsdl-native&quot; to local.conf
- bitbake qemu-native

It fails with:
&quot;libsdl-native is set to be ASSUME_PROVIDED but sdl-config can&apos;t be
found in PATH. Please either install it, or configure qemu not to
require sdl.&quot;

The check in sanity.bbclass is out-dated and fails because sdl-config is not in HOSTTOOLS. It shouldn&apos;t be added there either, because that would affect all recipes and qemu.inc doesn&apos;t need it at all.

From qemu.inc:

do_configure_prepend_class-native() {
        # Append build host pkg-config paths for native target since the host may provide sdl
        BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo &quot;&quot;)
        if [ ! -z &quot;$BHOST_PKGCONFIG_PATH&quot; ]; then
                export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
        fi

insanity.bbclass could use the host pkg-config to ensure that sdl.pc is installed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74575</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-06-27 15:49:46 +0000</bug_when>
    <thetext>Originally found by Jonathan Liu.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74632</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-06-29 09:51:35 +0000</bug_when>
    <thetext>I&apos;ve a patch that just deletes the check.  Do we really need the extra check?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74633</commentid>
    <comment_count>3</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-06-29 10:08:00 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; I&apos;ve a patch that just deletes the check.  Do we really need the extra check?

I&apos;d be fine with simply removing it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76092</commentid>
    <comment_count>4</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-08-23 17:59:26 +0000</bug_when>
    <thetext>This is a periodically recurring problem, see for example:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=8553
https://bugzilla.yoctoproject.org/show_bug.cgi?id=7469

Basically, the order of libraries is important, this should fix it in local.conf:

ASSUME_PROVIDED += &quot;libsdl-native&quot;
BUILD_LDFLAGS_prepend_pn-qemu-native = &quot;-Wl,-rpath-link,/lib/x86_64-linux-gnu &quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76094</commentid>
    <comment_count>5</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-08-23 18:09:54 +0000</bug_when>
    <thetext>Maybe the sanity check message can be simply updated to suggest adding the extra line BUILD_LDFLAGS_prepend_pn-qemu-native in local.conf...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76101</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-08-23 21:13:18 +0000</bug_when>
    <thetext>Assuming this does fix it, can we have qemu-native do the right thing so that users don&apos;t have to insert this line into their configuration?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76103</commentid>
    <comment_count>7</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-08-23 22:09:01 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; Assuming this does fix it, can we have qemu-native do the right thing so
&gt; that users don&apos;t have to insert this line into their configuration?


I would say yes, providing the recipe can somehow detect we specified ASSUME_PROVIDED += &quot;libsdl-native</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76113</commentid>
    <comment_count>8</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-08-24 06:37:49 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; This is a periodically recurring problem, see for example:
&gt; https://bugzilla.yoctoproject.org/show_bug.cgi?id=8553
&gt; https://bugzilla.yoctoproject.org/show_bug.cgi?id=7469

Those are problems with building qemu-native. This issue here is about the sanity test and that it checks for SDL differently than qemu-native, so this not quite the same.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77333</commentid>
    <comment_count>9</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-10-04 09:44:47 +0000</bug_when>
    <thetext>Turns out I&apos;d already fixed this ages ago.

Closed in oe-core a8d8b0d9e1c2346d5a314ed0a7bf5be66044a51d.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>