package/qt5/qt5base: disable broken qmake sysrootify
PATCH 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.
--- package/qt5/qt5base/qt.conf.in | 18 +++++++++++++++--- package/qt5/qt5base/qt5base.mk | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-)
package/qt5/qt5base/qt.conf.in +15 -3
@@ -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@@
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
Hello James,
Quoted 5 lines · On Wed, 12 Jan 2022 13:39:39 -0700 James Hilliard <[email protected]>…
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.
Quoted 8 lines
Redirect HostData to
STAGING_DIRas mkspecs need to be available there instead of theHOST_DIRfor cross compilation to work.Signed-off-by James Hilliard <[email protected]>--- package/qt5/qt5base/qt.conf.in | 18 +++++++++++++++--- package/qt5/qt5base/qt5base.mk | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-)
Do you have a bit more details on what this changing, i.e how this is making things better?
I have no doubt that it can make things better, but it would be useful in the commit log to have extra details on what specific details/aspects it is fixing/improving.
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 20 lines · Thomas Petazzoni
Hello James,
Quoted 5 lines · On Wed, 12 Jan 2022 13:39:39 -0700 James Hilliard <[email protected]>…
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.
Quoted 8 lines
Redirect HostData to
STAGING_DIRas mkspecs need to be available there instead of theHOST_DIRfor cross compilation to work.Signed-off-by James Hilliard <[email protected]>--- package/qt5/qt5base/qt.conf.in | 18 +++++++++++++++--- package/qt5/qt5base/qt5base.mk | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-)
Quoted 6 lines
Do you have a bit more details on what this changing, i.e how this is making things better?
I have no doubt that it can make things better, but it would be useful in the commit log to have extra details on what specific details/aspects it is fixing/improving.
Well it seems to prevent invalid paths causing these errors:/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
Quoted 8 lines
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello James, *,
Quoted 45 lines · James Hilliard
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_DIRas mkspecs need to be available there instead of theHOST_DIRfor cross compilation to work.Signed-off-by James Hilliard <[email protected]>--- package/qt5/qt5base/qt.conf.in | 18 +++++++++++++++--- package/qt5/qt5base/qt5base.mk | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-)package/qt5/qt5base/qt.conf.in +15
-3@@ -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@@package/qt5/qt5base/qt5base.mk +0
-0
package/qt5/qt5base/qt5base.mk define QT5BASE_CONFIGURE_CMDS · line 320
Quoted 10 lines
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 \
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
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 63 lines · Peter Seiderer
Hello James, *,
Quoted 45 lines · James Hilliard
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_DIRas mkspecs need to be available there instead of theHOST_DIRfor cross compilation to work.Signed-off-by James Hilliard <[email protected]>--- package/qt5/qt5base/qt.conf.in | 18 +++++++++++++++--- package/qt5/qt5base/qt5base.mk | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-)package/qt5/qt5base/qt.conf.in +15
-3@@ -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@@package/qt5/qt5base/qt5base.mk +0
-0package/qt5/qt5base/qt5base.mk define QT5BASE_CONFIGURE_CMDS · line 320
Quoted 10 lines
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 \This one leads to the following compile failure for qt5webengine-5.15.2:
Quoted 2 lines
.../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
Hmm, I'll test that again.
Quoted 9 lines
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
Quoted 5 lines
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.hNo such file or directory failure reported by already by Thomas)...
Does qt5webengine build ok without per-package directories with just the KDE bump
for all the other qt5 packages?:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
I separated that out to make it easier to isolate the linker issues with the qt5webengine
5.15.8-lts build.
Quoted 3 lines
Regards,
Peter
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 63 lines · Peter Seiderer
Hello James, *,
Quoted 45 lines · James Hilliard
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_DIRas mkspecs need to be available there instead of theHOST_DIRfor cross compilation to work.Signed-off-by James Hilliard <[email protected]>--- package/qt5/qt5base/qt.conf.in | 18 +++++++++++++++--- package/qt5/qt5base/qt5base.mk | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-)package/qt5/qt5base/qt.conf.in +15
-3@@ -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@@package/qt5/qt5base/qt5base.mk +0
-0package/qt5/qt5base/qt5base.mk define QT5BASE_CONFIGURE_CMDS · line 320
Quoted 10 lines
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 \This one leads to the following compile failure for qt5webengine-5.15.2:
Quoted 2 lines
.../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
So I was able to reproduce this error, however best I can tell it's probably not a regression
as the compilation still fails due to a different error without this patch:
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned
non-zero exit code.
pkgresult = exec_script(pkg_config_script, args, "value")
^----------
Current dir: /home/buildroot/buildroot/output/build/qt5webengine-5.15.2/src/core/release/
Command: /home/buildroot/buildroot/output/host/bin/python2 /home/buildroot/buildroot/output/build/qt5webengine-5.15.2/src/3rdparty/chromium/build/config/linux/pkg-config.py -p /home/buildroot/buildroot/output/build/qt5webengine-5.15.2/host-bin/host-pkg-config
libjpeg
Returned 1.
stderr:
Package libjpeg was not found in the pkg-config search path. Perhaps you should add the directory containing `libjpeg.pc' to the PKG_CONFIG_PATH environment variable Package 'libjpeg', required by 'virtual:world', not found Could not run pkg-config.
See //third_party/BUILD.gn:17:3: whence it was called.
pkg_config("system_libjpeg") { ^-----------------------------
See //third_party/blink/renderer/platform/BUILD.gn:159:5: which caused the file to be included.
"//third_party:jpeg",
^-------------------Project ERROR: GN run error!
Quoted 9 lines
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
Quoted 8 lines
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.hNo such file or directory failure reported by already by Thomas)...Regards,
Peter
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello James,
Quoted 64 lines · James Hilliard
Quoted 63 lines · Peter Seiderer
Hello James, *,
Quoted 45 lines · James Hilliard
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_DIRas mkspecs need to be available there instead of theHOST_DIRfor cross compilation to work.Signed-off-by James Hilliard <[email protected]>--- package/qt5/qt5base/qt.conf.in | 18 +++++++++++++++--- package/qt5/qt5base/qt5base.mk | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-)package/qt5/qt5base/qt.conf.in +15
-3@@ -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@@package/qt5/qt5base/qt5base.mk +0
-0package/qt5/qt5base/qt5base.mk define QT5BASE_CONFIGURE_CMDS · line 320
Quoted 10 lines
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 \This one leads to the following compile failure for qt5webengine-5.15.2:
Quoted 5 lines
Quoted 2 lines
.../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 statusSo I was able to reproduce this error, however best I can tell it's probably not a regression
This is a known failure, see the patches adding host-freetype/host-libjepeg/host-harfbuzz ([1]) or your own qt5webengine bump adding host-freetype dependency ([2])...
Additional the SIGSTKSZ fix is needed...
Regards,
Peter
[1] http://lists.busybox.net/pipermail/buildroot/2022-January/634005.html
[2] http://lists.busybox.net/pipermail/buildroot/2022-January/633439.html
Quoted 44 lines
as the compilation still fails due to a different error without this patch:
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned
non-zero exit code.
pkgresult =exec_script(pkg_config_script, args, "value")
^----------
Current dir:/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/src/core/release/
Command:/home/buildroot/buildroot/output/host/bin/python2/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/src/3rdparty/chromium/build/config/linux/pkg-config.py-p/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/host-bin/host-pkg-config
libjpeg
Returned 1.
stderr:Package libjpeg was not found in the pkg-config search path. Perhaps you should add the directory containing `libjpeg.pc' to the
PKG_CONFIG_PATHenvironment variable Package 'libjpeg', required by 'virtual:world', not found Could not run pkg-config.See //third_party/BUILD.gn:17:3: whence it was called.
pkg_config("system_libjpeg"){ ^-----------------------------
See //third_party/blink/renderer/platform/BUILD.gn:159:5: which caused the file to be included."//third_party:jpeg", ^-------------------Project ERROR: GN run error!
Quoted 15 lines
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.oDid 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.hNo such file or directory failure reported by already by Thomas)...
Quoted 6 lines
Quoted 2 lines
Regards,
Peter_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 69 lines · Peter Seiderer
Hello James,
Quoted 64 lines · James Hilliard
Quoted 63 lines · Peter Seiderer
Hello James, *,
Quoted 45 lines · James Hilliard
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_DIRas mkspecs need to be available there instead of theHOST_DIRfor cross compilation to work.Signed-off-by James Hilliard <[email protected]>--- package/qt5/qt5base/qt.conf.in | 18 +++++++++++++++--- package/qt5/qt5base/qt5base.mk | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-)package/qt5/qt5base/qt.conf.in +15
-3@@ -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@@package/qt5/qt5base/qt5base.mk +0
-0package/qt5/qt5base/qt5base.mk define QT5BASE_CONFIGURE_CMDS · line 320
Quoted 10 lines
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 \This one leads to the following compile failure for qt5webengine-5.15.2:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
.../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 statusSo I was able to reproduce this error, however best I can tell it's probably not a regression
This is a known failure, see the patches adding host-freetype/host-libjepeg/host-harfbuzz ([1]) or your own qt5webengine bump adding host-freetype dependency ([2])...
So there's a major pkg-config bug here, I partially fixed it here but it seems gn
is mangling some of the paths after getting them from pkg-config:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
This gets the target pkg-config paths set up right at least output/build/qt5webengine-5.15.2/src/core/release/args.gn:pkg_config = "/home/buildroot/buildroot/output/host/bin/pkg-config" host_pkg_config = "/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/host-bin/host-pkg-config"
However gn I think is prepending the target_sysroot to the include paths or something:target_sysroot =
"/home/buildroot/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot"
which causes this error:/home/buildroot/buildroot/output/host/bin/aarch64-linux-g++ -MMD -MF
obj/crypto/crypto/nss_util.o.d -DCRYPTO_IMPLEMENTATION -DUSE_UDEV
-DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD
-DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS
-DCR_SYSROOT_HASH=2cade9ee1ca9186b28ac768c19e1ab7c45ee0600 -DNDEBUG
-DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen
-I../../3rdparty/chromium
-I../../3rdparty/chromium/third_party/boringssl/src/include
-fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector
-fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe
-pthread -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
-Wno-unused-local-typedefs -Wno-maybe-uninitialized
-Wno-deprecated-declarations -fno-delete-null-pointer-checks
-Wno-comments -Wno-packed-not-aligned -Wno-dangling-else
-Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident
-fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0
-fvisibility=hidden -I/home/buildroot/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/home/buildroot/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/include/nss -I/home/buildroot/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/home/buildroot/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/include/nspr -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -Wno-attributes
-Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof
-Wno-return-type -Wno-deprecated-copy -fno-exceptions -fno-rtti
--sysroot=../../../../../host/aarch64-buildroot-linux-gnu/sysroot
-fvisibility-inlines-hidden -c
../../3rdparty/chromium/crypto/nss_util.cc -oobj/crypto/crypto/nss_util.o
../../3rdparty/chromium/crypto/nss_util.cc:8:10: fatal error:pk11pub.h: No such file or directory
8 | #include <pk11pub.h>
| ^~~~~~~~~~~The include path being set by gn doesn't exist, although it's at least
trying to use the
target variant now:/home/buildroot/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/home/buildroot/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/include/nss
Quoted 2 lines
Additional the SIGSTKSZ fix is needed...
Yeah, on newer glibc's it's needed.
Quoted 59 lines
Regards,
Peter[1] http://lists.busybox.net/pipermail/buildroot/2022-January/634005.html
[2] http://lists.busybox.net/pipermail/buildroot/2022-January/633439.htmlQuoted 50 lines
as the compilation still fails due to a different error without this patch:
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned
non-zero exit code.
pkgresult =exec_script(pkg_config_script, args, "value")
^----------
Current dir:/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/src/core/release/
Command:/home/buildroot/buildroot/output/host/bin/python2/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/src/3rdparty/chromium/build/config/linux/pkg-config.py-p/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/host-bin/host-pkg-config
libjpeg
Returned 1.
stderr:Package libjpeg was not found in the pkg-config search path. Perhaps you should add the directory containing `libjpeg.pc' to the
PKG_CONFIG_PATHenvironment variable Package 'libjpeg', required by 'virtual:world', not found Could not run pkg-config.See //third_party/BUILD.gn:17:3: whence it was called.
pkg_config("system_libjpeg"){ ^-----------------------------
See //third_party/blink/renderer/platform/BUILD.gn:159:5: which caused the file to be included."//third_party:jpeg", ^-------------------Project ERROR: GN run error!
Quoted 9 lines
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.oQuoted 8 lines
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.hNo such file or directory failure reported by already by Thomas)...Regards,
Peter_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 127 lines · James Hilliard
Quoted 69 lines · Peter Seiderer
Hello James,
Quoted 64 lines · James Hilliard
Quoted 63 lines · Peter Seiderer
Hello James, *,
Quoted 45 lines · James Hilliard
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_DIRas mkspecs need to be available there instead of theHOST_DIRfor cross compilation to work.Signed-off-by James Hilliard <[email protected]>--- package/qt5/qt5base/qt.conf.in | 18 +++++++++++++++--- package/qt5/qt5base/qt5base.mk | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-)package/qt5/qt5base/qt.conf.in +15
-3@@ -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@@package/qt5/qt5base/qt5base.mk +0
-0package/qt5/qt5base/qt5base.mk define QT5BASE_CONFIGURE_CMDS · line 320
Quoted 10 lines
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 \This one leads to the following compile failure for qt5webengine-5.15.2:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
.../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 statusSo I was able to reproduce this error, however best I can tell it's probably not a regression
This is a known failure, see the patches adding host-freetype/host-libjepeg/host-harfbuzz ([1]) or your own qt5webengine bump adding host-freetype dependency ([2])...
So there's a major pkg-config bug here, I partially fixed it here but it seems gn
is mangling some of the paths after getting them from pkg-config:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/This gets the target pkg-config paths set up right at least output/build/qt5webengine-5.15.2/src/core/release/args.gn:
pkg_config= "/home/buildroot/buildroot/output/host/bin/pkg-config"host_pkg_config= "/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/host-bin/host-pkg-config"However gn I think is prepending the
target_sysrootto the include paths or something:target_sysroot=
"/home/buildroot/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot"which causes this error:
/home/buildroot/buildroot/output/host/bin/aarch64-linux-g++-MMD -MF obj/crypto/crypto/nss_util.o.d -DCRYPTO_IMPLEMENTATION -DUSE_UDEV(quoted diff) +0
-24-DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=2cade9ee1ca9186b28ac768c19e1ab7c45ee0600 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../3rdparty/chromium -I../../3rdparty/chromium/third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -I/home/buildroot/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/home/buildroot/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/include/nss -I/home/buildroot/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/home/buildroot/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/include/nspr -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -fno-exceptions -fno-rtti --sysroot=../../../../../host/aarch64-buildroot-linux-gnu/sysroot -fvisibility-inlines-hidden -c../../3rdparty/chromium/crypto/nss_util.cc -o
obj/crypto/crypto/nss_util.o../../3rdparty/chromium/crypto/nss_util.cc:8:10: fatal error:pk11pub.h: No such file or directory
Quoted 7 lines
8 | #include <pk11pub.h> | ^~~~~~~~~~~The include path being set by gn doesn't exist, although it's at least
trying to use the
target variant now:/home/buildroot/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/home/buildroot/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/include/nss
Hmm, so I think I found a way to get that to not happen by setting PKG_CONFIG_SYSROOT_DIR="/":
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
Quoted 65 lines
Quoted 3 lines
Additional the SIGSTKSZ fix is needed...
Yeah, on newer glibc's it's needed.
Quoted 59 lines
Regards,
Peter[1] http://lists.busybox.net/pipermail/buildroot/2022-January/634005.html
[2] http://lists.busybox.net/pipermail/buildroot/2022-January/633439.htmlQuoted 50 lines
as the compilation still fails due to a different error without this patch:
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned
non-zero exit code.
pkgresult =exec_script(pkg_config_script, args, "value")
^----------
Current dir:/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/src/core/release/
Command:/home/buildroot/buildroot/output/host/bin/python2/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/src/3rdparty/chromium/build/config/linux/pkg-config.py-p/home/buildroot/buildroot/output/build/qt5webengine-5.15.2/host-bin/host-pkg-config
libjpeg
Returned 1.
stderr:Package libjpeg was not found in the pkg-config search path. Perhaps you should add the directory containing `libjpeg.pc' to the
PKG_CONFIG_PATHenvironment variable Package 'libjpeg', required by 'virtual:world', not found Could not run pkg-config.See //third_party/BUILD.gn:17:3: whence it was called.
pkg_config("system_libjpeg"){ ^-----------------------------
See //third_party/blink/renderer/platform/BUILD.gn:159:5: which caused the file to be included."//third_party:jpeg", ^-------------------Project ERROR: GN run error!
Quoted 9 lines
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.oQuoted 8 lines
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.hNo such file or directory failure reported by already by Thomas)...Regards,
Peter_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot