<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Just to keep you informed that a bug report has been opened to Qt:<br>
    <a class="moz-txt-link-freetext" href="https://bugreports.qt.io/browse/QTBUG-52739">https://bugreports.qt.io/browse/QTBUG-52739</a><br>
    <br>
    We might save some patches in layers by solving this,<br>
    Thanks for helping,<br>
    <br>
    <div class="moz-cite-prefix">Le 20/04/2016 01:46, Julien Gueytat a
      écrit :<br>
    </div>
    <blockquote cite="mid:5716C35C.3040800@jgueytat.fr" type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      Hi again guys,<br>
      <br>
      after more investigations:<br>
      <br>
      I found out that the default value -lEGL comes from
      ./mkspecs/common/linux.conf which is included in
      ./mkspecs/linux-oe-g++/qmake.conf<br>
      <br>
      linux-oe-g++ being the only generic mkspecs that should be used in
      Yocto<br>
      <br>
      So! At the time the configuration enters egl.pro the content of
      the variables LIBS and QMAKE_EGL_LIBS are still a bit weird for me
      :<br>
      <br>
      1- LIBS already has the content of the QMAKE_EGL_LIBS content from
      the result of the pkg-config command.<br>
      2- QMAKE_EGL_LIBS has the content of the default value found in
      ./mkspecs/common/linux.conf<br>
      <br>
      There are two options to have it properly working:<br>
      - First and easy option : remove the QMAKE_EGL_LIBS default
      variable in ./mkspecs/linux-oe-g++/qmake.conf since the good libs
      seems to already been present in the LIBS variable.<br>
      - Second option : understand why the LIBS variable is already
      properly set and why the QMAKE_EGL_LIBS properly computed in the
      configure and present .qmake.vars is not used. (I would say that
      the device spec overrides the one from qmake spec... I did not dig
      further yet.)<br>
      <br>
      Anyway I'm pretty sure the trouble comes from meta-qt5 side now.
      I'm pretty sure meta-raspberrypi maintainers can confirm that
      their master branch handles pkg-config stuff now.<br>
      <br>
      Thanks advance for having a look on this guys,<br>
      Best Regards<br>
      <br>
      <br>
      <div class="moz-cite-prefix">Le 19/04/2016 10:46, Julien Gueytat a
        écrit :<br>
      </div>
      <blockquote cite="mid:5715F053.8040801@jgueytat.fr" type="cite">
        <meta http-equiv="content-type" content="text/html;
          charset=windows-1252">
        Hi,<br>
        <br>
        I still can't figure out the patch to apply in meta-qt5 to get
        EGL support with the Raspberry.<br>
        <br>
        The test to check EGL does not pass and fails with the following
        command:<br>
        <br>
        arm-poky-linux-gnueabi-g++  -march=armv7-a -marm 
        -mthumb-interwork -mfloat-abi=hard -mfpu=neon-vfpv4
        -mtune=cortex-a7
        --sysroot=/home/jgueytat/projects/LightPixels/poky/build/tmp/sysroots/lightpixels



        -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-O1 -o egl
        egl.o   -lGLESv2 -lbcm_host -lvchostif -lvcos -lvchiq_arm
        -pthread -lEGL<br>
        <br>
        <br>
        Here is the content of the file egl.pro:<br>
        <br>
        $ cat egl.pro <br>
        SOURCES = egl.cpp<br>
        <br>
        for(p, QMAKE_LIBDIR_EGL) {<br>
            exists($$p):LIBS += -L$$p<br>
        }<br>
        <br>
        message("In egl.pro - 1: QMAKE_LIBS_EGL = $$QMAKE_LIBS_EGL")<br>
        message("In egl.pro - 1: LIBS = $$LIBS")<br>
        <br>
        !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL<br>
        !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL<br>
        <br>
        message("In egl.pro - 2: QMAKE_LIBS_EGL = $$QMAKE_LIBS_EGL")<br>
        message("In egl.pro - 2: LIBS = $$LIBS")<br>
        <br>
        CONFIG -= qt<br>
        <br>
        In the main ./configure file of qtbase:<br>
        <br>
        | In configure #1: QMAKE_LIBS_EGL =<br>
        | In configure #2: QMAKE_LIBS_EGL = -lEGL -lGLESv2 -lbcm_host
        -lvchostif -lbcm_host -lvcos -lvchiq_arm -pthread<br>
        <br>
        The variable QMAKE_LIBS_EGL is set properly.<br>
        <br>
        <br>
        In the ./config.tests/qpa/egl/egl.pro file:<br>
        <br>
        | Project MESSAGE: In egl.pro - 1: QMAKE_LIBS_EGL = -lEGL<br>
        | Project MESSAGE: In egl.pro - 1: LIBS = -lEGL -lGLESv2
        -lbcm_host -lvchostif -lvcos -lvchiq_arm -pthread<br>
        | Project MESSAGE: In egl.pro - 2: QMAKE_LIBS_EGL = -lEGL<br>
        | Project MESSAGE: In egl.pro - 2: LIBS = -lEGL -lGLESv2
        -lbcm_host -lvchostif -lvcos -lvchiq_arm -pthread -lEGL<br>
        <br>
        <br>
        <b>What I see is that:</b><br>
        In the configure file the variable QMAKE_LIBS_EGL is properly
        set through pkg-config.<br>
        In the egl.pro file... The variable LIBS gets the content of
        QMAKE_LIBS_EGL and the variable QMAKE_LIBS_EGL gets back to its
        default -lEGL.<br>
        <br>
        In the end with have -lGLESv2 before -lEGL and this does not
        link.<br>
        <br>
        I checked also the content of .qmake.vars:<br>
        grep QMAKE_LIBS_EGL .qmake.vars <br>
        QMAKE_LIBS_EGL = -lEGL -lGLESv2 -lbcm_host -lvchostif -lbcm_host
        -lvcos -lvchiq_arm -pthread<br>
        <br>
        <br>
        The command QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL" seems
        to have his job done too late...<br>
        <br>
        If someone has an idea to get the proper correction done...<br>
        <br>
        Best Regards,<br>
        Julien<br>
        <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>