Skip to contentSkip to conversation

package/cegui: force libglew when libepoxy is also enabled

PATCH New Bartosz Bilas 3 participants 11 messages Apr 28, 2020 – May 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/cegui: force libglew when libepoxy is also enabled

Cegui doesn't allow to have enabled both opengl libraries so disable libepoxy when both are enabled.

Fixes:
- http://autobuild.buildroot.net/results/2881bbcc2dcfcaa5ed663817ff39f7574430ba5a/build-end.log

---
 package/cegui/cegui.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/cegui/cegui.mk +1 -1
index 434201b1f8..0e3d015948 100644
@@ -18,7 +18,7 @@ CEGUI_DEPENDENCIES = glm \
 		$(if $(BR2_PACKAGE_LIBGLEW),libglew) \
 		$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
-ifeq ($(BR2_PACKAGE_LIBEPOXY),y)
+ifeq ($(BR2_PACKAGE_LIBEPOXY)$(BR2_PACKAGE_LIBGLEW),y)
 CEGUI_DEPENDENCIES += libepoxy
 CEGUI_CONF_OPTS += -DCEGUI_USE_EPOXY=ON
 else
Signature · 1 line
2.26.2
#1 lore raw

PATCH 2/2 package/cegui: select libglu when libgl is detected

Fixes:
include/GL/glew.h:1205:14: fatal error: GL/glu.h: No such file or directory

---
 package/cegui/Config.in | 1 +
 package/cegui/cegui.mk  | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
package/cegui/Config.in +1 -0
index f917be0cc5..0c7932098c 100644
@@ -9,6 +9,7 @@ config BR2_PACKAGE_CEGUI
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_GLM
+	select BR2_PACKAGE_LIBGLU if BR2_PACKAGE_HAS_LIBGL
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Crazy Eddie's GUI System is a free library providing windowing
package/cegui/cegui.mk +2 -1
index 0e3d015948..4aaa065818 100644
@@ -16,7 +16,8 @@ CEGUI_DEPENDENCIES = glm \
 		$(if $(BR2_PACKAGE_HAS_LIBGL),libgl) \
 		$(if $(BR2_PACKAGE_HAS_LIBGLES),libgles) \
 		$(if $(BR2_PACKAGE_LIBGLEW),libglew) \
-		$(if $(BR2_PACKAGE_LIBICONV),libiconv)
+		$(if $(BR2_PACKAGE_LIBICONV),libiconv) \
+		$(if $(BR2_PACKAGE_LIBGLU),libglu)
 
 ifeq ($(BR2_PACKAGE_LIBEPOXY)$(BR2_PACKAGE_LIBGLEW),y)
 CEGUI_DEPENDENCIES += libepoxy
Signature · 1 line
2.26.2
#2 lore raw

PATCH 2/2 package/cegui: select libglu when libgl is detected

Hello,

Adding Bernd for libglew/libglu questions.

Quoted 4 lines · On Tue, 28 Apr 2020 21:58:44 +0200 Bartosz Bilas <[email protected]>…

Fixes:
include/GL/glew.h:1205:14: fatal error: GL/glu.h: No such file or directory

This should not be solved inside cegui: it's the glew.h header that includes GL/glu.h, so from the look of it, glew should depend on glu.

However, it turns out that glew has a GLEW_NO_GLU flag:

#ifndef GLEW_NO_GLU
/* this is where we can safely include GLU */
# if defined(__APPLE__) && defined(__MACH__)
# include <OpenGL/glu.h>
# else
# include <GL/glu.h>
# endif
#endif

I'm not sure how we should use that GLEW_NO_GLU flag. Should it be the responsibility of the package using glew to define it?

Could you do a bit of research on this?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/2 package/cegui: select libglu when libgl is detected

Hello all,

Quoted 7 lines · Thomas Petazzoni

Hello,

Adding Bernd for libglew/libglu questions.

On Tue, 28 Apr 2020 21:58:44 +0200
Bartosz Bilas <[email protected]> wrote:

Quoted 6 lines
Quoted 4 lines

Fixes:
include/GL/glew.h:1205:14: fatal error: GL/glu.h: No such file or directory

This should not be solved inside cegui: it's the glew.h header that includes GL/glu.h, so from the look of it, glew should depend on glu.

Are you sure? There is a couple of packages which have similar fix such as:

package/ogre/Config.in:??? select BR2_PACKAGE_LIBGLU # GL/glu.h package/supertux/Config.in:??? select BR2_PACKAGE_LIBGLU # GL/glu.h package/lugaru/Config.in:?? ?select BR2_PACKAGE_LIBGLU # GL/glu.h

Quoted 12 lines

However, it turns out that glew has a GLEW_NO_GLU flag:

#ifndef GLEW_NO_GLU
/* this is where we can safely include GLU */
# if defined(__APPLE__) && defined(__MACH__)
# include <OpenGL/glu.h>
# else
# include <GL/glu.h>
# endif
#endif

Quoted 4 lines

I'm not sure how we should use that GLEW_NO_GLU flag. Should it be the responsibility of the package using glew to define it?

Could you do a bit of research on this?

I will but not in the near future.

Quoted 1 line

Thanks, Thomas

Best
Bartek

#4 lore raw

PATCH 2/2 package/cegui: select libglu when libgl is detected

Quoted 9 lines · On Thu, 30 Apr 2020 21:54:15 +0200 Bartosz Bilas <[email protected]>…
Quoted 3 lines
Quoted 1 line

This should not be solved inside cegui: it's the glew.h header that includes GL/glu.h, so from the look of it, glew should depend on glu.

Are you sure? There is a couple of packages which have similar fix such as:

package/ogre/Config.in:??? select BR2_PACKAGE_LIBGLU # GL/glu.h package/supertux/Config.in:??? select BR2_PACKAGE_LIBGLU # GL/glu.h package/lugaru/Config.in:?? ?select BR2_PACKAGE_LIBGLU # GL/glu.h

And these packages are similarly wrong I believe. And yes, I am sure, see the code below:

Quoted 10 lines
Quoted 10 lines

However, it turns out that glew has a GLEW_NO_GLU flag:

#ifndef GLEW_NO_GLU
/* this is where we can safely include GLU */
# if defined(__APPLE__) && defined(__MACH__)
# include <OpenGL/glu.h>
# else
# include <GL/glu.h>
# endif
#endif

This clearly shows that glew is including <GL/glu.h>. So it should be the responsibility of glew to depend on glu, or to make it properly optional by defining GLEW_NO_GLU.

Hopefully Bernd will be able to comment on this.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 2/2 package/cegui: select libglu when libgl is detected

In reply to Bartosz Bilas

Hi,

Am Thu, 30 Apr 2020 21:54:15 +0200 schrieb Bartosz Bilas:

Quoted 4 lines

Are you sure? There is a couple of packages which have similar fix such as:

package/ogre/Config.in:??? select BR2_PACKAGE_LIBGLU # GL/glu.h

sent http://patchwork.ozlabs.org/project/buildroot/patch/
20200503171227.1411086-1-bernd.kuhls at t-online.de/

which removes the libglu dependency coming from upstream-included glew.h.

Quoted 1 line

package/supertux/Config.in:??? select BR2_PACKAGE_LIBGLU # GL/glu.h

dito, sent http://patchwork.ozlabs.org/project/buildroot/patch/
20200503171227.1411086-2-bernd.kuhls at t-online.de/

Quoted 1 line

package/lugaru/Config.in:?? ?select BR2_PACKAGE_LIBGLU # GL/glu.h

This package directly includes GL/glu.h:

https://bitbucket.org/osslugaru/lugaru/src/
f6049187585733143f2fb2d688097cc711e15cf0/Source/gamegl.h#lines-42

and does not make use of libglew at all.

Cegui also directly includes GL/glu.h:

https://github.com/cegui/cegui/blob/master/cegui/include/CEGUI/
RendererModules/OpenGL/GL.h#L49

which makes libglu a hard dependency for this package even when -DGLEW_NO_GLU was added to CXXFLAGS.

Regards, Bernd

#6 lore raw

PATCH 2/2 package/cegui: select libglu when libgl is detected

In reply to Bartosz Bilas

Am Tue, 28 Apr 2020 21:58:44 +0200 schrieb Bartosz Bilas:

Quoted 3 lines

Fixes:
include/GL/glew.h:1205:14: fatal error: GL/glu.h: No such file or directory

Cegui directly includes GL/glu.h:

https://github.com/cegui/cegui/blob/master/cegui/include/CEGUI/
RendererModules/OpenGL/GL.h#L49

which makes libglu a hard dependency for this package even when -DGLEW_NO_GLU was added to CXXFLAGS.

#7 lore raw

PATCH 2/2 package/cegui: select libglu when libgl is detected

Hi guys,

Quoted 7 lines · Bernd Kuhls

Am Tue, 28 Apr 2020 21:58:44 +0200 schrieb Bartosz Bilas:

Quoted 3 lines

Fixes:
include/GL/glew.h:1205:14: fatal error: GL/glu.h: No such file or directory

Cegui directly includes GL/glu.h:

Quoted 7 lines

https://github.com/cegui/cegui/blob/master/cegui/include/CEGUI/
RendererModules/OpenGL/GL.h#L49

which makes libglu a hard dependency for this package even when -DGLEW_NO_GLU was added to CXXFLAGS.

Thomas could you give some feedback with that patch then?

Quoted 5 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Best
Bartek

#8 lore raw

PATCH 2/2 package/cegui: select libglu when libgl is detected

Hi Thomas,

Quoted 10 lines · Bartosz Bilas

Hi guys,

Quoted 7 lines · Bernd Kuhls

Am Tue, 28 Apr 2020 21:58:44 +0200 schrieb Bartosz Bilas:

Quoted 3 lines

Fixes:
?? include/GL/glew.h:1205:14: fatal error: GL/glu.h: No such file or ?? directory

Cegui directly includes GL/glu.h:

Quoted 8 lines
Quoted 7 lines

https://github.com/cegui/cegui/blob/master/cegui/include/CEGUI/
RendererModules/OpenGL/GL.h#L49

which makes libglu a hard dependency for this package even when -DGLEW_NO_GLU was added to CXXFLAGS.

Thomas could you give some feedback with that patch then?

gently ping due to the fact that the issue is still there and causing autobuilders failure.

Quoted 11 lines
Quoted 5 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Best
Bartek
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Best
Bartek

#9 lore raw

PATCH 1/2 package/cegui: force libglew when libepoxy is also enabled

In reply to Bartosz Bilas
Quoted 16 lines · On Tue, 28 Apr 2020 21:58:43 +0200 Bartosz Bilas <[email protected]>…

Cegui doesn't allow to have enabled both opengl libraries so disable libepoxy when both are enabled.

Fixes:
- http://autobuild.buildroot.net/results/2881bbcc2dcfcaa5ed663817ff39f7574430ba5a/build-end.log

---
 package/cegui/cegui.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/cegui/cegui.mk +0 -0
index 434201b1f8..0e3d015948 100644

package/cegui/cegui.mk CEGUI_DEPENDENCIES = glm \ · line 21

Quoted 5 lines
package/cegui/cegui.mk +1 -1
@@ -18,7 +18,7 @@ CEGUI_DEPENDENCIES = glm \
 		$(if $(BR2_PACKAGE_LIBGLEW),libglew) \
 		$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
-ifeq ($(BR2_PACKAGE_LIBEPOXY),y)
+ifeq ($(BR2_PACKAGE_LIBEPOXY)$(BR2_PACKAGE_LIBGLEW),y)

This way of solving the problem doesn't work: if BR2_PACKAGE_LIBEPOXY is false, but BR2_PACKAGE_LIBGLEW=y, then the condition is true, and we add a dependency on libepoxy. Not what we want. So I've replaced with

+# libepoxy support cannot be enabled together with libglew +ifeq ($(BR2_PACKAGE_LIBEPOXY):$(BR2_PACKAGE_LIBGLEW),y:)

instead.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#10 lore raw

PATCH 1/2 package/cegui: force libglew when libepoxy is also enabled

Hello Thomas,

Quoted 31 lines · Thomas Petazzoni
Quoted 16 lines · On Tue, 28 Apr 2020 21:58:43 +0200 Bartosz Bilas <[email protected]>…

Cegui doesn't allow to have enabled both opengl libraries so disable libepoxy when both are enabled.

Fixes:
- http://autobuild.buildroot.net/results/2881bbcc2dcfcaa5ed663817ff39f7574430ba5a/build-end.log

---
  package/cegui/cegui.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
package/cegui/cegui.mk +0 -0
index 434201b1f8..0e3d015948 100644

package/cegui/cegui.mk CEGUI_DEPENDENCIES = glm \ · line 21

Quoted 5 lines
package/cegui/cegui.mk +1 -1
@@ -18,7 +18,7 @@ CEGUI_DEPENDENCIES = glm \
  		$(if $(BR2_PACKAGE_LIBGLEW),libglew) \
  		$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
-ifeq ($(BR2_PACKAGE_LIBEPOXY),y)
+ifeq ($(BR2_PACKAGE_LIBEPOXY)$(BR2_PACKAGE_LIBGLEW),y)

This way of solving the problem doesn't work: if BR2_PACKAGE_LIBEPOXY is false, but BR2_PACKAGE_LIBGLEW=y, then the condition is true, and we add a dependency on libepoxy. Not what we want. So I've replaced with

(quoted diff) +2 -0
+# libepoxy support cannot be enabled together with libglew
+ifeq ($(BR2_PACKAGE_LIBEPOXY):$(BR2_PACKAGE_LIBGLEW),y:)
Quoted 1 line

instead.

Ouch, good catch! You are right - I've tested that with libepoxy=y and liblgew=y only. Thanks for the fix :)

Quoted 4 lines

Thanks!

Thomas

Best
Bartek