Skip to contentSkip to conversation

qtbase: replace host paths with qmake built-in properties in qconfig.pri

PATCH In review Jonathan Liu 4 participants 6 messages Aug 23, 2015 – Sep 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qtbase: replace host paths with qmake built-in properties in qconfig.pri

This avoids qconfig.pri in the Qt SDK incorrectly including paths from the build host that may not exist on the SDK host. As the paths are now correct, qmake can correctly detect system include paths and use -isystem instead of -I for Qt's include directories which allows the suppression of warnings from library headers when building Qt applications.

---
 recipes-qt/qt5/qtbase_git.bb | 5 +++++
 1 file changed, 5 insertions(+)
recipes-qt/qt5/qtbase_git.bb +5 -0
index ae63150..324a115 100644
@@ -234,6 +234,11 @@ do_install_append() {
     # Remove macx-ios-clang directory because /usr/lib/qt5/mkspecs/macx-ios-clang/rename_main.sh:#!/bin/bash
     # triggers QA Issue: qtbase-mkspecs requires /bin/bash, but no providers in its RDEPENDS [file-rdeps]
     rm -rf ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/macx-ios-clang
+
+    # Replace host paths with qmake built-in properties
+    sed -i -e 's| ${STAGING_DIR_NATIVE}| $$[QT_HOST_PREFIX]|g' \
+        -e 's| ${STAGING_DIR_HOST}| $$[QT_INSTALL_PREFIX]|g' \
+        ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/qconfig.pri
 }
 
 PACKAGES =. " \
Signature · 1 line
2.5.0
#1 lore raw

This seems to cause a build issue in qtwebkit and qtwebengine as well.

It manifests in not being able to find glib.h or gio/gio.h headers.

Khem, Martin and I are still discussing this on IRC, but I propose to revert this commit until it's tested better for all modules.

Signature · 1 line
Denys
Quoted 36 lines · Jonathan Liu

This avoids qconfig.pri in the Qt SDK incorrectly including paths from the build host that may not exist on the SDK host. As the paths are now correct, qmake can correctly detect system include paths and use -isystem instead of -I for Qt's include directories which allows the suppression of warnings from library headers when building Qt applications.

---
 recipes-qt/qt5/qtbase_git.bb | 5 +++++
 1 file changed, 5 insertions(+)
recipes-qt/qt5/qtbase_git.bb +5 -0
index ae63150..324a115 100644
@@ -234,6 +234,11 @@ do_install_append() {
     # Remove macx-ios-clang directory because /usr/lib/qt5/mkspecs/macx-ios-clang/rename_main.sh:#!/bin/bash
     # triggers QA Issue: qtbase-mkspecs requires /bin/bash, but no providers in its RDEPENDS [file-rdeps]
     rm -rf ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/macx-ios-clang
+
+    # Replace host paths with qmake built-in properties
+    sed -i -e 's| ${STAGING_DIR_NATIVE}| $$[QT_HOST_PREFIX]|g' \
+        -e 's| ${STAGING_DIR_HOST}| $$[QT_INSTALL_PREFIX]|g' \
+        ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/qconfig.pri
 }
 
 PACKAGES =. " \
Signature · 7 lines
2.5.0

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
#2 lore raw

Denys

I have posted an incremental fix, here
https://github.com/meta-qt5/meta-qt5/commit/a0a5002ed4bfcce50d6462897c4701246061581a

Jonathan

Can you see if it still fixes the usecase that you originally were trying to fix ?

Quoted 55 lines · Denys Dmytriyenko

This seems to cause a build issue in qtwebkit and qtwebengine as well.

It manifests in not being able to find glib.h or gio/gio.h headers.

Khem, Martin and I are still discussing this on IRC, but I propose to revert this commit until it's tested better for all modules.

--
Denys

Quoted 31 lines · Jonathan Liu

This avoids qconfig.pri in the Qt SDK incorrectly including paths from the build host that may not exist on the SDK host. As the paths are now correct, qmake can correctly detect system include paths and use -isystem instead of -I for Qt's include directories which allows the suppression of warnings from library headers when building Qt applications.

---
recipes-qt/qt5/qtbase_git.bb | 5 +++++

1 file changed, 5 insertions(+)
recipes-qt/qt5/qtbase_git.bb +5 -1
index ae63150..324a115 100644
@@ -234,6 +234,11 @@ do_install_append() {
    # Remove macx-ios-clang directory because /usr/lib/qt5/mkspecs/macx-ios-clang/rename_main.sh:#!/bin/bash
    # triggers QA Issue: qtbase-mkspecs requires /bin/bash, but no providers in its RDEPENDS [file-rdeps]
    rm -rf ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/macx-ios-clang
+
+    # Replace host paths with qmake built-in properties
+    sed -i -e 's| ${STAGING_DIR_NATIVE}| $$[QT_HOST_PREFIX]|g' \
+        -e 's| ${STAGING_DIR_HOST}| $$[QT_INSTALL_PREFIX]|g' \
+        ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/qconfig.pri
 }
 
 PACKAGES =. " \
--

2.5.0

Quoted 5 lines

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#3 lore raw

Hi Khem,

Quoted 8 lines · Khem Raj

Denys

I have posted an incremental fix, here
https://github.com/meta-qt5/meta-qt5/commit/a0a5002ed4bfcce50d6462897c4701246061581a

Jonathan

Can you see if it still fixes the usecase that you originally were trying to fix ?

Your patch misses some host paths that aren't in ${STAGING_DIR_HOST}/usr (referred to as ${STAGING_EXECPREFIXDIR} in your patch):
${STAGING_DIR_HOST}/lib
${STAGING_DIR_HOST}

You can change the following in your patch:
-e 's| ${STAGING_EXECPREFIXDIR}| $$[QT_INSTALL_PREFIX]|g' \

To:
-e 's| ${STAGING_DIR_HOST}| $$[QT_SYSROOT]|g' \

So that it covers the host paths missed by sed.

Regards,
Jonathan

Quoted 47 lines
Quoted 47 lines · Denys Dmytriyenko

This seems to cause a build issue in qtwebkit and qtwebengine as well.

It manifests in not being able to find glib.h or gio/gio.h headers.

Khem, Martin and I are still discussing this on IRC, but I propose to revert this commit until it's tested better for all modules.

--
Denys

Quoted 32 lines · Jonathan Liu

This avoids qconfig.pri in the Qt SDK incorrectly including paths from the build host that may not exist on the SDK host. As the paths are now correct, qmake can correctly detect system include paths and use -isystem instead of -I for Qt's include directories which allows the suppression of warnings from library headers when building Qt applications.

---
recipes-qt/qt5/qtbase_git.bb | 5 +++++

1 file changed, 5 insertions(+)
recipes-qt/qt5/qtbase_git.bb +5 -1
index ae63150..324a115 100644
@@ -234,6 +234,11 @@ do_install_append() {
    # Remove macx-ios-clang directory because /usr/lib/qt5/mkspecs/macx-ios-clang/rename_main.sh:#!/bin/bash
    # triggers QA Issue: qtbase-mkspecs requires /bin/bash, but no providers in its RDEPENDS [file-rdeps]
    rm -rf ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/macx-ios-clang
+
+    # Replace host paths with qmake built-in properties
+    sed -i -e 's| ${STAGING_DIR_NATIVE}| $$[QT_HOST_PREFIX]|g' \
+        -e 's| ${STAGING_DIR_HOST}| $$[QT_INSTALL_PREFIX]|g' \
+        ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/qconfig.pri
 }
 
 PACKAGES =. " \
--

2.5.0

--

#4 lore raw
Quoted 21 lines · Jonathan Liu

Hi Khem,

Quoted 8 lines · Khem Raj

Denys

I have posted an incremental fix, here
https://github.com/meta-qt5/meta-qt5/commit/a0a5002ed4bfcce50d6462897c4701246061581a

Jonathan

Can you see if it still fixes the usecase that you originally were trying to fix ?

Your patch misses some host paths that aren't in ${STAGING_DIR_HOST}/usr (referred to as ${STAGING_EXECPREFIXDIR} in your patch):
${STAGING_DIR_HOST}/lib
${STAGING_DIR_HOST}

You can change the following in your patch:
-e 's| ${STAGING_EXECPREFIXDIR}| $$[QT_INSTALL_PREFIX]|g' \

Quoted 7 lines

To:
-e 's| ${STAGING_DIR_HOST}| $$[QT_SYSROOT]|g' \

So that it covers the host paths missed by sed.

Regards,
Jonathan

Ping on this one. Did we get an updated fix for it? Sorry, I was busy lately with own releases and wasn't paying attention, but the tip of meta-qt5 is still broken on qtwebkit. Thanks.

Signature · 1 line
Denys
Quoted 51 lines
Quoted 46 lines
Quoted 46 lines · Denys Dmytriyenko

This seems to cause a build issue in qtwebkit and qtwebengine as well.

It manifests in not being able to find glib.h or gio/gio.h headers.

