Qt Master stream generated qmake has the wrong internal paths, QT_SYSROOT

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Qt Master stream generated qmake has the wrong internal paths, QT_SYSROOT

Jump to solution
3,895 Views
ossian
Contributor III

I'm experiencing an issue with qmake generated form the Qt master stream. When generating the "meta-toolchain-qt5" form the master qt repository, all the paths in the generated qmake are pointing to the wrong location. A "./qmake -query" generates the following path list:

QT_SYSROOT:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux

QT_INSTALL_PREFIX:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr

QT_INSTALL_PREFIX/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr

QT_INSTALL_ARCHDATA:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5

QT_INSTALL_ARCHDATA/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5

QT_INSTALL_DATA:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/share/qt5

QT_INSTALL_DATA/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/share/qt5

QT_INSTALL_DOCS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/share/doc/qt5

QT_INSTALL_DOCS/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/share/doc/qt5

QT_INSTALL_HEADERS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/include/qt5

QT_INSTALL_HEADERS/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/include/qt5

QT_INSTALL_LIBS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib

QT_INSTALL_LIBS/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib

QT_INSTALL_LIBEXECS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5/libexec

QT_INSTALL_LIBEXECS/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5/libexec

QT_INSTALL_BINS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/bin/qt5

QT_INSTALL_BINS/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/bin/qt5

QT_INSTALL_TESTS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/tests

QT_INSTALL_TESTS/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/tests

QT_INSTALL_PLUGINS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5/plugins

QT_INSTALL_PLUGINS/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5/plugins

QT_INSTALL_IMPORTS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5/imports

QT_INSTALL_IMPORTS/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5/imports

QT_INSTALL_QML:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5/qml

QT_INSTALL_QML/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5/qml

QT_INSTALL_TRANSLATIONS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/share/qt5/translations

QT_INSTALL_TRANSLATIONS/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/share/qt5/translations

QT_INSTALL_CONFIGURATION:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/etc/qt5

QT_INSTALL_CONFIGURATION/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/etc/qt5

QT_INSTALL_EXAMPLES:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/examples

QT_INSTALL_EXAMPLES/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/examples

QT_INSTALL_DEMOS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/examples

QT_INSTALL_DEMOS/raw:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/examples

QT_HOST_PREFIX:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr

QT_HOST_DATA:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib/qt5

QT_HOST_BINS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/bin/qt5

QT_HOST_LIBS:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr/lib

QT_EXTERNAL_HOST_BINS:

QMAKE_SPEC:linux-oe-g++

QMAKE_XSPEC:linux-oe-g++

QMAKE_VERSION:3.0

QT_VERSION:5.3.2

It looks like all the QT_INSTALL paths are being prefixed with the QT_SYSROOT path. For example QT_INSTALL_PREFIX is:

QT_INSTALL_PREFIX:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr

but should actually be:

QT_INSTALL_PREFIX:/home/user/fsl_yocto_master/build/tmp/sysroots/x86_64-linux/usr

It looks like QT_SYSROOT is being inserted in front of all the paths?

Looking at and installing the daisy Qt branch the QT_SYSROOT path of qmake is blank, and all the qmake paths are correct.

Is anyone else experiencing this issue?

I have looked at the Qt recipe for the master branch, but it was not apparent to me where this correction would be made. Does anyone know how I can configure the build when generating the "meta-tootlchan-qt5" so that the qmake path generated are correct?

Any help would be greatly appreciated.

Thanks,

Ossian

Tags (3)
1 Solution
1,835 Views
rgallego
Contributor II

Hi

I have the same problem,

I think that this Fix SDK environment setting · 2f1b8fe · meta-qt5/meta-qt5 · GitHub solved it.

I'll try

View solution in original post

4 Replies
1,835 Views
ossian
Contributor III

After some additional investigation and looking at the daisy configuration 1.6.1 running Qt 5.2 which is working, I see that the qmake paths are similar to what I'm seeing with the master build 1.7 and Qt 5.3

So, the qmake paths don't appear to be the issue.

Reading through the following two links:

https://github.com/meta-qt5/meta-qt5/wiki/Building-with-OE

http://qt-project.org/doc/qt-5/qt-conf.html

I tried creating my own qt.config file, but this did not appear to make a difference.

The issue that I'm encountering is that I run through the install process using the master source branch using the following link for the wandboard:

http://wiki.wandboard.org/index.php/Building_Qt5_using_yocto_on_Wandboard

However I encounter an issue with qmake when executing the following step:

"2. Add your new cross compiled Qt version by selecting the qmake located in /opt/poky/1.6/sysroots/x86_64-pokysdk-linux/usr/bin/qt5"

In Qt Creator I get the following error message:

"Qt version is not properly installed, please run make install"

and under Details I just get: "Invalid Qt version"

It is not clear to me why qmake is not properly installed? Has anyone else encountered this issue?

Building Qt from the sources out side of the yocto process gives me a qmake that appears to be correct, but when I go to build a sample application I get the following compiler error:

fatal error: gnu/stubs-soft.h: No such file or directory

# include <gnu/stubs-soft.h>

                             ^

compilation terminated.

make: *** [main.o] Error 1

After a little investigation it look like this error is possibly due to a hard vs soft floating point configuration issue? In previous Daisy build I would use -mfloat-abi=hard in the mkspec qmake.conf file as was recommended by some, but I see that in the recent master branch this setting is not explicitly set. What is the current thinking regarding the -mfloat-abi=hard setting, are the Freescale video drivers compatible with this setting?

Since I have tried to setup the master yocto build with the master Qt recipes twice with the same results, I was curious if others had successfully been able to build the distribution following the wandboard or some other i.MX6 installation instructions? Any clues as to where I might be misstepping would be greatly appreciated. 

Thanks,

Ossian

0 Kudos
1,836 Views
rgallego
Contributor II

Hi

I have the same problem,

I think that this Fix SDK environment setting · 2f1b8fe · meta-qt5/meta-qt5 · GitHub solved it.

I'll try

1,835 Views
ossian
Contributor III

Hello Rodrigo,

Thank you for providing the link to this fix. I applied the fix that you provided and the following fix:

Fix SDK environment setting · 2f1b8fe · meta-qt5/meta-qt5 · GitHub

nativesdk-qtbase: Fix qtconfig.pri · 51a4cdf · meta-qt5/meta-qt5 · GitHub

Thank you Otavio for making the recipe updates.

Applying the fixes resolved the issue I was having. Qt Creator is working and I was successfully able to successfully build and run a sample application on the target Cortex board.

As a note to others the OE_QMAKE_ environment variables were moved to a qt5.sh file under /opt/poky/1.7/sysroots/x86_64-pokysdk-linux/environment-setup.d

The environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi script will automatically execute the qt5.sh script so no need to call it explicitly.

Remember, as outlined in other posts, to add the following line:

source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

above the #! /bin/sh in the qtcreator.sh script. Always run the qtcreator.sh script to launch Qt Creator.

Once again thank you Rodrigo for the link and Otavio for making the fixes.

Thanks,

Ossian

1,835 Views
gusarambula
NXP TechSupport
NXP TechSupport

Thank you for posting your findings! I'm sure it will help another users of the communities.

0 Kudos