Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-52739

must not use pkg-config to find EGL on Raspberry Pi

XMLWordPrintable

      Hi,

      it's been some days I'm working on it.
      I'm trying to compile meta-qt5 for Yocto with the RaspberryPi.

      To summarize:
      RaspberryPi can link with: -lEGL -lGLESv2 and can't with -lGLESv2 -lEGL

      I was looking on RaspberryPi side first and found out that they properly feed pkg-config.
      Then I went into meta-qt5 and found out that... other BSP layers adds some weird patches to have EGL working.
      I did not want any patch and kept digging.

      When you use pkg-config, you feed "libs" variable and in the ./config.tests/qpa/egl/egl.pro file, you are looking for QMAKE_LIBS_EGL.

      So... you set libs and take the default of QMAKE_LIBS_EGL.
      With the RaspberryPi, libs = -lEGL -lGLESv2 ... and the default is QMAKE_LIBS_EGL = -lEGL.

      => -lEGL -lGLESv2 -lEGL => -lGLESv2 -lEGL => can't link

      I think that you want to keep the pkg-config functionnality AND the QMAKE_LIBS_EGL variable... Which is set to the default value!!!

      What should be done is:
      If pkg-config then don't take QMAKE_LIBS_EGL into account unless QMAKE_LIBS_EGL is also properly set.

      I guess that was what the guy who wrote this configure part thought. But the variable QMAKE_LIBS_EGL computed in the configure does not pass to the egl.pro file.

      I'll paste extracts. And hope we will correct it together.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            buddenha Oswald Buddenhagen
            jgueytat JulienGueytat
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes