mesa-demos: Specify the lib dir to locate glut libraries
PATCH 1/1 mesa-demos: Specify the lib dir to locate glut libraries
From: Drew Moseley <[email protected]>
--- meta/recipes-graphics/mesa/mesa-demos/glut.patch | 2 +- meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-demos/glut.patch +1 -1
@@ -27,7 +27,7 @@ Index: mesa-demos-8.0.1/configure.ac - [glutInit], - [], - [glut_enabled=no]) -+ GLUT_LIBS="-L$withval/lib -lglut"], ++ GLUT_LIBS="-L$withval -lglut"], + [GLUT_CFLAGS="" + GLUT_LIBS="-lglut"] + )
meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb +1 -1
@@ -33,7 +33,7 @@ PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype" PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl" PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1" PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2" -PACKAGECONFIG[glut] = "--with-glut,--without-glut," +PACKAGECONFIG[glut] = "--with-glut=${STAGING_LIBDIR},--without-glut," PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa," PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libvg" PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
Signature · 1 line
1.7.9.5
Quoted 1 line · Drew Moseley
+PACKAGECONFIG[glut] = "--with-glut=${STAGING_LIBDIR},--without-glut,"
should this be libdir instead ?
Quoted 4 lines · Khem Raj
Quoted 1 line · Drew Moseley
+PACKAGECONFIG[glut] = "--with-glut=${STAGING_LIBDIR},--without-glut,"
should this be libdir instead ?
I don't believe so. This is used at compile time to locate the libraries and header files. However forcing it here to be the libdir is clearly not correct even though it doesn't seem to break the build.
I'll continue investigating and see if I can find a better solution.
Drew
Quoted 5 lines · Drew Moseley
Quoted 1 line
should this be libdir instead ?
I don't believe so. This is used at compile time to locate the libraries and header files. However forcing it here to be the libdir is clearly not correct even though it doesn't seem to break the build.
I'll continue investigating and see if I can find a better solution.
For configure-time detection of libraries STAGING_LIBDIR is correct.
Ross
Quoted 10 lines · Ross
Quoted 5 lines · Drew Moseley
Quoted 1 line
should this be libdir instead ?
I don't believe so. This is used at compile time to locate the libraries and header files. However forcing it here to be the libdir is clearly not correct even though it doesn't seem to break the build.
I'll continue investigating and see if I can find a better solution.
For configure-time detection of libraries
STAGING_LIBDIRis correct.Ross
It's actually a bit different than just standard configure-time detection. With the current code, all that is specified on the configure command line is "--with-glut" which results in the following compile issue:
| ../../x86_64-mel-linux-libtool: line 6012: cd: yes/lib: No such file or directory | x86_64-mel-linux-libtool: link: cannot determine absolute directory name of `yes/lib' | make[2]: *** [libutil.la] Error 1
Interestingly since we use the '--sysroot=' command line option then the actual value specified to '--with-glut' is actually redundant. STAGING_LIBDIR is not the right value here though since it's used to located both header files and libs. I'm testing an updated version now.
Drew
PATCH 1/1 mesa-demos: Specify the lib dir to locate glut libraries
In reply to Drew MoseleyFrom: Drew Moseley <[email protected]>
--- meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb +1 -1
@@ -33,7 +33,7 @@ PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype" PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl" PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1" PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2" -PACKAGECONFIG[glut] = "--with-glut,--without-glut," +PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut," PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa," PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libvg" PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
Signature · 1 line
1.7.9.5
Quoted 3 lines · Drew Moseley
From: Drew Moseley <[email protected]>
Signed-off-by Drew Moseley <[email protected]>
Not sure why "git send-email" dropped the V2 that I thought I put into the subject but for clarity this patch completely replaces my earlier one.
The modification of glut.patch is no longer needed.
Drew
Quoted 13 lines · Drew Moseley
From: Drew Moseley <[email protected]>
Signed-off-by Drew Moseley <[email protected]>--- meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb +0
-0
meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype" · line 39
Quoted 8 lines
meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb +1
-1@@ -33,7 +33,7 @@ PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype" PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl" PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1" PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2" -PACKAGECONFIG[glut] = "--with-glut,--without-glut," +PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut," PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa," PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libvg" PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
Seems the first version was merged already, so we could revert it or if you want to rebase this change against master, which would remove the configure patch and update the PACKAGECONFIG as above.
Thanks
Sau!
PATCH 1/1 mesa-demos: Specify the lib dir properly.
From: Drew Moseley <[email protected]>
Use STAGING_EXECPREFIXDIR to specify the location of glut header files and libs rather than STAGING_LIBDIR.
Also revert the previous unneeded change to glut.patch.
--- meta/recipes-graphics/mesa/mesa-demos/glut.patch | 2 +- meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-demos/glut.patch +1 -1
@@ -27,7 +27,7 @@ Index: mesa-demos-8.0.1/configure.ac - [glutInit], - [], - [glut_enabled=no]) -+ GLUT_LIBS="-L$withval -lglut"], ++ GLUT_LIBS="-L$withval/lib -lglut"], + [GLUT_CFLAGS="" + GLUT_LIBS="-lglut"] + )
meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb +1 -1
@@ -33,7 +33,7 @@ PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype" PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl" PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1" PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2" -PACKAGECONFIG[glut] = "--with-glut=${STAGING_LIBDIR},--without-glut," +PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut," PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa," PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libvg" PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
Signature · 1 line
1.7.9.5
Re: [PATCH] mesa-demos: Specify the lib dir properly.
Quoted 5 lines · \Drew Moseley
From: Drew Moseley <[email protected]>
Use
STAGING_EXECPREFIXDIRto specify the location of glut header files and libs rather thanSTAGING_LIBDIR.
Quoted 7 lines
Also revert the previous unneeded change to glut.patch.
Signed-off-by Drew Moseley <[email protected]>--- meta/recipes-graphics/mesa/mesa-demos/glut.patch | 2 +- meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Is this change multilib safe?
It looks to me like this hardcodes "lib" and things like "lib64" or "lib32" would be an issue since it wouldn't honour $libdir?
Cheers,
Richard
Re: [PATCH] mesa-demos: Specify the lib dir properly.
Quoted 14 lines · Richard Purdie
Quoted 5 lines · \Drew Moseley
From: Drew Moseley <[email protected]>
Use
STAGING_EXECPREFIXDIRto specify the location of glut header files and libs rather thanSTAGING_LIBDIR.Quoted 7 lines
Also revert the previous unneeded change to glut.patch.
Signed-off-by Drew Moseley <[email protected]>---
meta/recipes-graphics/mesa/mesa-demos/glut.patch | 2 +- meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 8 lines
Is this change multilib safe?
It looks to me like this hardcodes "lib" and things like "lib64" or "lib32" would be an issue since it wouldn't honour $libdir?
Cheers,
Richard
Sort of. This is essentially putting the code back to what it was yesterday which was hardcoded to /lib. It doesn't affect Yocto builds since the "--sysroot" option makes the directories specified here redundant. I have verified the libraries are properly located even when installed in usr/lib64.
Ultimately this should probably be cleaned up in the upstream mesa-demos by adding a "--with-glut-includes" and "--with-glut-libs" or some such but
this is at least less broken than it was before Previously setting "glut"
in the packageconfig would pass "--with-glut" to configure resulting in the build failure:
Quoted 3 lines
../../x86_64-mel-linux-libtool: line 6012: cd: yes/lib: No such file or directory
x86_64-mel-linux-libtool: link: cannot determine absolute directory name of `yes/lib' make[2]: *** [libutil.la] Error 1
Drew