Skip to contentSkip to conversation

ti-gfx: pkg-config should also set parent include dir

PATCH New Peter Kümmel 5 participants 19 messages May 30, 2014 – May 31, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

---
 package/ti-gfx/glesv2.pc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/ti-gfx/glesv2.pc +1 -1
index 4c70aec..c3846d0 100644
@@ -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}
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Peter,

Quoted 17 lines · Peter K?mmel
---
 package/ti-gfx/glesv2.pc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/ti-gfx/glesv2.pc +1 -2
index 4c70aec..c3846d0 100644
@@ -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}
--
Quoted 3 lines

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 _______________________________________________

Quoted 3 lines

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>

#2 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Quoted 9 lines · Spenser Gilliland

Peter,

Quoted 6 lines · On May 30, 2014 10:00 AM, "Peter K?mmel" <syntheticpp at gmx.net…
Signed-off-by Peter K?mmel <syntheticpp at gmx.net <mailto:[email protected]>>
---
 package/ti-gfx/glesv2.pc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 11 lines
package/ti-gfx/glesv2.pc +1 -2
index 4c70aec..c3846d0 100644
@@ -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}
--
Quoted 3 lines

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

Quoted 7 lines

Thanks,
Spenser _______________________________________________

Quoted 3 lines

buildroot mailing list
buildroot at busybox.net <mailto:[email protected]>
http://lists.busybox.net/mailman/listinfo/buildroot

#3 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Peter,

Quoted 6 lines · Peter K?mmel
Quoted 4 lines · Spenser Gilliland

Peter,

On May 30, 2014 10:00 AM, "Peter K?mmel" <syntheticpp at gmx.net <mailto:

Quoted 2 lines · [email protected]>> wrote:
Quoted 2 lines
Quoted 2 lines
Signed-off-by Peter K?mmel <syntheticpp at gmx.net <mailto:

[email protected]>>

Quoted 10 lines
Quoted 10 lines

package/ti-gfx/glesv2.pc Description: TI Graphics SDK implementation of OpenGL

Quoted 10 lines
---
 package/ti-gfx/glesv2.pc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/ti-gfx/glesv2.pc +0 -0
index 4c70aec..c3846d0 100644
@@ -8,4 +8,4 @@ Description: TI Graphics SDK implementation of OpenGL

ESv2

Quoted 11 lines
Quoted 11 lines
Quoted 9 lines
package/ti-gfx/glesv2.pc +1 -2
 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.

Quoted 5 lines

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,

Quoted 2 lines

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 <[email protected]>

Thanks,
Spenser

Quoted 11 lines

Peter

Quoted 7 lines

Thanks,
Spenser _______________________________________________

Quoted 3 lines

buildroot mailing list
buildroot at busybox.net <mailto:[email protected]>
http://lists.busybox.net/mailman/listinfo/buildroot

Quoted 4 lines

_______________________________________________
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>

#4 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Dear Spenser Gilliland,

Quoted 7 lines · Spenser Gilliland
Quoted 3 lines

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,

Quoted 2 lines

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.

Quoted 6 lines

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Quoted 17 lines · Thomas Petazzoni

Dear Spenser Gilliland,

Quoted 7 lines · Spenser Gilliland
Quoted 3 lines

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,

Quoted 2 lines

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.

Quoted 3 lines

This patch won't break anything. But it would be nice if you could go back and reverify this just to be sure.

Quoted 7 lines
Quoted 3 lines

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.

Quoted 5 lines

Thanks,

Thomas

#6 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter K?mmel <[email protected]> writes:

Hi,

Quoted 4 lines
Quoted 3 lines

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

Quoted 8 lines

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

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Quoted 12 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter K?mmel <[email protected]> writes:

Hi,

Quoted 7 lines
Quoted 3 lines

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.

Quoted 7 lines
Quoted 4 lines

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}

Quoted 3 lines

This is exactly the same as E.G. #include <sys/stat.h> for open(2).

#8 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter K?mmel <[email protected]> writes:

Hi,

Quoted 11 lines

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

Quoted 7 lines

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.

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Quoted 23 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter K?mmel <[email protected]> writes:

Hi,

Quoted 11 lines

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

Quoted 7 lines

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}

Quoted 3 lines

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

#10 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Peter?, All,

On 2014-05-31 06:34 +0200, Peter K?mmel spake thusly:

Quoted 2 lines

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.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#11 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

All,

On 2014-05-31 11:37 +0200, Yann E. MORIN spake thusly:

Quoted 1 line

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.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#12 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

All,
On 2014-05-31 11:37 +0200, Yann E. MORIN spake thusly:

Quoted 1 line

Peter K.

And I just realised that matches both Peters.
/me grabs coffee...

heh ;)

Quoted 1 line

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

Signature · 1 line
Bye, Peter Korsgaard
#13 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

In reply to Peter Kümmel

Peter, All,

On 2014-05-30 22:41 +0200, Peter K?mmel spake thusly:

Quoted 8 lines

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.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#14 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Quoted 12 lines · Yann E. MORIN

Peter, All,

On 2014-05-30 22:41 +0200, Peter K?mmel spake thusly:

Quoted 8 lines

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.

Quoted 6 lines

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

#15 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Peter, All,

On 2014-05-30 23:16 +0200, Peter K?mmel spake thusly:

Quoted 23 lines · Yann E. MORIN
Quoted 12 lines

Peter, All,

On 2014-05-30 22:41 +0200, Peter K?mmel spake thusly:

Quoted 8 lines

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.

Quoted 6 lines

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

Quoted 7 lines

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.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#16 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Quoted 30 lines · Yann E. MORIN

Peter, All,

On 2014-05-30 23:16 +0200, Peter K?mmel spake thusly:

Quoted 27 lines · Yann E. MORIN
Quoted 12 lines

Peter, All,

On 2014-05-30 22:41 +0200, Peter K?mmel spake thusly:

Quoted 8 lines

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.

Quoted 6 lines

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)
Quoted 5 lines
Quoted 3 lines

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".

Quoted 3 lines

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

Quoted 4 lines

Regards,
Yann E. MORIN.

#17 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

Peter, All,

On 2014-05-30 23:39 +0200, Peter K?mmel spake thusly:

Quoted 2 lines

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.

Quoted 1 line

(in a different patch?)

Yes, please.

Thank you! :-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#18 lore raw

PATCH 1/1 ti-gfx: pkg-config should also set parent include dir

In reply to Spenser Gilliland
Quoted 36 lines · Spenser Gilliland

Peter,

Quoted 6 lines · On May 30, 2014 10:55 AM, "Peter K?mmel" <syntheticpp at gmx.net…
Quoted 4 lines · Spenser Gilliland

Peter,

On May 30, 2014 10:00 AM, "Peter K?mmel" <syntheticpp at gmx.net <mailto:[email protected]>

Quoted 2 lines · <mailto:syntheticpp at gmx.net <mailto:[email protected]>>> wrote:
Quoted 2 lines
Quoted 2 lines
Signed-off-by Peter K?mmel <syntheticpp at gmx.net <mailto:[email protected]> <mailto:[email protected]

<mailto:[email protected]>>>

Quoted 23 lines
Quoted 21 lines
Quoted 16 lines
---
 package/ti-gfx/glesv2.pc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/ti-gfx/glesv2.pc +1 -2
index 4c70aec..c3846d0 100644
@@ -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}
--
Quoted 3 lines

1.9.1

Does this fix a package for you? The includedir var should be /usr/include which is a default include path.

Quoted 7 lines
Quoted 5 lines

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?

Quoted 6 lines

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.

Quoted 3 lines

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

Quoted 22 lines

Acked by: Spenser Gilliland <spenser at gillilanding.com <mailto:[email protected]>>

Thanks,
Spenser

Quoted 15 lines

Peter

Quoted 7 lines

Thanks,
Spenser _______________________________________________

Quoted 3 lines

buildroot mailing list
buildroot at busybox.net <mailto:[email protected]> <mailto:buildroot at busybox.net <mailto:[email protected]>>
http://lists.busybox.net/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot at busybox.net <mailto:[email protected]>
http://lists.busybox.net/mailman/listinfo/buildroot