Skip to contentSkip to conversation

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

PATCH In review Drew Moseley 5 participants 11 messages May 8, 2014 – May 12, 2014

lore
Share & tools
lore
#0 lore raw

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
index 84b6d4f..2ca5a93 100644
@@ -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
index d6e6fbc..211df3b 100644
@@ -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
#1 lore raw
Quoted 1 line · Drew Moseley

+PACKAGECONFIG[glut] = "--with-glut=${STAGING_LIBDIR},--without-glut,"

should this be libdir instead ?

#2 lore raw
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

#3 lore raw
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

#4 lore raw
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_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

#5 lore raw

PATCH 1/1 mesa-demos: Specify the lib dir to locate glut libraries

In reply to Drew Moseley

From: 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
index d6e6fbc..7cda19e 100644
@@ -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
#6 lore raw
Quoted 3 lines · Drew Moseley

From: 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

#7 lore raw
In reply to Drew Moseley
Quoted 13 lines · Drew Moseley

From: 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
index d6e6fbc..7cda19e 100644

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!

#8 lore raw

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
index 2ca5a93..84b6d4f 100644
@@ -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
index 211df3b..7cda19e 100644
@@ -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
#9 lore raw

Re: [PATCH] mesa-demos: Specify the lib dir properly.

Quoted 5 lines · \Drew Moseley

From: Drew Moseley <[email protected]>

Use STAGING_EXECPREFIXDIR to specify the location of glut header files and libs rather than STAGING_LIBDIR.

Quoted 7 lines

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(-)

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

#10 lore raw

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_EXECPREFIXDIR to specify the location of glut header files and libs rather than STAGING_LIBDIR.

Quoted 7 lines

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(-)
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