Skip to content

Commit df660aa

Browse files
author
MarcoFalke
committed
Merge #14000: depends: fix qt determinism
de0b4fb depends: fix qt determinism (Cory Fields) Pull request description: Thanks to @MarcoFalke for pointing out the problem and the solution as well. I'm unsure if this takes care of all of the determinism issues with 0.17rc1, but it should fix at least one. Qt's configure grabs the path to xkb's data root during configure, but the build changes in 5.8 apparently broke the handling for cross builds. As a result, the string embedded in the binary depends on whether or not some files are present in the builder's filesystem. The "-xkb-config-root" configure setting is intended to allow manual overriding but it is also broken. See: https://bugreports.qt.io/browse/QTBUG-60005 This has since been fixed upstream, so just hard-code the path for now. We can drop this patch when we bump to a fixed Qt. Also, fix the "-qt-xkbcommon-x11" config param which was renamed. This does not appear to affect build results, presumably because auto-detection is working, but it does not hurt to be explicit. Edit: The hard-coded string matches the value from 0.16 builds, so nothing should be changing. Tree-SHA512: 1d51f9aa050bf38e1f13f4a88f623628e026503891a8a063040dc5e938ba8d60e5fb8c7c2927d15c36f4773bbbb52950b0879fd4a43f3c7c08833f45939989ad
2 parents 1f470a8 + de0b4fb commit df660aa

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

depends/packages/qt.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $(package)_dependencies=openssl zlib
88
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
99
$(package)_build_subdir=qtbase
1010
$(package)_qt_libs=corelib network widgets gui plugins testlib
11-
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch
11+
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch
1212

1313
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
1414
$(package)_qttranslations_sha256_hash=9822084f8e2d2939ba39f4af4c0c2320e45d5996762a9423f833055607604ed8
@@ -83,7 +83,7 @@ $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
8383
$(package)_config_opts_darwin += -device-option MAC_LD64_VERSION=$(LD64_VERSION)
8484
endif
8585

86-
$(package)_config_opts_linux = -qt-xkbcommon
86+
$(package)_config_opts_linux = -qt-xkbcommon-x11
8787
$(package)_config_opts_linux += -qt-xcb
8888
$(package)_config_opts_linux += -system-freetype
8989
$(package)_config_opts_linux += -no-feature-sessionmanager
@@ -137,6 +137,7 @@ define $(package)_preprocess_cmds
137137
patch -p1 -i $($(package)_patch_dir)/fix_configure_mac.patch &&\
138138
patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch &&\
139139
patch -p1 -i $($(package)_patch_dir)/fix_rcc_determinism.patch &&\
140+
patch -p1 -i $($(package)_patch_dir)/xkb-default.patch &&\
140141
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
141142
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
142143
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \

depends/patches/qt/xkb-default.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--- old/qtbase/src/gui/configure.pri 2018-06-06 17:28:10.000000000 -0400
2+
+++ new/qtbase/src/gui/configure.pri 2018-08-17 18:43:01.589384567 -0400
3+
@@ -43,18 +43,11 @@
4+
}
5+
6+
defineTest(qtConfTest_xkbConfigRoot) {
7+
- qtConfTest_getPkgConfigVariable($${1}): return(true)
8+
-
9+
- for (dir, $$list("/usr/share/X11/xkb", "/usr/local/share/X11/xkb")) {
10+
- exists($$dir) {
11+
- $${1}.value = $$dir
12+
- export($${1}.value)
13+
- $${1}.cache += value
14+
- export($${1}.cache)
15+
- return(true)
16+
- }
17+
- }
18+
- return(false)
19+
+ $${1}.value = "/usr/share/X11/xkb"
20+
+ export($${1}.value)
21+
+ $${1}.cache += value
22+
+ export($${1}.cache)
23+
+ return(true)
24+
}
25+
26+
defineTest(qtConfTest_qpaDefaultPlatform) {

0 commit comments

Comments
 (0)