qt5base: Fix inconsistencies when overriding qmake properties
PATCH v5 1/2 qt5base: Fix inconsistencies when overriding qmake properties
When querying the qmake properties with our custom qt.conf present, I noticed that they were different from the built-in ones (without qt.conf). Most notably QT_INSTALL_PREFIX was a concatenated string of two absolute pathes (hostdir + sysroot).
This is due to Prefix being set to our HOST_DIR and HostPrefix not being set at all. I guess this was also the root cause of the initial problem with qt.conf.in, because once Prefix and HostPrefix were set to their correct values, re-setting all the other default pathes became obsolete. (However, since our pathes for Headers, Plugins and Examples are non-default, they still have to be explicitely set.)
There is one exception to this: Omitting 'Settings' leads to the CONFIGURATION path being plain /usr, whereas the default without qt.conf is /usr/etc/xdg. But even if storing configs directly under /usr seems a bit strange we keep it that way, so the behaviour of "our" qmake doesnt change.
--- package/qt5/qt5base/qt.conf.in | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
v4->v5
- Split from qmake infra patches (because of limited time for full rework)
- Keep custom settings path /usr instead of resetting to default /usr/etc/xdg
package/qt5/qt5base/qt.conf.in +2 -14
@@ -1,19 +1,7 @@ [Paths] -Prefix=@@HOST_DIR@@ +Prefix=/usr +HostPrefix=@@HOST_DIR@@ Sysroot=@@STAGING_DIR@@ Headers=/usr/include/qt5 -Libraries=/usr/lib -LibraryExecutables=/usr/libexec -Binaries=/usr/bin Plugins=/usr/lib/qt/plugins Examples=/usr/lib/qt/examples -Qml2Imports=/usr/qml -Imports=/usr/imports -Translations=/usr/translations -Examples=/usr/lib/qt/examples -Demos=/usr/lib/qt/examples -Tests=/usr/tests -Settings=/usr -Documentation=/usr/doc -ArchData=/usr -Data=/usr
Signature · 1 line
2.21.0
PATCH v5 2/2 qt5: Remove *.la/*.prl fixup script
After fixing Prefix in our custom qt.conf, Qt computes and embeds the correct sysroot prefixed pathes in all *.la and *.prl files.
So remove fixup of
- *.la files because they are generically fixed anyway
- *.prl files because occurences of absolute /usr/lib were no longer observed
--- package/pkg-qmake.mk | 1 - package/qt5/qt5.mk | 15 --------------- 2 files changed, 16 deletions(-)
v4->v5
- Split from qmake infra patch set
- Remove macro as well (Arnout)
- extend commit message a bit
package/pkg-qmake.mk +0 -1
@@ -68,7 +68,6 @@ endif ifndef $(2)_INSTALL_STAGING_CMDS define $(2)_INSTALL_STAGING_CMDS $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_BUILDDIR) $$($(2)_INSTALL_STAGING_OPTS) - $$(QT5_LA_PRL_FILES_FIXUP) endef endif
package/qt5/qt5.mk +0 -15
@@ -17,20 +17,5 @@ QT5_SITE = https://download.qt.io/official_releases/qt/$(QT5_VERSION_MAJOR)/$(QT include $(sort $(wildcard package/qt5/*/*.mk)) -define QT5_LA_PRL_FILES_FIXUP - for i in $$(find $(STAGING_DIR)/usr/lib* -name "libQt5*.la"); do \ - $(SED) "s:$(BASE_DIR):@BASE_DIR@:g" \ - -e "s:$(STAGING_DIR):@STAGING_DIR@:g" \ - -e "s:\(['= ]\)/usr:\\1 at STAGING_DIR@/usr:g" \ - -e "s:@STAGING_DIR@:$(STAGING_DIR):g" \ - -e "s:@BASE_DIR@:$(BASE_DIR):g" \ - $$i ; \ - $(SED) "/^dependency_libs=/s%-L/usr/lib %%g" $$i ; \ - done - for i in $$(find $(STAGING_DIR)/usr/lib* -name "libQt5*.prl"); do \ - $(SED) "s%-L/usr/lib%%" $$i; \ - done -endef - # Variable for other Qt applications to use QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
Signature · 1 line
2.21.0
Arnout Vandecappelle
AppliedPATCH v5 2/2 qt5: Remove *.la/*.prl fixup script
Quoted 5 lines · Andreas Naumann
After fixing Prefix in our custom qt.conf, Qt computes and embeds the correct sysroot prefixed pathes in all *.la and *.prl files.
So remove fixup of
- *.la files because they are generically fixed anyway
- *.prl files because occurences of absolute/usr/libwere no longer observed
Applied to master, thanks.
Can you keep an eye on autobuild failures caused by this? Note that the
failures may be in packages using qt5 (e.g. wireshark) so it may not be easy to notice.
Regards,
Arnout
Quoted 50 lines
Signed-off-by Andreas Naumann <[email protected]>--- package/pkg-qmake.mk | 1 - package/qt5/qt5.mk | 15 --------------- 2 files changed, 16 deletions(-)
v4->v5
- Split from qmake infra patch set
- Remove macro as well (Arnout)
- extend commit message a bitpackage/pkg-qmake.mk +0
-1@@ -68,7 +68,6 @@ endif ifndef $(2)_INSTALL_STAGING_CMDS define $(2)_INSTALL_STAGING_CMDS $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_BUILDDIR) $$($(2)_INSTALL_STAGING_OPTS) - $$(QT5_LA_PRL_FILES_FIXUP) endef endifpackage/qt5/qt5.mk +0
-15@@ -17,20 +17,5 @@ QT5_SITE = https://download.qt.io/official_releases/qt/$(QT5_VERSION_MAJOR)/$(QT include $(sort $(wildcard package/qt5/*/*.mk)) -define QT5_LA_PRL_FILES_FIXUP - for i in $$(find $(STAGING_DIR)/usr/lib* -name "libQt5*.la"); do \ - $(SED) "s:$(BASE_DIR):@BASE_DIR@:g" \ - -e "s:$(STAGING_DIR):@STAGING_DIR@:g" \ - -e "s:\(['= ]\)/usr:\\1 at STAGING_DIR@/usr:g" \ - -e "s:@STAGING_DIR@:$(STAGING_DIR):g" \ - -e "s:@BASE_DIR@:$(BASE_DIR):g" \ - $$i ; \ - $(SED) "/^dependency_libs=/s%-L/usr/lib %%g" $$i ; \ - done - for i in $$(find $(STAGING_DIR)/usr/lib* -name "libQt5*.prl"); do \ - $(SED) "s%-L/usr/lib%%" $$i; \ - done -endef - # Variable for other Qt applications to use QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
PATCH v5 2/2 qt5: Remove *.la/*.prl fixup script
Hi Arnout,
Am 18.04.19 um 00:16 schrieb Arnout Vandecappelle:
Quoted 10 lines · Andreas Naumann
Quoted 5 lines
After fixing Prefix in our custom qt.conf, Qt computes and embeds the correct sysroot prefixed pathes in all *.la and *.prl files.
So remove fixup of
- *.la files because they are generically fixed anyway
- *.prl files because occurences of absolute/usr/libwere no longer observedApplied to master, thanks.
I just realized that I mistakenly sent this patch from the end of my qt5 infra branch. Apparently you reworked it before applying it... thanks!
regards,
Andreas
Quoted 59 lines
Can you keep an eye on autobuild failures caused by this? Note that the
failures may be in packages using qt5 (e.g. wireshark) so it may not be easy to notice.Regards,
ArnoutQuoted 50 lines
Signed-off-by Andreas Naumann <[email protected]>--- package/pkg-qmake.mk | 1 - package/qt5/qt5.mk | 15 --------------- 2 files changed, 16 deletions(-)
v4->v5
- Split from qmake infra patch set
- Remove macro as well (Arnout)
- extend commit message a bitpackage/pkg-qmake.mk +0
-1@@ -68,7 +68,6 @@ endif ifndef $(2)_INSTALL_STAGING_CMDS define $(2)_INSTALL_STAGING_CMDS $$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_BUILDDIR) $$($(2)_INSTALL_STAGING_OPTS) - $$(QT5_LA_PRL_FILES_FIXUP) endef endifpackage/qt5/qt5.mk +0
-15@@ -17,20 +17,5 @@ QT5_SITE = https://download.qt.io/official_releases/qt/$(QT5_VERSION_MAJOR)/$(QT include $(sort $(wildcard package/qt5/*/*.mk)) -define QT5_LA_PRL_FILES_FIXUP - for i in $$(find $(STAGING_DIR)/usr/lib* -name "libQt5*.la"); do \ - $(SED) "s:$(BASE_DIR):@BASE_DIR@:g" \ - -e "s:$(STAGING_DIR):@STAGING_DIR@:g" \ - -e "s:\(['= ]\)/usr:\\1 at STAGING_DIR@/usr:g" \ - -e "s:@STAGING_DIR@:$(STAGING_DIR):g" \ - -e "s:@BASE_DIR@:$(BASE_DIR):g" \ - $$i ; \ - $(SED) "/^dependency_libs=/s%-L/usr/lib %%g" $$i ; \ - done - for i in $$(find $(STAGING_DIR)/usr/lib* -name "libQt5*.prl"); do \ - $(SED) "s%-L/usr/lib%%" $$i; \ - done -endef - # Variable for other Qt applications to use QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
PATCH v5 1/2 qt5base: Fix inconsistencies when overriding qmake properties
In reply to Andreas NaumannQuoted 3 lines · Andreas Naumann
When querying the qmake properties with our custom qt.conf present, I noticed that they were different from the built-in ones (without qt.conf). Most notably
QT_INSTALL_PREFIXwas a concatenated string of two absolute pathes
It is paths, not pathes.
Also, please wrap the commit log at 72 characters.
With that, I applied to master, thanks.
Regards,
Arnout
Quoted 51 lines
(hostdir + sysroot).
This is due to Prefix being set to our
HOST_DIRand HostPrefix not being set at all. I guess this was also the root cause of the initial problem with qt.conf.in, because once Prefix and HostPrefix were set to their correct values, re-setting all the other default pathes became obsolete. (However, since our pathes for Headers, Plugins and Examples are non-default, they still have to be explicitely set.)There is one exception to this: Omitting 'Settings' leads to the CONFIGURATION path being plain /usr, whereas the default without qt.conf is
/usr/etc/xdg. But even if storing configs directly under /usr seems a bit strange we keep it that way, so the behaviour of "our" qmake doesnt change.Signed-off-by Andreas Naumann <[email protected]>--- package/qt5/qt5base/qt.conf.in | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
v4->v5
- Split from qmake infra patches (because of limited time for full rework)
- Keep custom settings path /usr instead of resetting to default/usr/etc/xdgpackage/qt5/qt5base/qt.conf.in +2
-14@@ -1,19 +1,7 @@ [Paths] -Prefix=@@HOST_DIR@@ +Prefix=/usr +HostPrefix=@@HOST_DIR@@ Sysroot=@@STAGING_DIR@@ Headers=/usr/include/qt5 -Libraries=/usr/lib -LibraryExecutables=/usr/libexec -Binaries=/usr/bin Plugins=/usr/lib/qt/plugins Examples=/usr/lib/qt/examples -Qml2Imports=/usr/qml -Imports=/usr/imports -Translations=/usr/translations -Examples=/usr/lib/qt/examples -Demos=/usr/lib/qt/examples -Tests=/usr/tests -Settings=/usr -Documentation=/usr/doc -ArchData=/usr -Data=/usr
PATCH v5 1/2 qt5base: Fix inconsistencies when overriding qmake properties
Am 18.04.19 um 00:09 schrieb Arnout Vandecappelle:
Quoted 10 lines · Andreas Naumann
Quoted 3 lines
When querying the qmake properties with our custom qt.conf present, I noticed that they were different from the built-in ones (without qt.conf). Most notably
QT_INSTALL_PREFIXwas a concatenated string of two absolute pathesIt is paths, not pathes.
Also, please wrap the commit log at 72 characters.
Ok, wasnt aware of that, always thought 80.
Quoted 2 lines
With that, I applied to master, thanks.
Thanks,
Andreas
Quoted 56 lines
Regards,
ArnoutQuoted 51 lines
(hostdir + sysroot).
This is due to Prefix being set to our
HOST_DIRand HostPrefix not being set at all. I guess this was also the root cause of the initial problem with qt.conf.in, because once Prefix and HostPrefix were set to their correct values, re-setting all the other default pathes became obsolete. (However, since our pathes for Headers, Plugins and Examples are non-default, they still have to be explicitely set.)There is one exception to this: Omitting 'Settings' leads to the CONFIGURATION path being plain /usr, whereas the default without qt.conf is
/usr/etc/xdg. But even if storing configs directly under /usr seems a bit strange we keep it that way, so the behaviour of "our" qmake doesnt change.Signed-off-by Andreas Naumann <[email protected]>--- package/qt5/qt5base/qt.conf.in | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
v4->v5
- Split from qmake infra patches (because of limited time for full rework)
- Keep custom settings path /usr instead of resetting to default/usr/etc/xdgpackage/qt5/qt5base/qt.conf.in +2
-14@@ -1,19 +1,7 @@ [Paths] -Prefix=@@HOST_DIR@@ +Prefix=/usr +HostPrefix=@@HOST_DIR@@ Sysroot=@@STAGING_DIR@@ Headers=/usr/include/qt5 -Libraries=/usr/lib -LibraryExecutables=/usr/libexec -Binaries=/usr/bin Plugins=/usr/lib/qt/plugins Examples=/usr/lib/qt/examples -Qml2Imports=/usr/qml -Imports=/usr/imports -Translations=/usr/translations -Examples=/usr/lib/qt/examples -Demos=/usr/lib/qt/examples -Tests=/usr/tests -Settings=/usr -Documentation=/usr/doc -ArchData=/usr -Data=/usr
PATCH v5 1/2 qt5base: Fix inconsistencies when overriding qmake properties
In reply to Andreas NaumannHello Andreas,
Quoted 12 lines · On Mon, 15 Apr 2019 22:56:21 +0200 Andreas Naumann <[email protected]>…
When querying the qmake properties with our custom qt.conf present, I noticed that they were different from the built-in ones (without qt.conf). Most notably
QT_INSTALL_PREFIXwas a concatenated string of two absolute pathes (hostdir + sysroot).This is due to Prefix being set to our
HOST_DIRand HostPrefix not being set at all. I guess this was also the root cause of the initial problem with qt.conf.in, because once Prefix and HostPrefix were set to their correct values, re-setting all the other default pathes became obsolete. (However, since our pathes for Headers, Plugins and Examples are non-default, they still have to be explicitely set.)
Quoted 6 lines
There is one exception to this: Omitting 'Settings' leads to the CONFIGURATION path being plain /usr, whereas the default without qt.conf is
/usr/etc/xdg. But even if storing configs directly under /usr seems a bit strange we keep it that way, so the behaviour of "our" qmake doesnt change.Signed-off-by Andreas Naumann <[email protected]>
I'm not sure if it's related to this commit, but some users are complaining about QML applications not working anymore:
https://bugs.busybox.net/show_bug.cgi?id=11926
Could you have a look at this bug report ? I wanted to re-assign the bug to you, but it seems like you don't have a Bugzilla account.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v5 1/2 qt5base: Fix inconsistencies when overriding qmake properties
Hi Thomas,
Am 17.08.19 um 23:59 schrieb Thomas Petazzoni:
Quoted 24 lines
Hello Andreas,
Quoted 12 lines · On Mon, 15 Apr 2019 22:56:21 +0200 Andreas Naumann <[email protected]>…
When querying the qmake properties with our custom qt.conf present, I noticed that they were different from the built-in ones (without qt.conf). Most notably
QT_INSTALL_PREFIXwas a concatenated string of two absolute pathes (hostdir + sysroot).This is due to Prefix being set to our
HOST_DIRand HostPrefix not being set at all. I guess this was also the root cause of the initial problem with qt.conf.in, because once Prefix and HostPrefix were set to their correct values, re-setting all the other default pathes became obsolete. (However, since our pathes for Headers, Plugins and Examples are non-default, they still have to be explicitely set.)Quoted 6 lines
There is one exception to this: Omitting 'Settings' leads to the CONFIGURATION path being plain /usr, whereas the default without qt.conf is
/usr/etc/xdg. But even if storing configs directly under /usr seems a bit strange we keep it that way, so the behaviour of "our" qmake doesnt change.Signed-off-by Andreas Naumann <[email protected]>
Quoted 7 lines
I'm not sure if it's related to this commit, but some users are complaining about QML applications not working anymore:
https://bugs.busybox.net/show_bug.cgi?id=11926Could you have a look at this bug report ? I wanted to re-assign the bug to you, but it seems like you don't have a Bugzilla account.
he reverted the my commit, but nothing changed. I have now tried Cinematic Experience with the linaro toolchain (albeit with buildroot 2019.08 plus patch series for mesa3d 19.1.5) and all libs have been found, no problem.
So, i dont know what to suggest. Have you had other bug reports in this direction?
I have been partly involved in
https://git.buildroot.net/buildroot/commit/?id=4ad73bf5e6326f7a414ecc94dbac0c79f5d33b31
but that was a compile time problem and has been solved.
regards,
Andreas
Quoted 5 lines
Thanks!
Thomas