Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] libepoxy: RDEPEND on libgl
@ 2015-10-02 12:41 Jussi Kukkonen
  2015-10-02 12:48 ` Alexander Kanavin
  2015-10-02 15:43 ` Andreas Oberritter
  0 siblings, 2 replies; 8+ messages in thread
From: Jussi Kukkonen @ 2015-10-02 12:41 UTC (permalink / raw)
  To: openembedded-core

Automatic dependency tracking does not notice this (understandable
with the dlopen trickery epoxy does).

[YOCTO #8371]

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---


I'm not super familiar with the opengl handling so please let me know if there's some
better way to do this: The problem being fixed is e.g. gtk3-demo failing to start
because it fails to dlopen libGL.so.1.


 meta/recipes-graphics/libepoxy/libepoxy_git.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-graphics/libepoxy/libepoxy_git.bb b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
index ad17293..fe05d4e 100644
--- a/meta/recipes-graphics/libepoxy/libepoxy_git.bb
+++ b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
@@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
 inherit autotools pkgconfig
 
 DEPENDS = "util-macros virtual/egl"
+RDEPENDS_${PN} = "libgl"
 
 PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11"
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] libepoxy: RDEPEND on libgl
  2015-10-02 12:41 [PATCH] libepoxy: RDEPEND on libgl Jussi Kukkonen
@ 2015-10-02 12:48 ` Alexander Kanavin
  2015-10-02 15:47   ` Andreas Oberritter
  2015-10-02 15:43 ` Andreas Oberritter
  1 sibling, 1 reply; 8+ messages in thread
From: Alexander Kanavin @ 2015-10-02 12:48 UTC (permalink / raw)
  To: openembedded-core

On 10/02/2015 03:41 PM, Jussi Kukkonen wrote:
> Automatic dependency tracking does not notice this (understandable
> with the dlopen trickery epoxy does).

Maybe it's better to explain this in a comment in the recipe itself?

> --- a/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> +++ b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> @@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
>   inherit autotools pkgconfig
>
>   DEPENDS = "util-macros virtual/egl"
> +RDEPENDS_${PN} = "libgl"




Alex


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libepoxy: RDEPEND on libgl
  2015-10-02 12:41 [PATCH] libepoxy: RDEPEND on libgl Jussi Kukkonen
  2015-10-02 12:48 ` Alexander Kanavin
@ 2015-10-02 15:43 ` Andreas Oberritter
  2015-10-05 19:21   ` Burton, Ross
  2015-10-06 15:12   ` Jussi Kukkonen
  1 sibling, 2 replies; 8+ messages in thread
From: Andreas Oberritter @ 2015-10-02 15:43 UTC (permalink / raw)
  To: openembedded-core

Hello Jussi,

On 02.10.2015 14:41, Jussi Kukkonen wrote:
> Automatic dependency tracking does not notice this (understandable
> with the dlopen trickery epoxy does).
> 
> [YOCTO #8371]
> 
> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
> ---
> 
> 
> I'm not super familiar with the opengl handling so please let me know if there's some
> better way to do this: The problem being fixed is e.g. gtk3-demo failing to start
> because it fails to dlopen libGL.so.1.
> 
> 
>  meta/recipes-graphics/libepoxy/libepoxy_git.bb | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-graphics/libepoxy/libepoxy_git.bb b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> index ad17293..fe05d4e 100644
> --- a/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> +++ b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> @@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
>  inherit autotools pkgconfig
>  
>  DEPENDS = "util-macros virtual/egl"
> +RDEPENDS_${PN} = "libgl"
>  
>  PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11"

If epoxy behaves like other projects, then I'd try removing virtual/egl from
DEPENDS and replacing the line above with this one:

PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11 virtual/gl, libgl"

An additional packageconfig for gles2 should be added. For a rather complex
example covering many environments see meta/recipes-graphics/cogl/cogl-1.0.inc.

>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"

An empty default probably doesn't make sense for this library, unless --disable-glx
implies --enable-egl (or something similar). But then you'd need to keep the build
dependency on virtual/egl, even though it's most probably unused if x11 is available.

Regards,
Andreas


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libepoxy: RDEPEND on libgl
  2015-10-02 12:48 ` Alexander Kanavin
@ 2015-10-02 15:47   ` Andreas Oberritter
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Oberritter @ 2015-10-02 15:47 UTC (permalink / raw)
  To: openembedded-core

On 02.10.2015 14:48, Alexander Kanavin wrote:
> On 10/02/2015 03:41 PM, Jussi Kukkonen wrote:
>> Automatic dependency tracking does not notice this (understandable
>> with the dlopen trickery epoxy does).
> 
> Maybe it's better to explain this in a comment in the recipe itself?

I think this is pretty much standard in OpenGL environments.

Regards,
Andreas

>> --- a/meta/recipes-graphics/libepoxy/libepoxy_git.bb
>> +++ b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
>> @@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
>>   inherit autotools pkgconfig
>>
>>   DEPENDS = "util-macros virtual/egl"
>> +RDEPENDS_${PN} = "libgl"
> 
> 
> 
> 
> Alex



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libepoxy: RDEPEND on libgl
  2015-10-02 15:43 ` Andreas Oberritter
@ 2015-10-05 19:21   ` Burton, Ross
  2015-10-06 15:12   ` Jussi Kukkonen
  1 sibling, 0 replies; 8+ messages in thread
From: Burton, Ross @ 2015-10-05 19:21 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 479 bytes --]

On 2 October 2015 at 16:43, Andreas Oberritter <obi@opendreambox.org> wrote:

> If epoxy behaves like other projects, then I'd try removing virtual/egl
> from
> DEPENDS and replacing the line above with this one:
>
> PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11
> virtual/gl, libgl"
>

The rdepends definitely need to be tied to the PACKAGECONFIG options,
libepoxy built without x11 won't be linking against GLX as libGL.so won't
exist.

Ross

[-- Attachment #2: Type: text/html, Size: 903 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libepoxy: RDEPEND on libgl
  2015-10-02 15:43 ` Andreas Oberritter
  2015-10-05 19:21   ` Burton, Ross
@ 2015-10-06 15:12   ` Jussi Kukkonen
  2015-10-09  7:19     ` Andreas Müller
  1 sibling, 1 reply; 8+ messages in thread
From: Jussi Kukkonen @ 2015-10-06 15:12 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2732 bytes --]

On 2 October 2015 at 18:43, Andreas Oberritter <obi@opendreambox.org> wrote:

> Hello Jussi,



Hi, and thanks for the help.


> On 02.10.2015 14:41, Jussi Kukkonen wrote:
> > Automatic dependency tracking does not notice this (understandable
> > with the dlopen trickery epoxy does).
> >
> > [YOCTO #8371]
> >
> > Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
> > ---
> >
> >
> > I'm not super familiar with the opengl handling so please let me know if
> there's some
> > better way to do this: The problem being fixed is e.g. gtk3-demo failing
> to start
> > because it fails to dlopen libGL.so.1.
> >
> >
> >  meta/recipes-graphics/libepoxy/libepoxy_git.bb | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> > index ad17293..fe05d4e 100644
> > --- a/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> > +++ b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> > @@ -20,6 +20,7 @@ S = "${WORKDIR}/git"
> >  inherit autotools pkgconfig
> >
> >  DEPENDS = "util-macros virtual/egl"
> > +RDEPENDS_${PN} = "libgl"
> >
> >  PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11"
>
> If epoxy behaves like other projects, then I'd try removing virtual/egl
> from
> DEPENDS and replacing the line above with this one


Hi, and thanks for the help.

For reference, epoxy is slightly different from most projects in that it
provides GL API(s) itself. It's a helper library to avoid doing the
dlopen/*GetProcAddress dance: epoxy handles that and the application can
just call the functions without dealing with function pointers.


>
>
PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11
> virtual/gl, libgl"
>
> An additional packageconfig for gles2 should be added. For a rather complex
> example covering many environments see
> meta/recipes-graphics/cogl/cogl-1.0.inc


The cogl example looks good to me -- although currently epoxy does depend
on egl at build time unconditionally: at least some dispatch headers are
built based on egl headers.

>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11',
> '', d)}"
>
> An empty default probably doesn't make sense for this library, unless
> --disable-glx
> implies --enable-egl (or something similar). But then you'd need to keep
> the build
> dependency on virtual/egl, even though it's most probably unused if x11 is
> available.


The EGL support is there in epoxy regardless of --enable-glx, as far as I
can see so I think I'll have to keep it there. But I'll modify the runtime
dependencies based on the cogl example.

Thanks, Jussi

[-- Attachment #2: Type: text/html, Size: 4681 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libepoxy: RDEPEND on libgl
  2015-10-06 15:12   ` Jussi Kukkonen
@ 2015-10-09  7:19     ` Andreas Müller
  2015-10-09  8:00       ` Jussi Kukkonen
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Müller @ 2015-10-09  7:19 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: Patches and discussions about the oe-core layer

I did some tests with this: On a simple gtk2/3 image starting a gtk3
application crashes complaining libgl*.so cannot be found. I checked:
It does not help to install egl/gles2 on the image: libepoxy relies on
libgl.

Isn't this a bug? I thought one of the targets of libepoxy is to
abstract away different gl implementations under a common API. Or in
other words: Does this mean that running gtk3 requires desktop OpenGL
installed?

Andreas


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libepoxy: RDEPEND on libgl
  2015-10-09  7:19     ` Andreas Müller
@ 2015-10-09  8:00       ` Jussi Kukkonen
  0 siblings, 0 replies; 8+ messages in thread
From: Jussi Kukkonen @ 2015-10-09  8:00 UTC (permalink / raw)
  To: Andreas Müller; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 935 bytes --]

On 9 October 2015 at 10:19, Andreas Müller <schnitzeltony@googlemail.com>
wrote:

> I did some tests with this: On a simple gtk2/3 image starting a gtk3
> application crashes complaining libgl*.so cannot be found. I checked:
> It does not help to install egl/gles2 on the image: libepoxy relies on
> libgl.
>
> Isn't this a bug? I thought one of the targets of libepoxy is to
> abstract away different gl implementations under a common API. Or in
> other words: Does this mean that running gtk3 requires desktop OpenGL
> installed?
>

The reason I've not sent a patch yet is exactly what you describe: I've not
figured out yet if there's a bug somewhere or if they've essentially made
libGL.so.1 (or at least a full opengl implementation) part of the GTK
API... In any case I guess the dependency should actually be in gtk as
epoxy can't really know which GL libraries are going to be needed at
runtime.

 Jussi

[-- Attachment #2: Type: text/html, Size: 1307 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-10-09  8:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02 12:41 [PATCH] libepoxy: RDEPEND on libgl Jussi Kukkonen
2015-10-02 12:48 ` Alexander Kanavin
2015-10-02 15:47   ` Andreas Oberritter
2015-10-02 15:43 ` Andreas Oberritter
2015-10-05 19:21   ` Burton, Ross
2015-10-06 15:12   ` Jussi Kukkonen
2015-10-09  7:19     ` Andreas Müller
2015-10-09  8:00       ` Jussi Kukkonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox