<?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>8553</bug_id>
          
          <creation_ts>2015-10-21 10:35:44 +0000</creation_ts>
          <short_desc>qemu-native to build on Ubuntu 15.10</short_desc>
          <delta_ts>2016-04-22 10:03:18 +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.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</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>2.1</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Mihail Stanciu">stanciux.mihail</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>a.schuller</cc>
    
    <cc>alex.kanavin</cc>
    
    <cc>alexandru.c.georgescu</cc>
    
    <cc>dl9pf</cc>
    
    <cc>eduard.bartosh</cc>
    
    <cc>francisco.j.pedraza.gonzalez</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>ricardo.ribalda</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tracy.graydon</cc>
          
          <qa_contact name="Mihail Stanciu">stanciux.mihail</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Found by QA test)</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>55547</commentid>
    <comment_count>0</comment_count>
    <who name="Mihail Stanciu">stanciux.mihail</who>
    <bug_when>2015-10-21 10:35:44 +0000</bug_when>
    <thetext>Tested with master: 8578bc17b54da97d42b257b3c8f398ac52b91a9f
OS: Ubuntu 15.10 beta

Building a core-image-minimal fails with error:

| ERROR: User requested feature sdl
|        configure was not able to find it.
|        Install SDL devel


List of installed sdl packages:

libsdl1.2-dbg:amd64
libsdl1.2-dev
libsdl1.2debian:amd64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55577</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-10-21 17:32:18 +0000</bug_when>
    <thetext>Workaround: add BUILD_LDFLAGS_prepend_pn-qemu-native = &quot;-Wl,-rpath-link,/lib/x86_64-linux-gnu &quot; to local.conf.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55882</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-10-28 09:38:56 +0000</bug_when>
    <thetext>I&apos;ll take it. Please let me know if you already working on it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55949</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-10-28 17:15:25 +0000</bug_when>
    <thetext>For anyone not able to replicate, this is what happens:

libpulsecommon-6.0.so: undefined reference to `dbus_watch_get_enabled@LIBDBUS_1_3&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55964</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-10-29 09:03:37 +0000</bug_when>
    <thetext>The strange thing is that when I run the same configure command manually it works just fine. It must be something in the environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55965</commentid>
    <comment_count>5</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-10-29 09:35:38 +0000</bug_when>
    <thetext>unset LDFLAGS before running configure made it working. I&apos;ll dig further.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55971</commentid>
    <comment_count>6</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-10-29 10:30:03 +0000</bug_when>
    <thetext>The reason is this part of LDFLAGS: -Wl,-rpath-link,/home/ed/yocto/poky/build/tmp/sysroots/i686-linux/lib

Because of above rpath option linker takes yocto dbus libraries instead of host ones and breaks as some symbols required by pulseaudio are not provided by yocto dbus.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55990</commentid>
    <comment_count>7</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-10-29 13:22:30 +0000</bug_when>
    <thetext>Both qemu and qemu-native builds worked for me on Ubuntu 15.10 and OpenSUSE 12.3 with this patch: https://gist.github.com/bartosh/b589e457a9fe60640fe1

The patch just clears up LDFLAGS and CFLAGS, making the build to use only host libraries. Mixing yocto native libraries with host libraries can and will cause similar build issues from my point of view.


Thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56029</commentid>
    <comment_count>8</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-10-30 07:09:13 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; Both qemu and qemu-native builds worked for me on Ubuntu 15.10 and OpenSUSE
&gt; 12.3 with this patch: https://gist.github.com/bartosh/b589e457a9fe60640fe1
&gt; 
&gt; The patch just clears up LDFLAGS and CFLAGS, making the build to use only
&gt; host libraries. Mixing yocto native libraries with host libraries can and
&gt; will cause similar build issues from my point of view.
&gt; 
&gt; 
&gt; Thoughts?

If you look at the qemu recipe, there are a number of DEPENDS which it expects to find built by the OE build process. I tried your patch and saw:

| ERROR: User requested feature uuid
|        configure was not able to find it.
|        Install libuuid devel

for example (since the util-linux-native dependency is now masked out. We&apos;d also have similar issues if the host didn&apos;t have glib-2.0-devel, zlib-devel and so on.

Its therefore not this simple unfortunately, you just have a lot of -devel packages installed on the machine you tested on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56030</commentid>
    <comment_count>9</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-10-30 07:09:36 +0000</bug_when>
    <thetext>I suspect upgrading dbus to the newer version will &quot;fix&quot; this btw.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56036</commentid>
    <comment_count>10</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-10-30 09:25:00 +0000</bug_when>
    <thetext>I agree that upgrading dbus might fix this issue for Ubuntu. However it might break it for other distro(s). My point was that we should choose one way(link qemu with yocto libs) or another(link with system libs) instead of balancing on the edge as we do now.

I can try to upgrade dbus, but it can potentially break qemu build on other distros. Are you sure we want that now?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56066</commentid>
    <comment_count>11</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-10-31 22:22:00 +0000</bug_when>
    <thetext>Upgraded dbus: http://lists.openembedded.org/pipermail/openembedded-core/2015-October/112168.html
Tested on Ubuntu 15.10 and OpenSUSE 13.2 by building core-image-minimal and running it with runqemu script. It worked just fine.


Tried an idea of running configure several times until it succeeds:
 - first time without any additional options
 - second time with adding output of pkg-config --libs sdl to LDFLAGS
 - third time with adding output of pkg-config --libs dbus-1 to LDFLAGS
Does this make sense for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56074</commentid>
    <comment_count>12</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-11-02 08:57:14 +0000</bug_when>
    <thetext>dbus upgrade has been rejected: http://lists.openembedded.org/pipermail/openembedded-core/2015-November/112173.html

Any other ideas how to fix it? Does it make sense to try running configure several times?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56135</commentid>
    <comment_count>13</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-11-03 13:02:07 +0000</bug_when>
    <thetext>Moved to 2.1 as upgrading dbus just before a release is too dangerous.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56169</commentid>
    <comment_count>14</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-11-04 08:31:10 +0000</bug_when>
    <thetext>Sent workaround for review: http://lists.openembedded.org/pipermail/openembedded-core/2015-November/112207.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56702</commentid>
    <comment_count>15</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2015-11-23 16:11:51 +0000</bug_when>
    <thetext>This happens on Debian testing/stretch/sid as well, for the same reason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56725</commentid>
    <comment_count>16</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-11-24 09:27:44 +0000</bug_when>
    <thetext>Do you want me to update a workaround to work for Debian?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56730</commentid>
    <comment_count>17</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-11-24 10:22:49 +0000</bug_when>
    <thetext>Robert, Chen: Any plans for dbus upgrade?
My attempt to upgrade to 1.10 was rejected http://lists.openembedded.org/pipermail/openembedded-core/2015-November/112173.html as I tried to do it just before a release.

I&apos;m just wondering if you can help with this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56731</commentid>
    <comment_count>18</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-11-24 10:32:31 +0000</bug_when>
    <thetext>Can you rework the workaround to remove the distro check and just do it all the time, and submit it to the list?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56732</commentid>
    <comment_count>19</comment_count>
    <who name="Ricardo Ribalda">ricardo.ribalda</who>
    <bug_when>2015-11-24 10:34:05 +0000</bug_when>
    <thetext>Probably a stupid question, but why dont we want to compile a host version of libsdl? if I got it right, it is the root of the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56733</commentid>
    <comment_count>20</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-11-24 10:39:40 +0000</bug_when>
    <thetext>Because that means building pulseaudio-native mesa-native gtk-native and more.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56736</commentid>
    <comment_count>21</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-11-24 11:09:41 +0000</bug_when>
    <thetext>Sent updated patch: http://lists.openembedded.org/pipermail/openembedded-core/2015-November/113264.html

please review</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56819</commentid>
    <comment_count>22</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-11-26 17:26:20 +0000</bug_when>
    <thetext>Ed&apos;s patch appears to break on older systems with our friend the libx11/libext _XEatDataWords error.  Testing my patch on the autobuilder now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56996</commentid>
    <comment_count>23</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-12-03 14:59:05 +0000</bug_when>
    <thetext>How it went with your patch? Did it work?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57071</commentid>
    <comment_count>24</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-12-07 12:25:07 +0000</bug_when>
    <thetext>After spending too long looking at this I decided we should build a libsdl-native after all.

I&apos;ve a patch which adds libsdl-native support with a minimal PACKAGECONFIG so it doesn&apos;t massively pull in build dependencies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57137</commentid>
    <comment_count>25</comment_count>
    <who name="Francisco Pedraza">francisco.j.pedraza.gonzalez</who>
    <bug_when>2015-12-08 23:19:44 +0000</bug_when>
    <thetext>Thanks a lot for the help :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57268</commentid>
    <comment_count>26</comment_count>
    <who name="Jan-Simon Moeller">dl9pf</who>
    <bug_when>2015-12-15 10:43:32 +0000</bug_when>
    <thetext>(In reply to comment #24)
&gt; After spending too long looking at this I decided we should build a
&gt; libsdl-native after all.
&gt; 
&gt; I&apos;ve a patch which adds libsdl-native support with a minimal PACKAGECONFIG
&gt; so it doesn&apos;t massively pull in build dependencies.


Can we do a backport to 2.0 for this then as it breaks with current distros like 15.10 ?

I agree on the &quot;either native or target&quot; linking - just no mix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58237</commentid>
    <comment_count>27</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-01-26 14:26:00 +0000</bug_when>
    <thetext>Poky switched over to building libsdl-native in 685daeb6e265ddbd28be0ef44dcc356727b99375.  oe-core was fixed in 3d6c31c3a4ff34376e17005a981bb55fc6f7a38f.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58882</commentid>
    <comment_count>28</comment_count>
    <who name="Mihail Stanciu">stanciux.mihail</who>
    <bug_when>2016-02-11 13:48:58 +0000</bug_when>
    <thetext>Verified for 2.1_M2: 3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58997</commentid>
    <comment_count>29</comment_count>
    <who name="Mihail Stanciu">stanciux.mihail</who>
    <bug_when>2016-02-15 09:07:02 +0000</bug_when>
    <thetext>Still present in 2.0.1_rc6: 5b12268f6e17574999f91628a60e21711cf62ee4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59617</commentid>
    <comment_count>30</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2016-03-02 08:31:01 +0000</bug_when>
    <thetext>(In reply to comment #29)
&gt; Still present in 2.0.1_rc6: 5b12268f6e17574999f91628a60e21711cf62ee4

present in 2.0.1.rc7 as well</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59810</commentid>
    <comment_count>31</comment_count>
    <who name="Tracy Graydon">tracy.graydon</who>
    <bug_when>2016-03-08 22:00:30 +0000</bug_when>
    <thetext>Incidentally, I just ran into this same issue with Debian 8 last night. I installed libsdl-dev to fix it, but I will try to reproduce it and add the particulars. Essentially the same error message as above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59814</commentid>
    <comment_count>32</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-08 22:44:42 +0000</bug_when>
    <thetext>If installing libsdl-dev works then that isn&apos;t the problem.  The problem is that on some distributions after installing libsdl-dev it still won&apos;t build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61535</commentid>
    <comment_count>33</comment_count>
    <who name="Alexander">a.schuller</who>
    <bug_when>2016-04-21 20:13:54 +0000</bug_when>
    <thetext>I have remove the whitespace in build/conf/local.conf from the rows

PACKAGECONFIG_append_pn-qemu-native = &quot;&lt;here&gt;sdl&quot;
PACKAGECONFIG_append_pn-nativesdk-qemu = &quot;&lt;here&gt;sdl&quot; 

and add the line below to my local.conf file
BUILD_LDFLAGS_prepend_pn-qemu-native = &quot;-Wl,-rpath-link,/lib/x86_64-linux-gnu&quot;
now it works well.

here my currently local.conf

MACHINE ??= &apos;cgtimx6&apos;
DISTRO ?= &apos;poky&apos;
PACKAGE_CLASSES ?= &quot;package_rpm&quot;
EXTRA_IMAGE_FEATURES = &quot;debug-tweaks&quot;
USER_CLASSES ?= &quot;buildstats image-mklibs&quot;
PATCHRESOLVE = &quot;noop&quot;
BB_DISKMON_DIRS = &quot;\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K&quot;
PACKAGECONFIG_append_pn-qemu-native = &quot;sdl&quot;
PACKAGECONFIG_append_pn-nativesdk-qemu = &quot;sdl&quot;
ASSUME_PROVIDED += &quot;libsdl-native&quot;
CONF_VERSION = &quot;1&quot;

DL_DIR ?= &quot;${BSPDIR}/downloads/&quot;
ACCEPT_FSL_EULA = &quot;1&quot;
BUILD_LDFLAGS_prepend_pn-qemu-native = &quot;-Wl,-rpath-link,/lib/x86_64-linux-gnu&quot;



regards,

alex</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61538</commentid>
    <comment_count>34</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-04-21 21:34:28 +0000</bug_when>
    <thetext>That whitespace is actually important.  If you want to disable sdl the comment out those lines.

There&apos;s a series of patches to fix this properly in the jethro branch, which should be released as 2.0.2 shortly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61539</commentid>
    <comment_count>35</comment_count>
    <who name="Alexander">a.schuller</who>
    <bug_when>2016-04-21 22:08:58 +0000</bug_when>
    <thetext>I don&apos;t understand, why is the whitespaces important actually?
Please explain this, to get more comprehension.
I just beginning to work with yocto.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61541</commentid>
    <comment_count>36</comment_count>
    <who name="Francisco Pedraza">francisco.j.pedraza.gonzalez</who>
    <bug_when>2016-04-22 01:02:09 +0000</bug_when>
    <thetext>(In reply to comment #35)
&gt; I don&apos;t understand, why is the whitespaces important actually?
&gt; Please explain this, to get more comprehension.
&gt; I just beginning to work with yocto.

Hi
In the latest versions of ubuntu this fix is not neede anymore.
Are you facing it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61546</commentid>
    <comment_count>37</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-04-22 07:57:38 +0000</bug_when>
    <thetext>_append doesn&apos;t insert whitespace so if the value is a whitespace separated list then you need to add your own whitespace.  If you are disabling SDL (which is likely what your packageconfig changes were doing) then you don&apos;t need any further changes to the qemu build, the linker flag changes were an attempt to make the build work when SDL is enabled.

Repeating that this is fixed in master and jethro branches, and will be released in 2.0.2 shortly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61552</commentid>
    <comment_count>38</comment_count>
    <who name="Mihail Stanciu">stanciux.mihail</who>
    <bug_when>2016-04-22 10:03:18 +0000</bug_when>
    <thetext>Marking as verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>