* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
@ 2014-05-30 15:00 Peter Kümmel
2014-05-30 15:31 ` Spenser Gilliland
0 siblings, 1 reply; 19+ messages in thread
From: Peter Kümmel @ 2014-05-30 15:00 UTC (permalink / raw)
To: buildroot
Signed-off-by: Peter K?mmel <syntheticpp@gmx.net>
---
package/ti-gfx/glesv2.pc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/ti-gfx/glesv2.pc b/package/ti-gfx/glesv2.pc
index 4c70aec..c3846d0 100644
--- a/package/ti-gfx/glesv2.pc
+++ b/package/ti-gfx/glesv2.pc
@@ -8,4 +8,4 @@ Description: TI Graphics SDK implementation of OpenGL ESv2
Version: 1.9.2188537
Requires:
Libs: -L${libdir} -lGLESv2 -lGLES_CM -lsrv_um -lusc -lEGL -lIMGegl
-Cflags: -I${includedir}/GLES2
+Cflags: -I${includedir}/GLES2 -I${includedir}
--
1.9.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 15:00 [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir Peter Kümmel
@ 2014-05-30 15:31 ` Spenser Gilliland
2014-05-30 15:55 ` Peter Kümmel
0 siblings, 1 reply; 19+ messages in thread
From: Spenser Gilliland @ 2014-05-30 15:31 UTC (permalink / raw)
To: buildroot
Peter,
On May 30, 2014 10:00 AM, "Peter K?mmel" <syntheticpp@gmx.net> wrote:
>
> Signed-off-by: Peter K?mmel <syntheticpp@gmx.net>
> ---
> package/ti-gfx/glesv2.pc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/ti-gfx/glesv2.pc b/package/ti-gfx/glesv2.pc
> index 4c70aec..c3846d0 100644
> --- a/package/ti-gfx/glesv2.pc
> +++ b/package/ti-gfx/glesv2.pc
> @@ -8,4 +8,4 @@ Description: TI Graphics SDK implementation of OpenGL ESv2
> Version: 1.9.2188537
> Requires:
> Libs: -L${libdir} -lGLESv2 -lGLES_CM -lsrv_um -lusc -lEGL -lIMGegl
> -Cflags: -I${includedir}/GLES2
> +Cflags: -I${includedir}/GLES2 -I${includedir}
> --
> 1.9.1
>
>
Does this fix a package for you? The includedir var should be
/usr/include which is a default include path.
Thanks,
Spenser _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140530/67706bb9/attachment.html>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 15:31 ` Spenser Gilliland
@ 2014-05-30 15:55 ` Peter Kümmel
2014-05-30 19:57 ` Spenser Gilliland
0 siblings, 1 reply; 19+ messages in thread
From: Peter Kümmel @ 2014-05-30 15:55 UTC (permalink / raw)
To: buildroot
On 30.05.2014 17:31, Spenser Gilliland wrote:
> Peter,
>
> On May 30, 2014 10:00 AM, "Peter K?mmel" <syntheticpp at gmx.net <mailto:syntheticpp@gmx.net>> wrote:
> >
> > Signed-off-by: Peter K?mmel <syntheticpp at gmx.net <mailto:syntheticpp@gmx.net>>
> > ---
> > package/ti-gfx/glesv2.pc | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/package/ti-gfx/glesv2.pc b/package/ti-gfx/glesv2.pc
> > index 4c70aec..c3846d0 100644
> > --- a/package/ti-gfx/glesv2.pc
> > +++ b/package/ti-gfx/glesv2.pc
> > @@ -8,4 +8,4 @@ Description: TI Graphics SDK implementation of OpenGL ESv2
> > Version: 1.9.2188537
> > Requires:
> > Libs: -L${libdir} -lGLESv2 -lGLES_CM -lsrv_um -lusc -lEGL -lIMGegl
> > -Cflags: -I${includedir}/GLES2
> > +Cflags: -I${includedir}/GLES2 -I${includedir}
> > --
> > 1.9.1
> >
> >
>
> Does this fix a package for you? The includedir var should be /usr/include which is a default include path.
Yes, Qt5's cmake files assume /usr/include not /usr/include/GLES2.
I added -I${includedir} instead of removing only "GLES2" because then nothing will break,
and the other .pc file also sets both dirs.
But it seems common practice is to not add the uppercase dir names in the pkg-congig file.
Peter
>
> Thanks,
> Spenser _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net <mailto:buildroot@busybox.net>
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 15:55 ` Peter Kümmel
@ 2014-05-30 19:57 ` Spenser Gilliland
2014-05-30 20:27 ` Thomas Petazzoni
2014-05-30 20:32 ` Peter Kümmel
0 siblings, 2 replies; 19+ messages in thread
From: Spenser Gilliland @ 2014-05-30 19:57 UTC (permalink / raw)
To: buildroot
Peter,
On May 30, 2014 10:55 AM, "Peter K?mmel" <syntheticpp@gmx.net> wrote:
>
> On 30.05.2014 17:31, Spenser Gilliland wrote:
>>
>> Peter,
>>
>> On May 30, 2014 10:00 AM, "Peter K?mmel" <syntheticpp at gmx.net <mailto:
syntheticpp@gmx.net>> wrote:
>> >
>> > Signed-off-by: Peter K?mmel <syntheticpp at gmx.net <mailto:
syntheticpp@gmx.net>>
>>
>> > ---
>> > package/ti-gfx/glesv2.pc | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/package/ti-gfx/glesv2.pc b/package/ti-gfx/glesv2.pc
>> > index 4c70aec..c3846d0 100644
>> > --- a/package/ti-gfx/glesv2.pc
>> > +++ b/package/ti-gfx/glesv2.pc
>> > @@ -8,4 +8,4 @@ Description: TI Graphics SDK implementation of OpenGL
ESv2
>> > Version: 1.9.2188537
>> > Requires:
>> > Libs: -L${libdir} -lGLESv2 -lGLES_CM -lsrv_um -lusc -lEGL -lIMGegl
>> > -Cflags: -I${includedir}/GLES2
>> > +Cflags: -I${includedir}/GLES2 -I${includedir}
>> > --
>> > 1.9.1
>> >
>> >
>>
>> Does this fix a package for you? The includedir var should be
/usr/include which is a default include path.
>
>
> Yes, Qt5's cmake files assume /usr/include not /usr/include/GLES2.
>
> I added -I${includedir} instead of removing only "GLES2" because then
nothing will break,
> and the other .pc file also sets both dirs.
> But it seems common practice is to not add the uppercase dir names in the
pkg-congig file.
This patch won't break anything. But it would be nice if you could go back
and reverify this just to be sure.
My reasoning is that, /usr/include is a default include dir which all
compilers should use automatically. There should not be a need to
manually specify it.
However, that's not to say that cmake doesn't disable the default include
dir some how. If that's the case, it may be better to try to fix cmake or
the qt5 packages.
However, If you don't have time to investigate the items above and this
patch fixes the problem then I see no problem in applying it. So, it has my
ack.
Acked by: Spenser Gilliland <spenser@gillilanding.com>
Thanks,
Spenser
>
> Peter
>
>>
>> Thanks,
>> Spenser _______________________________________________
>> > buildroot mailing list
>> > buildroot at busybox.net <mailto:buildroot@busybox.net>
>> > http://lists.busybox.net/mailman/listinfo/buildroot
>>
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140530/2b3546fb/attachment.html>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 19:57 ` Spenser Gilliland
@ 2014-05-30 20:27 ` Thomas Petazzoni
2014-05-30 20:41 ` Peter Kümmel
2014-05-30 20:32 ` Peter Kümmel
1 sibling, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2014-05-30 20:27 UTC (permalink / raw)
To: buildroot
Dear Spenser Gilliland,
On Fri, 30 May 2014 14:57:19 -0500, Spenser Gilliland wrote:
> > Yes, Qt5's cmake files assume /usr/include not /usr/include/GLES2.
> >
> > I added -I${includedir} instead of removing only "GLES2" because then
> nothing will break,
> > and the other .pc file also sets both dirs.
> > But it seems common practice is to not add the uppercase dir names in the
> pkg-congig file.
You should fix your e-mail client, as it very badly handles quotations.
> This patch won't break anything. But it would be nice if you could go back
> and reverify this just to be sure.
>
> My reasoning is that, /usr/include is a default include dir which all
> compilers should use automatically. There should not be a need to
> manually specify it.
Agreed, and therefore I'd like to understand in more details why the
patch is needed. We typically don't commit things we don't understand
why they are needed :)
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 19:57 ` Spenser Gilliland
2014-05-30 20:27 ` Thomas Petazzoni
@ 2014-05-30 20:32 ` Peter Kümmel
1 sibling, 0 replies; 19+ messages in thread
From: Peter Kümmel @ 2014-05-30 20:32 UTC (permalink / raw)
To: buildroot
On 30.05.2014 21:57, Spenser Gilliland wrote:
> Peter,
>
> On May 30, 2014 10:55 AM, "Peter K?mmel" <syntheticpp at gmx.net <mailto:syntheticpp@gmx.net>> wrote:
> >
> > On 30.05.2014 17:31, Spenser Gilliland wrote:
> >>
> >> Peter,
> >>
> >> On May 30, 2014 10:00 AM, "Peter K?mmel" <syntheticpp at gmx.net <mailto:syntheticpp@gmx.net>
> <mailto:syntheticpp at gmx.net <mailto:syntheticpp@gmx.net>>> wrote:
> >> >
> >> > Signed-off-by: Peter K?mmel <syntheticpp at gmx.net <mailto:syntheticpp@gmx.net> <mailto:syntheticpp@gmx.net
> <mailto:syntheticpp@gmx.net>>>
> >>
> >> > ---
> >> > package/ti-gfx/glesv2.pc | 2 +-
> >> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/package/ti-gfx/glesv2.pc b/package/ti-gfx/glesv2.pc
> >> > index 4c70aec..c3846d0 100644
> >> > --- a/package/ti-gfx/glesv2.pc
> >> > +++ b/package/ti-gfx/glesv2.pc
> >> > @@ -8,4 +8,4 @@ Description: TI Graphics SDK implementation of OpenGL ESv2
> >> > Version: 1.9.2188537
> >> > Requires:
> >> > Libs: -L${libdir} -lGLESv2 -lGLES_CM -lsrv_um -lusc -lEGL -lIMGegl
> >> > -Cflags: -I${includedir}/GLES2
> >> > +Cflags: -I${includedir}/GLES2 -I${includedir}
> >> > --
> >> > 1.9.1
> >> >
> >> >
> >>
> >> Does this fix a package for you? The includedir var should be /usr/include which is a default include path.
> >
> >
> > Yes, Qt5's cmake files assume /usr/include not /usr/include/GLES2.
> >
> > I added -I${includedir} instead of removing only "GLES2" because then nothing will break,
> > and the other .pc file also sets both dirs.
> > But it seems common practice is to not add the uppercase dir names in the pkg-congig file.
>
> This patch won't break anything. But it would be nice if you could go back and reverify this just to be sure.
Maybe you got me wrong, I think this is the correct patch:
-Cflags: -I${includedir}/GLES2
+Cflags: -I${includedir}
but it could break existing code, so I ADDED -I${includedir}, even when it is a bit redundant. This
way it looks like egl.pc:
$cat buildroot/package/ti-gfx/egl.pc
prefix=/usr/
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: egl
Description: TI Graphics SDK implementation of EGL
Version: 1.9.2188537
Requires:
Libs: -L${libdir} -lEGL -lGLESv2 -lIMGegl
Cflags: -I${includedir}/EGL/ -I${includedir}
BTW, freescale-imx/gpu-viv-bin-mx6q/glesv2.pc only adds -I${includedir}
and sunxi-mali/glesv2.pc also misses -I${includedir}, should we fix this?
>
> My reasoning is that, /usr/include is a default include dir which all compilers should use automatically. There
> should not be a need to manually specify it.
>
> However, that's not to say that cmake doesn't disable the default include dir some how. If that's the case, it may be
> better to try to fix cmake or the qt5 packages.
The cmake script looks at configure for the header "GLES2/gl2.h" only in the the paths reported by --cflags-only-I
therefore -I${includedir}/GLES2 does not work.
>
> However, If you don't have time to investigate the items above and this patch fixes the problem then I see no problem in
> applying it. So, it has my ack.
Thanks,
Peter
>
> Acked by: Spenser Gilliland <spenser at gillilanding.com <mailto:spenser@gillilanding.com>>
>
> Thanks,
> Spenser
>
> >
> > Peter
> >
> >>
> >> Thanks,
> >> Spenser _______________________________________________
> >> > buildroot mailing list
> >> > buildroot at busybox.net <mailto:buildroot@busybox.net> <mailto:buildroot at busybox.net <mailto:buildroot@busybox.net>>
> >> > http://lists.busybox.net/mailman/listinfo/buildroot
> >>
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net <mailto:buildroot@busybox.net>
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 20:27 ` Thomas Petazzoni
@ 2014-05-30 20:41 ` Peter Kümmel
2014-05-30 20:52 ` Peter Korsgaard
2014-05-30 20:57 ` Yann E. MORIN
0 siblings, 2 replies; 19+ messages in thread
From: Peter Kümmel @ 2014-05-30 20:41 UTC (permalink / raw)
To: buildroot
On 30.05.2014 22:27, Thomas Petazzoni wrote:
> Dear Spenser Gilliland,
>
> On Fri, 30 May 2014 14:57:19 -0500, Spenser Gilliland wrote:
>
>>> Yes, Qt5's cmake files assume /usr/include not /usr/include/GLES2.
>>>
>>> I added -I${includedir} instead of removing only "GLES2" because then
>> nothing will break,
>>> and the other .pc file also sets both dirs.
>>> But it seems common practice is to not add the uppercase dir names in the
>> pkg-congig file.
>
> You should fix your e-mail client, as it very badly handles quotations.
>
>> This patch won't break anything. But it would be nice if you could go back
>> and reverify this just to be sure.
>>
>> My reasoning is that, /usr/include is a default include dir which all
>> compilers should use automatically. There should not be a need to
>> manually specify it.
>
> Agreed, and therefore I'd like to understand in more details why the
> patch is needed. We typically don't commit things we don't understand
> why they are needed :)
In short: anybody assumes "#include <GLES2/gl2.h>" works when the search
paths of pkg-config are used. But when pkg-config reports /usr/include/GLES2
gl2.h could not be found, because there is no /usr/include/GLES2/GLES2/gl2.h.
Until now this doesn't pop up because by chance the directory GLES2
resides in /usr/include and this path is added by most by build systems.
But the cmake configure scripts of Qt5 test for "GLES2/gl2.h" only in the path
reported by pkg-config.
>
> Thanks,
>
> Thomas
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 20:41 ` Peter Kümmel
@ 2014-05-30 20:52 ` Peter Korsgaard
2014-05-30 21:29 ` Peter Kümmel
2014-05-30 20:57 ` Yann E. MORIN
1 sibling, 1 reply; 19+ messages in thread
From: Peter Korsgaard @ 2014-05-30 20:52 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter K?mmel <syntheticpp@gmx.net> writes:
Hi,
>> Agreed, and therefore I'd like to understand in more details why the
>> patch is needed. We typically don't commit things we don't understand
>> why they are needed :)
> In short: anybody assumes "#include <GLES2/gl2.h>" works when the search
> paths of pkg-config are used. But when pkg-config reports /usr/include/GLES2
> gl2.h could not be found, because there is no /usr/include/GLES2/GLES2/gl2.h.
> Until now this doesn't pop up because by chance the directory GLES2
> resides in /usr/include and this path is added by most by build systems.
> But the cmake configure scripts of Qt5 test for "GLES2/gl2.h" only in the path
> reported by pkg-config.
But $SYSROOT/usr/include is the standard include path, so gcc
automatically looks there. What exactly doesn't work for you?
This is exactly the same as E.G. #include <sys/stat.h> for open(2).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 20:41 ` Peter Kümmel
2014-05-30 20:52 ` Peter Korsgaard
@ 2014-05-30 20:57 ` Yann E. MORIN
2014-05-30 21:16 ` Peter Kümmel
1 sibling, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2014-05-30 20:57 UTC (permalink / raw)
To: buildroot
Peter, All,
On 2014-05-30 22:41 +0200, Peter K?mmel spake thusly:
> In short: anybody assumes "#include <GLES2/gl2.h>" works when the search
> paths of pkg-config are used. But when pkg-config reports /usr/include/GLES2
> gl2.h could not be found, because there is no /usr/include/GLES2/GLES2/gl2.h.
>
> Until now this doesn't pop up because by chance the directory GLES2
> resides in /usr/include and this path is added by most by build systems.
> But the cmake configure scripts of Qt5 test for "GLES2/gl2.h" only in the path
> reported by pkg-config.
And what if we do not specify any Cflags in the .pc? Is Qt5's configure
script happy with that?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 20:57 ` Yann E. MORIN
@ 2014-05-30 21:16 ` Peter Kümmel
2014-05-30 21:23 ` Yann E. MORIN
0 siblings, 1 reply; 19+ messages in thread
From: Peter Kümmel @ 2014-05-30 21:16 UTC (permalink / raw)
To: buildroot
On 30.05.2014 22:57, Yann E. MORIN wrote:
> Peter, All,
>
> On 2014-05-30 22:41 +0200, Peter K?mmel spake thusly:
>> In short: anybody assumes "#include <GLES2/gl2.h>" works when the search
>> paths of pkg-config are used. But when pkg-config reports /usr/include/GLES2
>> gl2.h could not be found, because there is no /usr/include/GLES2/GLES2/gl2.h.
>>
>> Until now this doesn't pop up because by chance the directory GLES2
>> resides in /usr/include and this path is added by most by build systems.
>> But the cmake configure scripts of Qt5 test for "GLES2/gl2.h" only in the path
>> reported by pkg-config.
>
> And what if we do not specify any Cflags in the .pc? Is Qt5's configure
> script happy with that?
>
> Regards,
> Yann E. MORIN.
>
The cmake code generated by Qt5 is very restrictive
(sysroot/usr/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake):
set(_GL_INCDIRS "/usr/include/GLES2")
find_path(_qt5gui_OPENGL_INCLUDE_DIR GLES2/gl2.h
PATHS ${_GL_INCDIRS} NO_DEFAULT_PATH)
where _GL_INCDIRS is the path list reported by pkg-config.
So specifying an empty Cflags would also fail because
no paths at all are searched.
Peter
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 21:16 ` Peter Kümmel
@ 2014-05-30 21:23 ` Yann E. MORIN
2014-05-30 21:39 ` Peter Kümmel
0 siblings, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2014-05-30 21:23 UTC (permalink / raw)
To: buildroot
Peter, All,
On 2014-05-30 23:16 +0200, Peter K?mmel spake thusly:
> On 30.05.2014 22:57, Yann E. MORIN wrote:
> >Peter, All,
> >
> >On 2014-05-30 22:41 +0200, Peter K?mmel spake thusly:
> >>In short: anybody assumes "#include <GLES2/gl2.h>" works when the search
> >>paths of pkg-config are used. But when pkg-config reports /usr/include/GLES2
> >>gl2.h could not be found, because there is no /usr/include/GLES2/GLES2/gl2.h.
> >>
> >>Until now this doesn't pop up because by chance the directory GLES2
> >>resides in /usr/include and this path is added by most by build systems.
> >>But the cmake configure scripts of Qt5 test for "GLES2/gl2.h" only in the path
> >>reported by pkg-config.
> >
> >And what if we do not specify any Cflags in the .pc? Is Qt5's configure
> >script happy with that?
> >
> >Regards,
> >Yann E. MORIN.
> >
>
> The cmake code generated by Qt5 is very restrictive
> (sysroot/usr/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake):
>
> set(_GL_INCDIRS "/usr/include/GLES2")
> find_path(_qt5gui_OPENGL_INCLUDE_DIR GLES2/gl2.h
> PATHS ${_GL_INCDIRS} NO_DEFAULT_PATH)
>
> where _GL_INCDIRS is the path list reported by pkg-config.
> So specifying an empty Cflags would also fail because
> no paths at all are searched.
Well, *this* is a very good explanation! Thanks! :-)
Please update your commit log with explanations similar to the above,
and respin (wait a bit until the others can comment).
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 20:52 ` Peter Korsgaard
@ 2014-05-30 21:29 ` Peter Kümmel
2014-05-30 21:41 ` Peter Korsgaard
0 siblings, 1 reply; 19+ messages in thread
From: Peter Kümmel @ 2014-05-30 21:29 UTC (permalink / raw)
To: buildroot
On 30.05.2014 22:52, Peter Korsgaard wrote:
>>>>>> "Peter" == Peter K?mmel <syntheticpp@gmx.net> writes:
>
> Hi,
>
> >> Agreed, and therefore I'd like to understand in more details why the
> >> patch is needed. We typically don't commit things we don't understand
> >> why they are needed :)
>
> > In short: anybody assumes "#include <GLES2/gl2.h>" works when the search
> > paths of pkg-config are used. But when pkg-config reports /usr/include/GLES2
> > gl2.h could not be found, because there is no /usr/include/GLES2/GLES2/gl2.h.
>
> > Until now this doesn't pop up because by chance the directory GLES2
> > resides in /usr/include and this path is added by most by build systems.
> > But the cmake configure scripts of Qt5 test for "GLES2/gl2.h" only in the path
> > reported by pkg-config.
>
> But $SYSROOT/usr/include is the standard include path, so gcc
> automatically looks there. What exactly doesn't work for you?
See my last mail with the cmake code.
Overall I think it is the best solution that pkg-config reports
a path which in combination with the uppercase prefix in #include
makes it possible to include an OpenGL header without being dependent
on any implicit set include paths.
I don't know if Ubuntu is a reference here, but when you install gles2
sudo apt-get install libgles2-mesa-dev
and have a look at the.pc file,
cat /usr/lib/x86_64-linux-gnu/pkgconfig/glesv2.pc
(or gl.pc) you see, that there also the path to the dir containing GLES2 is set:
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include
Name: glesv2
Description: Mesa OpenGL ES 2.0 library
Requires.private:
Version: 9.0.3
Libs: -L${libdir} -lGLESv2
Libs.private: -lm -lpthread -ldl
Cflags: -I${includedir}
>
> This is exactly the same as E.G. #include <sys/stat.h> for open(2).
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 21:23 ` Yann E. MORIN
@ 2014-05-30 21:39 ` Peter Kümmel
2014-05-30 21:42 ` Yann E. MORIN
0 siblings, 1 reply; 19+ messages in thread
From: Peter Kümmel @ 2014-05-30 21:39 UTC (permalink / raw)
To: buildroot
On 30.05.2014 23:23, Yann E. MORIN wrote:
> Peter, All,
>
> On 2014-05-30 23:16 +0200, Peter K?mmel spake thusly:
>> On 30.05.2014 22:57, Yann E. MORIN wrote:
>>> Peter, All,
>>>
>>> On 2014-05-30 22:41 +0200, Peter K?mmel spake thusly:
>>>> In short: anybody assumes "#include <GLES2/gl2.h>" works when the search
>>>> paths of pkg-config are used. But when pkg-config reports /usr/include/GLES2
>>>> gl2.h could not be found, because there is no /usr/include/GLES2/GLES2/gl2.h.
>>>>
>>>> Until now this doesn't pop up because by chance the directory GLES2
>>>> resides in /usr/include and this path is added by most by build systems.
>>>> But the cmake configure scripts of Qt5 test for "GLES2/gl2.h" only in the path
>>>> reported by pkg-config.
>>>
>>> And what if we do not specify any Cflags in the .pc? Is Qt5's configure
>>> script happy with that?
>>>
>>> Regards,
>>> Yann E. MORIN.
>>>
>>
>> The cmake code generated by Qt5 is very restrictive
>> (sysroot/usr/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake):
>>
>> set(_GL_INCDIRS "/usr/include/GLES2")
>> find_path(_qt5gui_OPENGL_INCLUDE_DIR GLES2/gl2.h
>> PATHS ${_GL_INCDIRS} NO_DEFAULT_PATH)
>>
>> where _GL_INCDIRS is the path list reported by pkg-config.
>> So specifying an empty Cflags would also fail because
>> no paths at all are searched.
>
> Well, *this* is a very good explanation! Thanks! :-)
Great, feels like I could now finish the explanation with "q.e.d".
>
> Please update your commit log with explanations similar to the above,
> and respin (wait a bit until the others can comment).
I'm sure there are other gl .pc files which will not work when
Qt5 projects are build using CMake. Should I also fix these pc files? (in a different patch?)
>
> Regards,
> Yann E. MORIN.
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 21:29 ` Peter Kümmel
@ 2014-05-30 21:41 ` Peter Korsgaard
2014-05-31 4:34 ` Peter Kümmel
0 siblings, 1 reply; 19+ messages in thread
From: Peter Korsgaard @ 2014-05-30 21:41 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter K?mmel <syntheticpp@gmx.net> writes:
Hi,
> I don't know if Ubuntu is a reference here, but when you install gles2
> sudo apt-get install libgles2-mesa-dev
> and have a look at the.pc file,
> cat /usr/lib/x86_64-linux-gnu/pkgconfig/glesv2.pc
> (or gl.pc) you see, that there also the path to the dir containing GLES2 is set:
> prefix=/usr
> exec_prefix=${prefix}
> libdir=${prefix}/lib/x86_64-linux-gnu
> includedir=${prefix}/include
> Name: glesv2
> Description: Mesa OpenGL ES 2.0 library
> Requires.private:
> Version: 9.0.3
> Libs: -L${libdir} -lGLESv2
> Libs.private: -lm -lpthread -ldl
> Cflags: -I${includedir}
And what does pkg-config --cflags glesv2.pc show? pkg-config afaik
strips -I<standard-include-dir> away.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 21:39 ` Peter Kümmel
@ 2014-05-30 21:42 ` Yann E. MORIN
0 siblings, 0 replies; 19+ messages in thread
From: Yann E. MORIN @ 2014-05-30 21:42 UTC (permalink / raw)
To: buildroot
Peter, All,
On 2014-05-30 23:39 +0200, Peter K?mmel spake thusly:
> I'm sure there are other gl .pc files which will not work when
> Qt5 projects are build using CMake. Should I also fix these pc files?
Yes, please.
> (in a different patch?)
Yes, please.
Thank you! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-30 21:41 ` Peter Korsgaard
@ 2014-05-31 4:34 ` Peter Kümmel
2014-05-31 9:37 ` Yann E. MORIN
0 siblings, 1 reply; 19+ messages in thread
From: Peter Kümmel @ 2014-05-31 4:34 UTC (permalink / raw)
To: buildroot
On 30.05.2014 23:41, Peter Korsgaard wrote:
>>>>>> "Peter" == Peter K?mmel <syntheticpp@gmx.net> writes:
>
> Hi,
>
> > I don't know if Ubuntu is a reference here, but when you install gles2
> > sudo apt-get install libgles2-mesa-dev
> > and have a look at the.pc file,
> > cat /usr/lib/x86_64-linux-gnu/pkgconfig/glesv2.pc
> > (or gl.pc) you see, that there also the path to the dir containing GLES2 is set:
>
> > prefix=/usr
> > exec_prefix=${prefix}
> > libdir=${prefix}/lib/x86_64-linux-gnu
> > includedir=${prefix}/include
>
> > Name: glesv2
> > Description: Mesa OpenGL ES 2.0 library
> > Requires.private:
> > Version: 9.0.3
> > Libs: -L${libdir} -lGLESv2
> > Libs.private: -lm -lpthread -ldl
> > Cflags: -I${includedir}
>
> And what does pkg-config --cflags glesv2.pc show? pkg-config afaik
> strips -I<standard-include-dir> away.
>
Yes, on the desktop pkg-config --cflags glesv2.pc shows nothing.
But the generated cmake code for desktop Qt5 does not have the
find_package() command which fails when cross-compiling.
(And I don't wanna figure out why the cmake file is different
for the desktop).
The pkg-config used by buildroot lists the path in sysroot.
Anyway, seems Cflags: -I${includedir} is the minimum for all
GL config files.
Peter
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-31 4:34 ` Peter Kümmel
@ 2014-05-31 9:37 ` Yann E. MORIN
2014-05-31 9:39 ` Yann E. MORIN
0 siblings, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2014-05-31 9:37 UTC (permalink / raw)
To: buildroot
Peter?, All,
On 2014-05-31 06:34 +0200, Peter K?mmel spake thusly:
> Anyway, seems Cflags: -I${includedir} is the minimum for all
> GL config files.
I've just checked, and that's what other gelsv2 providers seem to do.
rpi-userland provides a glesv2.pc that contains Cflags: -I${includedir}
So, I'm fine with the conclusion to switch to using that.
Peter K., please put me in Cc: of your next patches on the subject.
Regards, Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-31 9:37 ` Yann E. MORIN
@ 2014-05-31 9:39 ` Yann E. MORIN
2014-05-31 11:48 ` Peter Korsgaard
0 siblings, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2014-05-31 9:39 UTC (permalink / raw)
To: buildroot
All,
On 2014-05-31 11:37 +0200, Yann E. MORIN spake thusly:
> Peter K.
And I just realised that matches both Peters.
/me grabs coffee...
Well, I guess You know who I wasa talking to! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir
2014-05-31 9:39 ` Yann E. MORIN
@ 2014-05-31 11:48 ` Peter Korsgaard
0 siblings, 0 replies; 19+ messages in thread
From: Peter Korsgaard @ 2014-05-31 11:48 UTC (permalink / raw)
To: buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> All,
> On 2014-05-31 11:37 +0200, Yann E. MORIN spake thusly:
>> Peter K.
> And I just realised that matches both Peters.
> /me grabs coffee...
heh ;)
> Well, I guess You know who I wasa talking to! :-)
What does kn?kbr?d have to do with it? Now I'm confused ;)
https://c.static-irma.dk/billeder/730/040/011/653/4/7300400116534/Versions/7300400116534/ProductDetail.png
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2014-05-31 11:48 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-30 15:00 [Buildroot] [PATCH 1/1] ti-gfx: pkg-config should also set parent include dir Peter Kümmel
2014-05-30 15:31 ` Spenser Gilliland
2014-05-30 15:55 ` Peter Kümmel
2014-05-30 19:57 ` Spenser Gilliland
2014-05-30 20:27 ` Thomas Petazzoni
2014-05-30 20:41 ` Peter Kümmel
2014-05-30 20:52 ` Peter Korsgaard
2014-05-30 21:29 ` Peter Kümmel
2014-05-30 21:41 ` Peter Korsgaard
2014-05-31 4:34 ` Peter Kümmel
2014-05-31 9:37 ` Yann E. MORIN
2014-05-31 9:39 ` Yann E. MORIN
2014-05-31 11:48 ` Peter Korsgaard
2014-05-30 20:57 ` Yann E. MORIN
2014-05-30 21:16 ` Peter Kümmel
2014-05-30 21:23 ` Yann E. MORIN
2014-05-30 21:39 ` Peter Kümmel
2014-05-30 21:42 ` Yann E. MORIN
2014-05-30 20:32 ` Peter Kümmel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox