<?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>8409</bug_id>
          
          <creation_ts>2015-09-28 16:52:35 +0000</creation_ts>
          <short_desc>qemu fails to build on headless system</short_desc>
          <delta_ts>2016-03-29 18:21:13 +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>devtools / tool chain</component>
          <version>1.8</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Golle">dgolle</reporter>
          <assigned_to name="Daniel Golle">dgolle</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>ross.burton</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>54746</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Golle">dgolle</who>
    <bug_when>2015-09-28 16:52:35 +0000</bug_when>
    <thetext>qemu pulls in libGLU which fails to locate liubGL.so.
This is due to mesa only providing libGL is DISTRO_FEATURES &apos;x11&apos; is set.
However, on headless systems (think: edgerouter-lite) it doesn&apos;t make sense to build with x11 (nor libGL or mesa, but nvm), yet qemu/kvm is usefull on these systems for headless VM images (qemu --nographic ...).
Possible solutions:
* build qemu without SDL, x11, ... depending on DISTRO_FEATURES
* make sure qemu doesn&apos;t depend on libGLU
* make sure mesa actually provides libGL even on systems without x11

The first solution isn&apos;t that great because it also prevents using VNC or SPICE remotely.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54870</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-10-01 13:08:48 +0000</bug_when>
    <thetext>&quot;* make sure mesa actually provides libGL even on systems without x11&quot; doesn&apos;t make any sense - libGL.so is explicitly bound to libX11 (its the GLX API).

Are you sure that qemu won&apos;t do VNC/SPICE when SDL is disabled?  I&apos;m sure I&apos;ve ran it headless with a VNC connection in the past.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54875</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-10-01 13:55:13 +0000</bug_when>
    <thetext>Qemu doesn&apos;t need X11 nor SDL for VNC to work:

$ runqemu qemux86
[...]
VNC server running on `::1:5900&apos;

$ ldd /data/poky-master/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-i386
	linux-vdso.so.1 (0x00007ffef3297000)
	libz.so.1 =&gt; /data/poky-master/tmp/sysroots/x86_64-linux/usr/bin/../lib/libz.so.1 (0x00007f4557f17000)
	libpixman-1.so.0 =&gt; /data/poky-master/tmp/sysroots/x86_64-linux/usr/bin/../lib/libpixman-1.so.0 (0x00007f4557c6c000)
	libutil.so.1 =&gt; /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f4557a69000)
	libasound.so.2 =&gt; /data/poky-master/tmp/sysroots/x86_64-linux/usr/bin/../lib/libasound.so.2 (0x00007f4557770000)
	libuuid.so.1 =&gt; /data/poky-master/tmp/sysroots/x86_64-linux/usr/bin/../lib/libuuid.so.1 (0x00007f455756c000)
	libfdt.so.1 =&gt; /data/poky-master/tmp/sysroots/x86_64-linux/usr/bin/../lib/libfdt.so.1 (0x00007f4557366000)
	libgthread-2.0.so.0 =&gt; /data/poky-master/tmp/sysroots/x86_64-linux/usr/bin/../lib/libgthread-2.0.so.0 (0x00007f4557165000)
	libglib-2.0.so.0 =&gt; /data/poky-master/tmp/sysroots/x86_64-linux/usr/bin/../lib/libglib-2.0.so.0 (0x00007f4556e2d000)
	librt.so.1 =&gt; /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4556c25000)
	libstdc++.so.6 =&gt; /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f455691a000)
	libm.so.6 =&gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4556619000)
	libgcc_s.so.1 =&gt; /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4556403000)
	libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f45561e6000)
	libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4555e3d000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f4558d41000)
	libdl.so.2 =&gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4555c39000)

libSDL will only depend on GL if your distro wants OpenGL, so you should probably remove &quot;opengl&quot; from DISTRO_EFATURES too.  Removing &quot;sdl&quot; from qemu&apos;s PACKAGECONFIG will stop it linking to SDL at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54888</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-10-01 15:14:32 +0000</bug_when>
    <thetext>If you remove opengl and x11 from DISTRO_FEATURES then qemu will happily build without any other intervention.  It links to SDL which isn&apos;t ideal but maybe you&apos;ll end up with some awesome ascii-rendered virtual machine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54896</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-10-01 15:25:36 +0000</bug_when>
    <thetext>In fact, this must be fixed in master already and is specific to 1.8 as I just removed x11 from DISTRO_FEATURES and qemu builds fine.

Marking as a potential 1.8.1 (impact needs to be reviewed) and assigning to the 1.8 maintainer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55191</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Golle">dgolle</who>
    <bug_when>2015-10-12 15:27:47 +0000</bug_when>
    <thetext>Thanks everyone for having a deeper look at the issue!
The intention is indeed to use qemu with libvirt headless with VMs providing only ASCII output, if any.
I didn&apos;t verify dependencies of SPICE/VNC because we don&apos;t use them, just mentioned them because that was the only thing which came into my mind what one could potentially use SDL or libGLU for on a headless system. If that doesn&apos;t require linking against libGLU, even better.
We got neither &apos;opengl&apos; nor &apos;x11&apos; set in DISTRO_EFATURES, however, adding both, &apos;x11&apos; and &apos;opengl&apos; to DISTRO_FEATURES is the current work-around leading to a successful qemu build based on poky-1.8.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57735</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-01-12 10:23:42 +0000</bug_when>
    <thetext>On the latest fido branch and x11 and opengl removed from DISTRO_FEATURES with the following in my local.conf:
    DISTRO_FEATURES_remove = &quot;opengl x11&quot;

I am able to build qemu (tested with a qemux86 MACHINE).

If this issue persists could you please provide steps for reproduction?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59469</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-25 15:52:21 +0000</bug_when>
    <thetext>Closing as nobody else can replicate and the reporter hasn&apos;t provided any further feedback.

Daniel, if you can still replicate this, please reopen and provide more details.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>