From 9287d6355940ca24ce62bf0e18fcdf83050cf795 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 12 Jul 2022 21:58:21 +0200 Subject: qtwebengine: Fix archiver assignment This qtwebengine GN patch already assigns AR correctly one line above to '--ar \"$$which(ar)\"' , drop the newly added upstream AR assignment as it triggers build failure: " [184/187] CXX tools/gn/target.o [185/187] CXX tools/gn/visual_studio_writer.o [186/187] AR gn_lib.a [187/187] LINK gn FAILED: gn /build/tmp/hosttools/g++ -O3 -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-strip-all -Wl,--as-needed -static-libstdc++ -pthread -o gn -Wl,--start-group tools/gn/gn_main.o base.a gn_lib.a -Wl,--end-group -ldl /build/tmp/hosttools/ld: base.a: error adding symbols: archive has no index; run ranlib to add one collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Project ERROR: GN build error! make[2]: *** [Makefile:98: sub-gn-pro-make_first] Error 3 " MJ: for GN(-native) build we don't want to respect QMAKE_AR, we want ar for host architecture and use $$which(ar) (will will be similar to $$first(BUILD_AR) with BUILD_AR from bitbake.conf) MJ: Refresh other patches to apply on top of this change. MJ: it's not reproducible with qemux86-64 (which I was using to test the last upgrade): martin@jama /OE/build/oe-core/tmp-glibc/work $ ls -lah core2-64-oe-linux/qtwebengine/5.15.10+gitAUTOINC+c7e716ef1f_ecc2bb74f1-r0/build/src/3rdparty/gn/out/Release/base.a cortexa15t2hf-neon-oe-linux-gnueabi/qtwebengine/5.15.10+gitAUTOINC+c7e716ef1f_ecc2bb74f1-r0/build/src/3rdparty/gn/out/Release/base.a -rw-r--r-- 1 martin martin 99K Aug 8 22:01 core2-64-oe-linux/qtwebengine/5.15.10+gitAUTOINC+c7e716ef1f_ecc2bb74f1-r0/build/src/3rdparty/gn/out/Release/base.a -rw-r--r-- 1 martin martin 3.3K Aug 8 21:10 cortexa15t2hf-neon-oe-linux-gnueabi/qtwebengine/5.15.10+gitAUTOINC+c7e716ef1f_ecc2bb74f1-r0/build/src/3rdparty/gn/out/Release/base.a martin@jama /OE/build/oe-core/tmp-glibc/work $ file core2-64-oe-linux/qtwebengine/5.15.10+gitAUTOINC+c7e716ef1f_ecc2bb74f1-r0/build/src/3rdparty/gn/out/Release/base.a cortexa15t2hf-neon-oe-linux-gnueabi/qtwebengine/5.15.10+gitAUTOINC+c7e716ef1f_ecc2bb74f1-r0/build/src/3rdparty/gn/out/Release/base.a core2-64-oe-linux/qtwebengine/5.15.10+gitAUTOINC+c7e716ef1f_ecc2bb74f1-r0/build/src/3rdparty/gn/out/Release/base.a: thin archive with 1168 symbol entries cortexa15t2hf-neon-oe-linux-gnueabi/qtwebengine/5.15.10+gitAUTOINC+c7e716ef1f_ecc2bb74f1-r0/build/src/3rdparty/gn/out/Release/base.a: thin archive with 1650553701 symbol entries The issue is that gn build will use arm-oe-linux-gnueabi-gcc-ar from QMAKE_AR which is correct for target libraries, but in this case it's used for native gn and arm-oe-linux-gnueabi-gcc-ar doesn't support native x86_64 host (while x86_64-oe-linux-gcc-ar used in qemux86-64 builds was fine, because the architecture is compatible): qtwebengine/5.15.10+gitAUTOINC+c7e716ef1f_ecc2bb74f1-r0/build/src/3rdparty/gn/out/Release $ ninja -v gn 2>&1 [1/2] rm -f base.a && /OE/build/oe-core/tmp-glibc/work/cortexa15t2hf-neon-oe-linux-gnueabi/qtwebengine/5.15.10+gitAUTOINC+c7e716ef1f_ecc2bb74f1-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc-ar rcsT base.a base/callback_internal.o base/command_line.o base/environment.o base/files/file.o base/files/file_enumerator.o base/files/file_path.o base/files/file_path_constants.o base/files/file_util.o base/files/scoped_file.o base/files/scoped_temp_dir.o base/json/json_parser.o base/json/json_reader.o base/json/json_writer.o base/json/string_escape.o base/logging.o base/md5.o base/memory/ref_counted.o base/memory/weak_ptr.o base/sha1.o base/strings/string_number_conversions.o base/strings/string_piece.o base/strings/string_split.o base/strings/string_util.o base/strings/string_util_constants.o base/strings/stringprintf.o base/strings/utf_string_conversion_utils.o base/strings/utf_string_conversions.o base/third_party/icu/icu_utf.o base/timer/elapsed_timer.o base/value_iterators.o base/values.o base/files/file_enumerator_posix.o base/files/file_posix.o base/files/file_util_posix.o base/posix/file_descriptor_shuffle.o base/posix/safe_strerror.o base/strings/string16.o [2/2] /OE/build/oe-core/tmp-glibc/hosttools/g++ -O3 -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-strip-all -Wl,--as-needed -static-libstdc++ -pthread -o gn -Wl,--start-group tools/gn/gn_main.o base.a gn_lib.a -Wl,--end-group -ldl FAILED: gn /OE/build/oe-core/tmp-glibc/hosttools/g++ -O3 -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-strip-all -Wl,--as-needed -static-libstdc++ -pthread -o gn -Wl,--start-group tools/gn/gn_main.o base.a gn_lib.a -Wl,--end-group -ldl /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: base.a: error adding symbols: archive has no index; run ranlib to add one collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. $ arm-oe-linux-gnueabi-gcc-ar --help | grep supported.targets recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/12.1.0/ar: supported targets: elf32-littlearm elf32-littlearm-fdpic elf32-bigarm elf32-bigarm-fdpic elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin $ ar --help | grep supported.targets ar: supported targets: elf64-x86-64 elf32-i386 elf32-iamcu elf32-x86-64 pei-i386 pe-x86-64 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin It would be better to force gn build to respect BUILD_AR = "${BUILD_PREFIX}ar" instead of "$$which(ar)" here or better just using separate gn-native recipe like meta-browser does since: https://github.com/OSSystems/meta-browser/commit/c5ff301787ef76eec57ca500ec9d1ccf0f74b488 but meta-qt5 is dead-end and I don't care enough to fix this. Signed-off-by: Marek Vasut Signed-off-by: Martin Jansa --- .../0001-configure.json-remove-python2-dependency.patch | 2 +- .../0002-gn.pro-do-not-try-to-statically-link-stdc.patch | 6 +++--- recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch | 6 +++--- recipes-qt/qt5/qtpdf_git.bb | 6 +++--- .../0001-Force-host-toolchain-configuration.patch | 13 +++++++------ .../0002-qmake.conf-lower-MODULE_VERSION-to-5.15.4.patch | 2 +- ...sl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch | 2 +- .../qtwebengine/0004-musl-link-against-libexecinfo.patch | 2 +- .../0005-mkspecs-Allow-builds-with-libc-glibc.patch | 2 +- recipes-qt/qt5/qtwebengine_git.bb | 4 ++-- 10 files changed, 23 insertions(+), 22 deletions(-) diff --git a/recipes-qt/qt5/qtpdf/0001-configure.json-remove-python2-dependency.patch b/recipes-qt/qt5/qtpdf/0001-configure.json-remove-python2-dependency.patch index 82013943..5e88e578 100644 --- a/recipes-qt/qt5/qtpdf/0001-configure.json-remove-python2-dependency.patch +++ b/recipes-qt/qt5/qtpdf/0001-configure.json-remove-python2-dependency.patch @@ -1,4 +1,4 @@ -From 492221e627937ef0063a9da125a6aef847eebcef Mon Sep 17 00:00:00 2001 +From 8214eac226762702f5a652a07f3b15d60cd09c98 Mon Sep 17 00:00:00 2001 From: Leif Middelschulte Date: Tue, 8 Feb 2022 14:14:02 +0100 Subject: [PATCH] configure.json: remove python2 dependency diff --git a/recipes-qt/qt5/qtpdf/0002-gn.pro-do-not-try-to-statically-link-stdc.patch b/recipes-qt/qt5/qtpdf/0002-gn.pro-do-not-try-to-statically-link-stdc.patch index ae033d92..920d1f35 100644 --- a/recipes-qt/qt5/qtpdf/0002-gn.pro-do-not-try-to-statically-link-stdc.patch +++ b/recipes-qt/qt5/qtpdf/0002-gn.pro-do-not-try-to-statically-link-stdc.patch @@ -1,4 +1,4 @@ -From 38a26f8fa1fba94c621e2eeb2428d47a4640e6fa Mon Sep 17 00:00:00 2001 +From f98019bb6712fdfa1f3387baefe6b604e6191a88 Mon Sep 17 00:00:00 2001 From: Leif Middelschulte Date: Tue, 8 Feb 2022 16:28:14 +0100 Subject: [PATCH] gn.pro: do not try to statically link stdc++ @@ -8,7 +8,7 @@ Subject: [PATCH] gn.pro: do not try to statically link stdc++ 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro -index 5094574ed..7b8365157 100644 +index a8ca6567b..9632f0ef7 100644 --- a/src/buildtools/gn.pro +++ b/src/buildtools/gn.pro @@ -20,7 +20,8 @@ build_pass|!debug_and_release { @@ -18,6 +18,6 @@ index 5094574ed..7b8365157 100644 - --ld \"$$which($$CXX_host)\" --ar \"$$which(ar)\" + --ld \"$$which($$CXX_host)\" --ar \"$$which(ar)\" \ + --no-static-libstdc++ - !isEmpty(QMAKE_AR): gn_gen_args += --ar \"$$which($$first(QMAKE_AR))\" msvc:!clang_cl: gn_gen_args += --use-lto + diff --git a/recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch b/recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch index ea5e828c..f5efddd4 100644 --- a/recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch +++ b/recipes-qt/qt5/qtpdf/0003-Fix-build-with-clang.patch @@ -1,4 +1,4 @@ -From a769d4c4cab7168d5e92b28790cf383985e5c177 Mon Sep 17 00:00:00 2001 +From b9ebaa970dbb050a51021a013e8d5b6d5aac86ab Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 26 Feb 2022 18:15:28 -0800 Subject: [PATCH] Fix build with clang @@ -25,7 +25,7 @@ Signed-off-by: Martin Jansa 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro -index 7b8365157..51574e0fd 100644 +index 9632f0ef7..da85f8a26 100644 --- a/src/buildtools/gn.pro +++ b/src/buildtools/gn.pro @@ -20,7 +20,7 @@ build_pass|!debug_and_release { @@ -35,5 +35,5 @@ index 7b8365157..51574e0fd 100644 - --ld \"$$which($$CXX_host)\" --ar \"$$which(ar)\" \ + --ld \"$$which($$CXX_host) -rtlib=libgcc -unwindlib=libgcc\" --ar \"$$which(ar)\" \ --no-static-libstdc++ - !isEmpty(QMAKE_AR): gn_gen_args += --ar \"$$which($$first(QMAKE_AR))\" + msvc:!clang_cl: gn_gen_args += --use-lto diff --git a/recipes-qt/qt5/qtpdf_git.bb b/recipes-qt/qt5/qtpdf_git.bb index 5aa947dc..dd77bc66 100644 --- a/recipes-qt/qt5/qtpdf_git.bb +++ b/recipes-qt/qt5/qtpdf_git.bb @@ -137,14 +137,14 @@ QT_MODULE = "qtwebengine" FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtwebengine:" # Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.15-glibc -# 5.15-glibc.meta-qt5.14 +# 5.15-glibc.meta-qt5.15 SRC_URI += " \ ${QT_GIT}/qtwebengine-chromium.git;name=chromium;branch=${QT_MODULE_BRANCH_CHROMIUM};protocol=${QT_GIT_PROTOCOL};destsuffix=git/src/3rdparty \ file://0001-Force-host-toolchain-configuration.patch \ file://0002-qmake.conf-lower-MODULE_VERSION-to-5.15.4.patch \ " # Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.15 -# 5.15.meta-qt5.14 +# 5.15.meta-qt5.15 SRC_URI:append:libc-musl = "\ file://0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch \ file://0004-musl-link-against-libexecinfo.patch \ @@ -203,7 +203,7 @@ INSANE_SKIP:${PN} += "textrel" # First patch skips "python2" dependency checks for the pdf module # Second patch repairs a failing build of the `gn` buildtool due to missing (host) libstdc++ # Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.15-qtpdf -# 5.15-qtpdf.meta-qt5.1 +# 5.15-qtpdf.meta-qt5.2 SRC_URI += " \ file://0001-configure.json-remove-python2-dependency.patch \ file://0002-gn.pro-do-not-try-to-statically-link-stdc.patch \ diff --git a/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch b/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch index c6d7a0f5..cec6c56a 100644 --- a/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch +++ b/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch @@ -1,4 +1,4 @@ -From 02ebd5b50c208f913213c3da32ed820fa420d8fe Mon Sep 17 00:00:00 2001 +From bae24edf61de8e374a43b7eede7be8c90a2a32e5 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 15 Mar 2017 13:53:28 +0200 Subject: [PATCH] Force host toolchain configuration @@ -15,8 +15,8 @@ Signed-off-by: Samuli Piippo --- src/buildtools/config/linux.pri | 2 +- src/buildtools/configure_host.pro | 14 +++++++------- - src/buildtools/gn.pro | 4 ++-- - 3 files changed, 10 insertions(+), 10 deletions(-) + src/buildtools/gn.pro | 5 ++--- + 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/buildtools/config/linux.pri b/src/buildtools/config/linux.pri index 7507d51ef..1e078cbfe 100644 @@ -71,17 +71,18 @@ index dd0d3e327..6312c8678 100644 " nm = \"$$which(nm)\" " \ " toolchain_args = { " \ diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro -index f94694da0..5094574ed 100644 +index f94694da0..a8ca6567b 100644 --- a/src/buildtools/gn.pro +++ b/src/buildtools/gn.pro -@@ -19,8 +19,8 @@ build_pass|!debug_and_release { +@@ -19,9 +19,8 @@ build_pass|!debug_and_release { gn_bootstrap = $$system_path($$absolute_path(gn/build/gen.py, $$src_3rd_party_dir)) gn_gen_args = --no-last-commit-position --out-path $$out_path \ - --cc \"$$which($$QMAKE_CC)\" --cxx \"$$which($$QMAKE_CXX)\" \ - --ld \"$$which($$QMAKE_LINK)\" +- !isEmpty(QMAKE_AR): gn_gen_args += --ar \"$$which($$first(QMAKE_AR))\" + --cc \"$$which($$CC_host)\" --cxx \"$$which($$CXX_host)\" \ + --ld \"$$which($$CXX_host)\" --ar \"$$which(ar)\" - !isEmpty(QMAKE_AR): gn_gen_args += --ar \"$$which($$first(QMAKE_AR))\" msvc:!clang_cl: gn_gen_args += --use-lto + diff --git a/recipes-qt/qt5/qtwebengine/0002-qmake.conf-lower-MODULE_VERSION-to-5.15.4.patch b/recipes-qt/qt5/qtwebengine/0002-qmake.conf-lower-MODULE_VERSION-to-5.15.4.patch index 71e0eb67..48ed82e2 100644 --- a/recipes-qt/qt5/qtwebengine/0002-qmake.conf-lower-MODULE_VERSION-to-5.15.4.patch +++ b/recipes-qt/qt5/qtwebengine/0002-qmake.conf-lower-MODULE_VERSION-to-5.15.4.patch @@ -1,4 +1,4 @@ -From f080d8b761542c942a3ab33a3895c9af7a0ee02a Mon Sep 17 00:00:00 2001 +From 8031326dbf1252f76f6aac9dcef5611fd7be5fa4 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 12 Mar 2021 15:47:50 +0100 Subject: [PATCH] qmake.conf: lower MODULE_VERSION to 5.15.4 diff --git a/recipes-qt/qt5/qtwebengine/0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch b/recipes-qt/qt5/qtwebengine/0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch index 1d6fc361..5a642486 100644 --- a/recipes-qt/qt5/qtwebengine/0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch +++ b/recipes-qt/qt5/qtwebengine/0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch @@ -1,4 +1,4 @@ -From fda9bebb5f3a0483ac6188c144ae5a135c6baa41 Mon Sep 17 00:00:00 2001 +From b136b5999396d4ee3363bfdaee4db7e571ba9aa7 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 12 Dec 2017 16:06:14 +0200 Subject: [PATCH] musl: don't use pvalloc as it's not available on musl diff --git a/recipes-qt/qt5/qtwebengine/0004-musl-link-against-libexecinfo.patch b/recipes-qt/qt5/qtwebengine/0004-musl-link-against-libexecinfo.patch index a5e66d23..0d4924ea 100644 --- a/recipes-qt/qt5/qtwebengine/0004-musl-link-against-libexecinfo.patch +++ b/recipes-qt/qt5/qtwebengine/0004-musl-link-against-libexecinfo.patch @@ -1,4 +1,4 @@ -From d0170d2466659ce467075313cb08dc72268b0d0b Mon Sep 17 00:00:00 2001 +From 9046f8a87da16f3605f600cc6beb039f40bdaa14 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 14 Dec 2017 11:28:10 +0200 Subject: [PATCH] musl: link against libexecinfo diff --git a/recipes-qt/qt5/qtwebengine/0005-mkspecs-Allow-builds-with-libc-glibc.patch b/recipes-qt/qt5/qtwebengine/0005-mkspecs-Allow-builds-with-libc-glibc.patch index a233d0a9..2e58b43e 100644 --- a/recipes-qt/qt5/qtwebengine/0005-mkspecs-Allow-builds-with-libc-glibc.patch +++ b/recipes-qt/qt5/qtwebengine/0005-mkspecs-Allow-builds-with-libc-glibc.patch @@ -1,4 +1,4 @@ -From 841a332c97a579db001deb07191349263138013f Mon Sep 17 00:00:00 2001 +From 0ffba1b9cba1421c3751b2f20ba84fca356911fb Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 12 Nov 2019 19:53:59 -0800 Subject: [PATCH] mkspecs: Allow builds with libc != glibc diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb index ab3e1204..5587ede1 100644 --- a/recipes-qt/qt5/qtwebengine_git.bb +++ b/recipes-qt/qt5/qtwebengine_git.bb @@ -152,14 +152,14 @@ QT_MODULE_BRANCH = "5.15.10" PV = "5.15.10+git${SRCPV}" # Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.15-glibc -# 5.15-glibc.meta-qt5.14 +# 5.15-glibc.meta-qt5.15 SRC_URI += " \ ${QT_GIT}/qtwebengine-chromium.git;name=chromium;branch=${QT_MODULE_BRANCH_CHROMIUM};protocol=${QT_GIT_PROTOCOL};destsuffix=git/src/3rdparty \ file://0001-Force-host-toolchain-configuration.patch \ file://0002-qmake.conf-lower-MODULE_VERSION-to-5.15.4.patch \ " # Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.15 -# 5.15.meta-qt5.14 +# 5.15.meta-qt5.15 SRC_URI:append:libc-musl = "\ file://0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch \ file://0004-musl-link-against-libexecinfo.patch \ -- cgit v1.2.3