piglit: fix build failure with gold linker
PATCH 1/1 piglit: fix build failure with gold linker
When we use gold linker while DISTRO set to "nodistro", piglit build fails with the following error:
| ../../../../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
Fix it by providing '-ldl' to LDFLAGS.
[YOCTO #9851]
--- meta/recipes-graphics/piglit/piglit_git.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-graphics/piglit/piglit_git.bb +2 -0
@@ -30,6 +30,8 @@ do_compile[dirs] =+ "${B}/temp/" PACKAGECONFIG ??= "" PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," +LDFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-ldl', '', d)}" + do_configure_prepend() { if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then sed -i -e "/^#.*include <GL\/freeglut_ext.h>$/d" ${S}/src/piglit/glut_wrap.h
Signature · 1 line
2.4.0
Quoted 30 lines · Maxin B. John
When we use gold linker while DISTRO set to "nodistro", piglit build fails with the following error:
| ../../../../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 statusFix it by providing '-ldl' to LDFLAGS.
[YOCTO #9851]
Signed-off-by Maxin B. John <[email protected]>--- meta/recipes-graphics/piglit/piglit_git.bb | 2 ++ 1 file changed, 2 insertions(+)meta/recipes-graphics/piglit/piglit_git.bb +0
-0@@ -30,6 +30,8 @@ do_compile[dirs] =+ "${B}/temp/" PACKAGECONFIG ??= "" PACKAGECONFIG[freeglut] ="-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
Quoted 3 lines
+LDFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-ldl', '', d)}"
I think we should fix this with a build system patch and send it upstream -- the problem only shows up with gold but it looks like a real bug.
Jussi
+
Quoted 14 lines
do_configure_prepend() { if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then sed -i -e "/^#.*include <GL\/freeglut_ext.h>$/d"
${S}/src/piglit/glut_wrap.h
--
2.4.0--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Hi Jussi,
Quoted 3 lines · Jussi Kukkonen
Quoted 2 lines · Maxin B. John
<snip>
Quoted 7 lines
Quoted 3 lines
PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," +LDFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-ldl', '', d)}"
I think we should fix this with a build system patch and send it upstream -- the problem only shows up with gold but it looks like a real bug.
Agree, this looks like the best way to fix this bug. Please ignore this patch.
Quoted 1 line
Jussi
Best Regards,
Maxin
Quoted 25 lines · Maxin B. John
When we use gold linker while DISTRO set to "nodistro", piglit build fails with the following error:
| ../../../../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 statusFix it by providing '-ldl' to LDFLAGS.
[YOCTO #9851]
Signed-off-by Maxin B. John <[email protected]>--- meta/recipes-graphics/piglit/piglit_git.bb | 2 ++ 1 file changed, 2 insertions(+)meta/recipes-graphics/piglit/piglit_git.bb +0
-0
meta/recipes-graphics/piglit/piglit_git.bb do_compile[dirs] =+ "${B}/temp/" · line 33
Quoted 4 lines
meta/recipes-graphics/piglit/piglit_git.bb +1
-0@@ -30,6 +30,8 @@ do_compile[dirs] =+ "${B}/temp/" PACKAGECONFIG ??= "" PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," +LDFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-ldl', '', d)}"
Shouldn't this be fixed in piglit itself?
And does it need to be applied only for gold?
Quoted 11 lines
meta/recipes-graphics/piglit/piglit_git.bb +0
-0do_configure_prepend() { if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then sed -i -e "/^#.*include <GL\/freeglut_ext.h>$/d" ${S}/src/piglit/glut_wrap.hSignature · 7 lines
2.4.0 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]