[Buildroot] [PATCH 1/1] package/qt5/qt5base: disable broken qmake sysrootify
Peter Seiderer
ps.report at gmx.net
Sat Jan 15 22:37:36 UTC 2022
Hello James, *,
On Wed, 12 Jan 2022 13:39:39 -0700, James Hilliard <james.hilliard1 at gmail.com> wrote:
> 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.
>
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
> ---
> package/qt5/qt5base/qt.conf.in | 18 +++++++++++++++---
> package/qt5/qt5base/qt5base.mk | 2 ++
> 2 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/package/qt5/qt5base/qt.conf.in b/package/qt5/qt5base/qt.conf.in
> index 2215cbd4e1..db9ab0c364 100644
> --- a/package/qt5/qt5base/qt.conf.in
> +++ b/package/qt5/qt5base/qt.conf.in
> @@ -2,6 +2,18 @@
> 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
> +Data=@@STAGING_DIR@@
> +Translations=@@STAGING_DIR@@/translations
> +ArchData=@@STAGING_DIR@@/usr
> +LibraryExecutables=@@STAGING_DIR@@/usr/libexec
> +Imports=@@STAGING_DIR@@/usr/imports
> +Qml2Imports=@@STAGING_DIR@@/usr/qml
> +HostBinaries=@@HOST_DIR@@/bin
> +HostLibraries=@@HOST_DIR@@/lib
> +HostData=@@STAGING_DIR@@
> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> index bcdf036f00..6c05e710d8 100644
> --- a/package/qt5/qt5base/qt5base.mk
> +++ b/package/qt5/qt5base/qt5base.mk
> @@ -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 \
This one leads to the following compile failure for qt5webengine-5.15.2:
.../host/lib/gcc/arm-buildroot-linux-gnueabihf/10.3.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
But the file crti.o exists:
$ find . -name crti.o
./build/glibc-2.34-9-g9acab0bba6a5a57323b1f94bf95b21618a9e5aa4/build/csu/crti.o
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/crti.o
Did not (yet) test with your latest (v2) patch iteration...
Compile with qt5webengine bump to 5.15.8-lts fails already before the linking stage
(see secoidt.h/pk11pub.h No such file or directory failure reported by already by
Thomas)...
Regards,
Peter
More information about the buildroot
mailing list