All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Gueytat <contact@jgueytat.fr>
To: yocto@yoctoproject.org
Cc: otavio@ossystems.com.br
Subject: Re: [meta-qt5][meta-raspberrypi]: Qt5 with EGL support for the Raspberry through linux-oe-g++
Date: Wed, 20 Apr 2016 01:46:36 +0200	[thread overview]
Message-ID: <5716C35C.3040800@jgueytat.fr> (raw)
In-Reply-To: <5715F053.8040801@jgueytat.fr>

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

Hi again guys,

after more investigations:

I found out that the default value -lEGL comes from 
./mkspecs/common/linux.conf which is included in 
./mkspecs/linux-oe-g++/qmake.conf

linux-oe-g++ being the only generic mkspecs that should be used in Yocto

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 :

1- LIBS already has the content of the QMAKE_EGL_LIBS content from the 
result of the pkg-config command.
2- QMAKE_EGL_LIBS has the content of the default value found in 
./mkspecs/common/linux.conf

There are two options to have it properly working:
- 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.
- 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.)

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.

Thanks advance for having a look on this guys,
Best Regards


Le 19/04/2016 10:46, Julien Gueytat a écrit :
> Hi,
>
> I still can't figure out the patch to apply in meta-qt5 to get EGL 
> support with the Raspberry.
>
> The test to check EGL does not pass and fails with the following command:
>
> 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
>
>
> Here is the content of the file egl.pro:
>
> $ cat egl.pro
> SOURCES = egl.cpp
>
> for(p, QMAKE_LIBDIR_EGL) {
>     exists($$p):LIBS += -L$$p
> }
>
> message("In egl.pro - 1: QMAKE_LIBS_EGL = $$QMAKE_LIBS_EGL")
> message("In egl.pro - 1: LIBS = $$LIBS")
>
> !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
> !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
>
> message("In egl.pro - 2: QMAKE_LIBS_EGL = $$QMAKE_LIBS_EGL")
> message("In egl.pro - 2: LIBS = $$LIBS")
>
> CONFIG -= qt
>
> In the main ./configure file of qtbase:
>
> | In configure #1: QMAKE_LIBS_EGL =
> | In configure #2: QMAKE_LIBS_EGL = -lEGL -lGLESv2 -lbcm_host 
> -lvchostif -lbcm_host -lvcos -lvchiq_arm -pthread
>
> The variable QMAKE_LIBS_EGL is set properly.
>
>
> In the ./config.tests/qpa/egl/egl.pro file:
>
> | Project MESSAGE: In egl.pro - 1: QMAKE_LIBS_EGL = -lEGL
> | Project MESSAGE: In egl.pro - 1: LIBS = -lEGL -lGLESv2 -lbcm_host 
> -lvchostif -lvcos -lvchiq_arm -pthread
> | Project MESSAGE: In egl.pro - 2: QMAKE_LIBS_EGL = -lEGL
> | Project MESSAGE: In egl.pro - 2: LIBS = -lEGL -lGLESv2 -lbcm_host 
> -lvchostif -lvcos -lvchiq_arm -pthread -lEGL
>
>
> *What I see is that:*
> In the configure file the variable QMAKE_LIBS_EGL is properly set 
> through pkg-config.
> 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.
>
> In the end with have -lGLESv2 before -lEGL and this does not link.
>
> I checked also the content of .qmake.vars:
> grep QMAKE_LIBS_EGL .qmake.vars
> QMAKE_LIBS_EGL = -lEGL -lGLESv2 -lbcm_host -lvchostif -lbcm_host 
> -lvcos -lvchiq_arm -pthread
>
>
> The command QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL" seems to 
> have his job done too late...
>
> If someone has an idea to get the proper correction done...
>
> Best Regards,
> Julien
>
>
>


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

  reply	other threads:[~2016-04-19 23:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19  8:46 [meta-qt5][meta-raspberrypi]: Qt5 with EGL support for the Raspberry through linux-oe-g++ Julien Gueytat
2016-04-19 23:46 ` Julien Gueytat [this message]
2016-04-21  8:15   ` Julien Gueytat
2016-04-21 17:10     ` Andrei Gherzan
2016-04-24 17:57       ` Julien Gueytat
2016-04-20 21:05 ` Andrei Gherzan
2016-04-20 21:06   ` Andrei Gherzan
  -- strict thread matches above, loose matches on Subject: below --
2016-04-21 17:55 Julien Gueytat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5716C35C.3040800@jgueytat.fr \
    --to=contact@jgueytat.fr \
    --cc=otavio@ossystems.com.br \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.