<?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>9851</bug_id>
          
          <creation_ts>2016-06-29 15:10:11 +0000</creation_ts>
          <short_desc>piglit fails to build on qemux86*</short_desc>
          <delta_ts>2016-09-15 06:36:02 +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>graphics</component>
          <version>2.2</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.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Jussi Kukkonen">jku</assigned_to>
          <cc>jku</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</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>63459</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-06-29 15:10:11 +0000</bug_when>
    <thetext>It might be autodetecting something from host, because it fails for qemux86, but not for qemuarm on the same host.

It was reported multiple times in the status report on oe-core ML, here are latest logs:

http://errors.yoctoproject.org/Errors/Details/69790/
http://errors.yoctoproject.org/Errors/Details/69831/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63493</commentid>
    <comment_count>1</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-06-30 10:43:46 +0000</bug_when>
    <thetext>It seems libxcb pkg-config now has stricter Requires rules and piglit has been abusing the over-linking that resulted from the more lax rules.

Will fix in my upcoming piglit upgrade branch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63648</commentid>
    <comment_count>2</comment_count>
      <attachid>3269</attachid>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-07-05 08:20:37 +0000</bug_when>
    <thetext>Created attachment 3269
cmake: Link utils with xcb explicitly

I just can&apos;t reproduce this, which is weird because there&apos;s no autodetection tomfoolery that I can see. I&apos;ve tried building a &quot;qemux86 nodistro piglit&quot; and it builds, whatever I do.

Looking at the linker flags it does seem like a missing &quot;-lxcb&quot;, but it&apos;s weird that
 a) it links fine here (somewhat surprisingly)
 b) even in the failure logs gcc links fine, only g++ fails

Martin, feel free to test the patch if you have an easy way to do that. Otherwise I guess I&apos;ll send this patch and we&apos;ll see if it helps in your next build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64396</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-07-24 12:07:39 +0000</bug_when>
    <thetext>Not the error got different:
| Scanning dependencies of target fbo-drawbuffers-arbfp
| /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc   -march=armv5te -mthumb  --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemuarm -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/piglit/1.0+gitrAUTOINC+c39e41a865-r0=/usr/src/debug/piglit/1.0+gitrAUTOINC+c39e41a865-r0 -fdebug-prefix-map=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/x86_64-linux= -fdebug-prefix-map=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemuarm= -Wall -std=gnu99 -Werror=vla -Werror=pointer-arith -Werror=variadic-macros -g  -march=armv5te -mthumb  --sysroot=/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemuarm  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed CMakeFiles/fbo-fragcoord.dir/fbo-fragcoord.c.o  -o ../../../../bin/fbo-fragcoord -rdynamic ../../../../lib/libpiglitutil_gl.so.0 -lGL ../../../../lib/libpiglitutil.so.0 -lrt -lpng -lz -lm -lEGL -lwaffle-1 -lX11 -lGL -Wl,-rpath,/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/piglit/1.0+gitrAUTOINC+c39e41a865-r0/build/lib:
| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to &apos;dlsym&apos;
| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to &apos;dlerror&apos;
| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to &apos;dlopen&apos;
| collect2: error: ld returned 1 exit status
| make[2]: Leaving directory `/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/piglit/1.0+gitrAUTOINC+c39e41a865-r0/build&apos;
| make -f target_api/gl/tests/fbo/CMakeFiles/fbo-drawbuffers-arbfp.dir/build.make target_api/gl/tests/fbo/CMakeFiles/fbo-drawbuffers-arbfp.dir/build

Are you using gold with nodistro? You might need to enable gold in order to reproduce this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64494</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-26 16:31:51 +0000</bug_when>
    <thetext>Hopefully fixed in oe-core 913149f269679bda87badb94e1de66646fdc5362.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64506</commentid>
    <comment_count>5</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-07-26 18:02:04 +0000</bug_when>
    <thetext>Maybe the new failure should be a new bug ... but I&apos;m reopening this based on Martins last comment: that must be with new piglit and won&apos;t be fixed with the xcb link patch.

(In reply to comment #3)
&gt; Are you using gold with nodistro? You might need to enable gold in order to
&gt; reproduce this.

This sounds like a really good guess: I wasn&apos;t using gold.

I&apos;m now on holiday, back on August 12 or so. Maxin: if you want to try reproducing the build failure with ld-is-gold and then adding &quot;-ldl&quot; to the relevant linker flag, feel free.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64727</commentid>
    <comment_count>6</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2016-08-01 14:42:15 +0000</bug_when>
    <thetext>
&gt; 
&gt; (In reply to comment #3)
&gt; &gt; Are you using gold with nodistro? You might need to enable gold in order to
&gt; &gt; reproduce this.
&gt; 
&gt; This sounds like a really good guess: I wasn&apos;t using gold.
&gt; 
&gt; I&apos;m now on holiday, back on August 12 or so. Maxin: if you want to try
&gt; reproducing the build failure with ld-is-gold and then adding &quot;-ldl&quot; to the
&gt; relevant linker flag, feel free.

Recreated the build error with :
DISTRO_FEATURES_append = &quot; ld-is-gold opengl&quot;
in local.conf

| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to &apos;dlsym&apos;
| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to &apos;dlerror&apos;
| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to &apos;dlopen&apos;
| collect2: error: ld returned 1 exit status

As you have mentioned, this fixes it:
LDFLAGS_append_qemux86 = &quot; ${@bb.utils.contains(&apos;DISTRO_FEATURES&apos;, &apos;ld-is-gold&apos;, &apos;-ldl&apos;, &apos;&apos;, d)}&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65219</commentid>
    <comment_count>7</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-08-16 08:57:26 +0000</bug_when>
    <thetext>The non-optimal fix was taken into master so builds should no longer break (and so the bugs doesn&apos;t really need to be medium+ anymore).


I&apos;ll keep the bug open though: LDFLAGS_append is not really the appropriate fix. I&apos;ll send a build system patch upstream soon along with the xcb link fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66187</commentid>
    <comment_count>8</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-09-15 06:36:02 +0000</bug_when>
    <thetext>commit 2e8c59d059b21dce23c848e837bd98de5e21dafd
Author: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
Date:   Tue Sep 13 11:46:40 2016 +0300

    piglit: Backport linker flag patch
    
    Use the correct build system patch instead of adding linker flags
    in recipe. Also update upstream status for the other build patch.
    
    Fixes [YOCTO #9851].
    
    (From OE-Core rev: cd67959c4794b132cb9fd20a2a37cf862e172bed)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>3269</attachid>
            <date>2016-07-05 08:20:37 +0000</date>
            <delta_ts>2016-07-05 08:20:37 +0000</delta_ts>
            <desc>cmake: Link utils with xcb explicitly</desc>
            <filename>0001-cmake-Link-utils-with-xcb-explicitly.patch</filename>
            <type>text/plain</type>
            <size>1673</size>
            <attacher name="Jussi Kukkonen">jku</attacher>
            
              <data encoding="base64">RnJvbSA3M2U0ZmJjNTc3N2VkZGQ4OWJiMGZiMTZlOTAzNDM1NTFmZTNlMGVmIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBKdXNzaSBLdWtrb25lbiA8anVzc2kua3Vra29uZW5AaW50ZWwu
Y29tPgpEYXRlOiBUdWUsIDUgSnVsIDIwMTYgMTA6NTY6MjMgKzAzMDAKU3ViamVjdDogW1BBVENI
XSBjbWFrZTogTGluayB1dGlscyB3aXRoIHhjYiBleHBsaWNpdGx5CgpMaW5raW5nIHdpdGggZysr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