package/qt5/qt5base: disable broken qmake sysrootify
PATCH v3 1/1 package/qt5/qt5base: disable broken qmake sysrootify
Currently the qmake gcc sysrootify path logic causes issues with per-package directories, disable automatic gcc sysroot for qt5base install and override all qt.conf paths manually to point to their correct locations.
Redirect HostData to STAGING_DIR as mkspecs need to be available there instead of the HOST_DIR for cross compilation to work.
Also set qmake target pkg-config path for qt5webengine.
This fixes some build errors with per-package directories such as:/home/buildroot/buildroot/output/per-package/qt5base/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-buildroot-linux-gnu/10.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:
cannot find /lib64/libc.so.6 /home/buildroot/buildroot/output/per-package/qt5base/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-buildroot-linux-gnu/10.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:
cannot find /usr/lib64/libc_nonshared.a /home/buildroot/buildroot/output/per-package/qt5base/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-buildroot-linux-gnu/10.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld:
cannot find /lib/ld-linux-aarch64.so.1
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:122: ../../lib/libQt5Svg.so.5.15.2] Error 1
make[3]: *** [Makefile:48: sub-svg-make_first-ordered] Error 2
make[2]: *** [Makefile:49: sub-src-make_first] Error 2
make[1]: *** [package/pkg-generic.mk:295:/home/buildroot/buildroot/output/build/qt5svg-5.15.2/.stamp_built]
Error 2
---
Changes v2 -> v3:
- set target pkg-config path
Changes v1 -> v2:
- add some missing overrides to qt.conf.in
--- package/qt5/qt5base/qmake.conf.in | 4 ++++ package/qt5/qt5base/qt.conf.in | 21 ++++++++++++++++++--- package/qt5/qt5base/qt5base.mk | 2 ++ 3 files changed, 24 insertions(+), 3 deletions(-)
package/qt5/qt5base/qmake.conf.in +4 -0
@@ -8,6 +8,10 @@ include(../common/linux_device_pre.conf) +# set up pkg-config +QMAKE_PKG_CONFIG = $$[QT_HOST_PREFIX]/bin/pkg-config +QMAKE_PKGCONFIG_PREFIX = /usr + # modifications to g++-unix.conf QMAKE_CC = $${CROSS_COMPILE}gcc QMAKE_CXX = $${CROSS_COMPILE}g++
package/qt5/qt5base/qt.conf.in +18 -3
@@ -2,6 +2,21 @@ Prefix=/usr HostPrefix=@@HOST_DIR@@ Sysroot=@@STAGING_DIR@@ -Headers=/usr/include/qt5 -Plugins=/usr/lib/qt/plugins -Examples=/usr/lib/qt/examples +SysrootifyPrefix=false +Binaries=@@STAGING_DIR@@/usr/bin +Libraries=@@STAGING_DIR@@/usr/lib +Headers=@@STAGING_DIR@@/usr/include/qt5 +Plugins=@@STAGING_DIR@@/usr/lib/qt/plugins +Examples=@@STAGING_DIR@@/usr/lib/qt/examples +Tests=@@STAGING_DIR@@/usr/lib/qt/tests +Data=@@STAGING_DIR@@ +Translations=@@STAGING_DIR@@/translations +Documentation=@@STAGING_DIR@@/doc +ArchData=@@STAGING_DIR@@/usr +LibraryExecutables=@@STAGING_DIR@@/usr/libexec +Imports=@@STAGING_DIR@@/usr/imports +Qml2Imports=@@STAGING_DIR@@/usr/qml +Settings=@@STAGING_DIR@@/etc +HostBinaries=@@HOST_DIR@@/bin +HostLibraries=@@HOST_DIR@@/lib +HostData=@@STAGING_DIR@@
package/qt5/qt5base/qt5base.mk +2 -0
@@ -311,8 +311,10 @@ define QT5BASE_CONFIGURE_CMDS -v \ -prefix /usr \ -hostprefix $(HOST_DIR) \ + -hostdatadir $(STAGING_DIR) \ -headerdir /usr/include/qt5 \ -sysroot $(STAGING_DIR) \ + -no-gcc-sysroot \ -plugindir /usr/lib/qt/plugins \ -examplesdir /usr/lib/qt/examples \ -no-rpath \
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot