| Summary: | piglit fails to build on qemux86* | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Martin Jansa <Martin.Jansa> | ||||
| Component: | graphics | Assignee: | Jussi Kukkonen <jku> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium+ | CC: | jku, meta.mr.watcher, meta.watcher, ross.burton, sgw | ||||
| Version: | 2.2 | ||||||
| Target Milestone: | 2.2 M4 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
|
Description
Martin Jansa
2016-06-29 15:10:11 UTC
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. Created attachment 3269 [details]
cmake: Link utils with xcb explicitly
I just can't reproduce this, which is weird because there's no autodetection tomfoolery that I can see. I've tried building a "qemux86 nodistro piglit" and it builds, whatever I do.
Looking at the linker flags it does seem like a missing "-lxcb", but it'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'll send this patch and we'll see if it helps in your next build.
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 'dlsym' | ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to 'dlerror' | ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to 'dlopen' | 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' | 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. Hopefully fixed in oe-core 913149f269679bda87badb94e1de66646fdc5362. Maybe the new failure should be a new bug ... but I'm reopening this based on Martins last comment: that must be with new piglit and won't be fixed with the xcb link patch. (In reply to comment #3) > Are you using gold with nodistro? You might need to enable gold in order to > reproduce this. This sounds like a really good guess: I wasn't using gold. I'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 "-ldl" to the relevant linker flag, feel free.
>
> (In reply to comment #3)
> > Are you using gold with nodistro? You might need to enable gold in order to
> > reproduce this.
>
> This sounds like a really good guess: I wasn't using gold.
>
> I'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 "-ldl" to the
> relevant linker flag, feel free.
Recreated the build error with :
DISTRO_FEATURES_append = " ld-is-gold opengl"
in local.conf
| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to 'dlsym'
| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to 'dlerror'
| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to 'dlopen'
| collect2: error: ld returned 1 exit status
As you have mentioned, this fixes it:
LDFLAGS_append_qemux86 = " ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-ldl', '', d)}"
The non-optimal fix was taken into master so builds should no longer break (and so the bugs doesn't really need to be medium+ anymore). I'll keep the bug open though: LDFLAGS_append is not really the appropriate fix. I'll send a build system patch upstream soon along with the xcb link fix. commit 2e8c59d059b21dce23c848e837bd98de5e21dafd Author: Jussi Kukkonen <jussi.kukkonen@intel.com> 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) |