Khem, Martin and I are still discussing this on IRC, but I propose to revert this commit until it's tested better for all modules.

--
Denys

Quoted 32 lines · Jonathan Liu

This avoids qconfig.pri in the Qt SDK incorrectly including paths from the build host that may not exist on the SDK host. As the paths are now correct, qmake can correctly detect system include paths and use -isystem instead of -I for Qt's include directories which allows the suppression of warnings from library headers when building Qt applications.

---
recipes-qt/qt5/qtbase_git.bb | 5 +++++

1 file changed, 5 insertions(+)
recipes-qt/qt5/qtbase_git.bb +5 -1
index ae63150..324a115 100644
@@ -234,6 +234,11 @@ do_install_append() {
    # Remove macx-ios-clang directory because /usr/lib/qt5/mkspecs/macx-ios-clang/rename_main.sh:#!/bin/bash
    # triggers QA Issue: qtbase-mkspecs requires /bin/bash, but no providers in its RDEPENDS [file-rdeps]
    rm -rf ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/macx-ios-clang
+
+    # Replace host paths with qmake built-in properties
+    sed -i -e 's| ${STAGING_DIR_NATIVE}| $$[QT_HOST_PREFIX]|g' \
+        -e 's| ${STAGING_DIR_HOST}| $$[QT_INSTALL_PREFIX]|g' \
+        ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/qconfig.pri
 }
 
 PACKAGES =. " \
--

2.5.0

--

Signature · 4 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
#5 lore raw
Quoted 25 lines · Denys Dmytriyenko
Quoted 24 lines · Jonathan Liu

Hi Khem,

Quoted 8 lines · Khem Raj

Denys

I have posted an incremental fix, here
https://github.com/meta-qt5/meta-qt5/commit/a0a5002ed4bfcce50d6462897c4701246061581a

Jonathan

Can you see if it still fixes the usecase that you originally were trying to fix ?

Your patch misses some host paths that aren't in ${STAGING_DIR_HOST}/usr (referred to as ${STAGING_EXECPREFIXDIR} in your patch):
${STAGING_DIR_HOST}/lib
${STAGING_DIR_HOST}

You can change the following in your patch:
-e 's| ${STAGING_EXECPREFIXDIR}| $$[QT_INSTALL_PREFIX]|g' \

To:
-e 's| ${STAGING_DIR_HOST}| $$[QT_SYSROOT]|g' \

Quoted 8 lines
Quoted 4 lines

So that it covers the host paths missed by sed.

Regards,
Jonathan

Ping on this one. Did we get an updated fix for it? Sorry, I was busy lately with own releases and wasn't paying attention, but the tip of meta-qt5 is still broken on qtwebkit. Thanks.

Fix is in master-next waiting for jenkins builds to verify Khem's version squashed with update from Jonathan.

Quoted 61 lines
Signature · 2 lines
-- 
Denys
Quoted 51 lines
Quoted 46 lines
Quoted 46 lines · Denys Dmytriyenko

This seems to cause a build issue in qtwebkit and qtwebengine as well.

It manifests in not being able to find glib.h or gio/gio.h headers.

Khem, Martin and I are still discussing this on IRC, but I propose to revert this commit until it's tested better for all modules.

--
Denys

Quoted 32 lines · Jonathan Liu

This avoids qconfig.pri in the Qt SDK incorrectly including paths from the build host that may not exist on the SDK host. As the paths are now correct, qmake can correctly detect system include paths and use -isystem instead of -I for Qt's include directories which allows the suppression of warnings from library headers when building Qt applications.

---
recipes-qt/qt5/qtbase_git.bb | 5 +++++

1 file changed, 5 insertions(+)
recipes-qt/qt5/qtbase_git.bb +5 -1
index ae63150..324a115 100644
@@ -234,6 +234,11 @@ do_install_append() {
    # Remove macx-ios-clang directory because /usr/lib/qt5/mkspecs/macx-ios-clang/rename_main.sh:#!/bin/bash
    # triggers QA Issue: qtbase-mkspecs requires /bin/bash, but no providers in its RDEPENDS [file-rdeps]
    rm -rf ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/macx-ios-clang
+
+    # Replace host paths with qmake built-in properties
+    sed -i -e 's| ${STAGING_DIR_NATIVE}| $$[QT_HOST_PREFIX]|g' \
+        -e 's| ${STAGING_DIR_HOST}| $$[QT_INSTALL_PREFIX]|g' \
+        ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/qconfig.pri
 }
 
 PACKAGES =. " \
--

2.5.0

--

Signature · 4 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 4 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]