Patchwork mesa-demos: Specify the lib dir to locate glut libraries

login
register
mail settings
Submitter Drew Moseley
Date May 8, 2014, 8:17 p.m.
Message ID <1399580261-16249-1-git-send-email-drew@moseleynet.net>
Download mbox | patch
Permalink /patch/71791/
State Accepted
Commit 76fd64f2e5755890fe442d023578e17355a52b20
Headers show

Comments

Drew Moseley - May 8, 2014, 8:17 p.m.
From: Drew Moseley <drew_moseley@mentor.com>

Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
---
 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(-)
Khem Raj - May 10, 2014, 6:33 a.m.
On Thu, May 8, 2014 at 1:17 PM, Drew Moseley <drew@moseleynet.net> wrote:
> +PACKAGECONFIG[glut] = "--with-glut=${STAGING_LIBDIR},--without-glut,"

should this be libdir instead ?
Drew Moseley - May 12, 2014, 2:40 p.m.
On May 10, 2014, at 2:33 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On Thu, May 8, 2014 at 1:17 PM, Drew Moseley <drew@moseleynet.net> wrote:
>> +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
Ross Burton - May 12, 2014, 3:06 p.m.
On 12 May 2014 15:40, Drew Moseley <drew@moseleynet.net> wrote:
>> 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
Drew Moseley - May 12, 2014, 3:28 p.m.
On May 12, 2014, at 11:06 AM, Burton, Ross <ross.burton@intel.com> wrote:
> On 12 May 2014 15:40, Drew Moseley <drew@moseleynet.net> wrote:
>>> 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

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

diff --git a/meta/recipes-graphics/mesa/mesa-demos/glut.patch b/meta/recipes-graphics/mesa/mesa-demos/glut.patch
index 84b6d4f..2ca5a93 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/glut.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/glut.patch
@@ -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"]
 +        )
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
index d6e6fbc..211df3b 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
@@ -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"