Message ID | 20190730115832.21008-1-b.bilas@grinn-global.com |
---|---|
State | Changes Requested |
Headers | show |
Series | package/qt5/qt5webengine: fix build error | expand |
Hello Bartosz, Thanks for your patch, see below for some questions. On Tue, 30 Jul 2019 13:58:32 +0200 Bartosz Bilas <b.bilas@grinn-global.com> wrote: > This commit adds a patch from upstream chromium > and bumps required minimal gcc version to 8. > > Fixes: > ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: > note: in definition of macro 'NS' > #define NS(id) id > ^~ > > Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com> Do we have any corresponding build failure in the autobuilders ? If so, we like to have a reference to such build failures. Also, why is the required gcc version now >= 8.x ? This is not really explained in your commit log. Thomas
Hi Thomas, I haven't found anything except this one: https://patchwork.ozlabs.org/comment/2079425/ . I've been struggling with it during developing one of my projects. According to the GCC version, I've encountered another error while I was building this package when gcc version was lower than 8. I'll do a clean build one more time with gcc 4.8 to show exactly what the problem is. Best Bartek On 30.07.2019 16:03, Thomas Petazzoni wrote: > Hello Bartosz, > > Thanks for your patch, see below for some questions. > > On Tue, 30 Jul 2019 13:58:32 +0200 > Bartosz Bilas <b.bilas@grinn-global.com> wrote: > >> This commit adds a patch from upstream chromium >> and bumps required minimal gcc version to 8. >> >> Fixes: >> ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: >> note: in definition of macro 'NS' >> #define NS(id) id >> ^~ >> >> Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com> > Do we have any corresponding build failure in the autobuilders ? If so, > we like to have a reference to such build failures. > > Also, why is the required gcc version now >= 8.x ? This is not really > explained in your commit log. > > Thomas
Hello Bartosz, On Tue, 30 Jul 2019 13:58:32 +0200, Bartosz Bilas <b.bilas@grinn-global.com> wrote: > This commit adds a patch from upstream chromium > and bumps required minimal gcc version to 8. > > Fixes: > ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: > note: in definition of macro 'NS' > #define NS(id) id > ^~ Please paste some more lines of the failure, e.g. as the original: [102/12099] CXX obj/skia/skcms/skcms.o FAILED: obj/skia/skcms/skcms.o [...] ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h: In function ‘void exec_ops(const Op*, const void**, const char*, char*, int)’: ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h:560:16: internal compiler error: in convert_move, at expr.c:231 static void NS(exec_ops)(const Op* ops, const void** args, ^ ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: note: in definition of macro ‘NS’ #define NS(id) id ^~ Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.buildroot.net/> for instructions. As the intersting part is the 'internal compiler error'... Regards, Peter > > Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com> > --- > ...1-pkg_config-Fixes-when-use_sysroot-false.patch | 56 ++++++++++++++++++++++ > package/qt5/qt5webengine/Config.in | 6 +-- > 2 files changed, 59 insertions(+), 3 deletions(-) > create mode 100644 package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch > > diff --git a/package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch b/package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch > new file mode 100644 > index 0000000000..e5ffd19dd0 > --- /dev/null > +++ b/package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch > @@ -0,0 +1,56 @@ > +From cc35cac78c053c14da01d6b1e5b05b0615360148 Mon Sep 17 00:00:00 2001 > +From: Tom Anderson <thomasanderson@chromium.org> > +Date: Thu, 2 Aug 2018 01:59:28 +0000 > +Subject: [PATCH] pkg_config: Fixes when use_sysroot=false > + > +This CL introduces 2 changes to the behavior of pkg_config when > +use_sysroot=false: > + > +1. The path is not made relative to the build directory. This fixes the case > +where your src directory may be mounted at different locations. > + > +2. -I is used instead of -isystem. When -isystem is used, dep files do not > +reference the system header files. This is OK when using the sysroot because > +the CR_SYSROOT_HASH macro contains the sysroot revision so any source files will > +be rebuilt when the sysroot updates. > + > +R=dpranke > + > +Change-Id: Ia3d7df51880205fee888923283b76078ccb3112f > +Reviewed-on: https://chromium-review.googlesource.com/1159689 > +Reviewed-by: Dirk Pranke <dpranke@chromium.org> > +Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> > +Cr-Original-Commit-Position: refs/heads/master@{#580030} > +Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src > +Cr-Mirrored-Commit: a8c8396fd20d98666d517c45b358c63736e345ef > +--- > + src/3rdparty/chromium/build/config/linux/pkg_config.gni | 12 ++++++++---- > + 1 file changed, 8 insertions(+), 4 deletions(-) > + > +diff --git a/src/3rdparty/chromium/build/config/linux/pkg_config.gni b/src/3rdparty/chromium/build/config/linux/pkg_config.gni > +index 53ee353af..428e44ac0 100644 > +--- a/src/3rdparty/chromium/build/config/linux/pkg_config.gni > ++++ b/src/3rdparty/chromium/build/config/linux/pkg_config.gni > +@@ -103,11 +103,15 @@ template("pkg_config") { > + pkgresult = exec_script(pkg_config_script, args, "value") > + cflags = pkgresult[1] > + > +- # We want the system include paths to use -isystem instead of -I to suppress > +- # warnings in those headers. > + foreach(include, pkgresult[0]) { > +- include_relativized = rebase_path(include, root_build_dir) > +- cflags += [ "-isystem$include_relativized" ] > ++ if (use_sysroot) { > ++ # We want the system include paths to use -isystem instead of -I to > ++ # suppress warnings in those headers. > ++ include_relativized = rebase_path(include, root_build_dir) > ++ cflags += [ "-isystem$include_relativized" ] > ++ } else { > ++ cflags += [ "-I$include" ] > ++ } > + } > + > + if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) { > +-- > +2.21.0 > + > diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in > index 744d659567..8102e39b0b 100644 > --- a/package/qt5/qt5webengine/Config.in > +++ b/package/qt5/qt5webengine/Config.in > @@ -10,10 +10,10 @@ config BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS > depends on !BR2_BINFMT_FLAT # qt5base-icu > depends on BR2_USE_MMU # libglib2, qt5base-dbus > > -comment "qt5webengine needs udev /dev management and a glibc toolchain w/ gcc >= 4.8, host gcc >= 4.8, threads, wchar" > +comment "qt5webengine needs udev /dev management and a glibc toolchain w/ gcc >= 8, host gcc >= 4.8, threads, wchar" > depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS > depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC || \ > - !BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || \ > + !BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || \ > !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR > > comment "qt5webengine needs an OpenGL and EGL-capable backend" > @@ -30,7 +30,7 @@ config BR2_PACKAGE_QT5WEBENGINE > depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS > depends on BR2_TOOLCHAIN_USES_GLIBC # execinfo.h, mallinfo > depends on BR2_HOST_GCC_AT_LEAST_4_8 # qt5base-icu > - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # qt5base-icu > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # qt5base-icu > depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85862 || BR2_PACKAGE_QT5_VERSION_5_6 # libnss > depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2, libvpx, qt5base-dbus > depends on BR2_USE_WCHAR # libglib2
Hi Peter, On 7/30/19 11:30 PM, Peter Seiderer wrote: > Hello Bartosz, > > On Tue, 30 Jul 2019 13:58:32 +0200, Bartosz Bilas <b.bilas@grinn-global.com> wrote: > >> This commit adds a patch from upstream chromium >> and bumps required minimal gcc version to 8. >> >> Fixes: >> ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: >> note: in definition of macro 'NS' >> #define NS(id) id >> ^~ > Please paste some more lines of the failure, e.g. as the original: > > [102/12099] CXX obj/skia/skcms/skcms.o > FAILED: obj/skia/skcms/skcms.o > [...] > ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h: In function ‘void exec_ops(const Op*, const void**, const char*, char*, int)’: > ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h:560:16: internal compiler error: in convert_move, at expr.c:231 > static void NS(exec_ops)(const Op* ops, const void** args, > ^ > ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: note: in definition of macro ‘NS’ > #define NS(id) id > ^~ > Please submit a full bug report, > with preprocessed source if appropriate. > See <http://bugs.buildroot.net/> for instructions. > > As the intersting part is the 'internal compiler error'... > > Regards, > Peter That's all related to this error: [1898/14080] CXX obj/skia/skcms/skcms.o FAILED: obj/skia/skcms/skcms.o /home/bbilas/projects/buildroot_projects/dev/buildroot-2019.05/output/host/bin/arm-buildroot-linux-gnueabihf-g++ -MMD -MF obj/skia/skcms/skcms.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=b2165ab47ab9c4cc780db53ace1b08607d68ae31 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../3rdparty/chromium -w -std=c11 -mfp16-format=ieee -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -pthread -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -mfpu=vfpv3-d16 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-psabi -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-dangling-else -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -std=gnu++14 -Wno-narrowing -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -fno-exceptions -fno-rtti --sysroot=../../../../../host/arm-buildroot-linux-gnueabihf/sysroot -fvisibility-inlines-hidden -c ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc -o obj/skia/skcms/skcms.o ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h: In function ‘void exec_ops(const Op*, const void**, const char*, char*, int)’: ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h:560:16: internal compiler error: in convert_move, at expr.c:231 static void NS(exec_ops)(const Op* ops, const void** args, ^ ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: note: in definition of macro ‘NS’ #define NS(id) id ^~ Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.buildroot.net/> for instructions. [1902/14080] CXX obj/skia/skia_core_and_effects/SkMipMap.o ninja: build stopped: subcommand failed. It's a bit weird because I've used the mentioned patch but I chose gcc 7 and I encountered this error again but yesterday I made a clean build with gcc 5 and everything looked fine. Is there a posibility to run autobuilders with all suported gcc version to check if build succedded? Best Bartek > >> Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com> >> --- >> ...1-pkg_config-Fixes-when-use_sysroot-false.patch | 56 ++++++++++++++++++++++ >> package/qt5/qt5webengine/Config.in | 6 +-- >> 2 files changed, 59 insertions(+), 3 deletions(-) >> create mode 100644 package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch >> >> diff --git a/package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch b/package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch >> new file mode 100644 >> index 0000000000..e5ffd19dd0 >> --- /dev/null >> +++ b/package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch >> @@ -0,0 +1,56 @@ >> +From cc35cac78c053c14da01d6b1e5b05b0615360148 Mon Sep 17 00:00:00 2001 >> +From: Tom Anderson <thomasanderson@chromium.org> >> +Date: Thu, 2 Aug 2018 01:59:28 +0000 >> +Subject: [PATCH] pkg_config: Fixes when use_sysroot=false >> + >> +This CL introduces 2 changes to the behavior of pkg_config when >> +use_sysroot=false: >> + >> +1. The path is not made relative to the build directory. This fixes the case >> +where your src directory may be mounted at different locations. >> + >> +2. -I is used instead of -isystem. When -isystem is used, dep files do not >> +reference the system header files. This is OK when using the sysroot because >> +the CR_SYSROOT_HASH macro contains the sysroot revision so any source files will >> +be rebuilt when the sysroot updates. >> + >> +R=dpranke >> + >> +Change-Id: Ia3d7df51880205fee888923283b76078ccb3112f >> +Reviewed-on: https://chromium-review.googlesource.com/1159689 >> +Reviewed-by: Dirk Pranke <dpranke@chromium.org> >> +Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> >> +Cr-Original-Commit-Position: refs/heads/master@{#580030} >> +Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src >> +Cr-Mirrored-Commit: a8c8396fd20d98666d517c45b358c63736e345ef >> +--- >> + src/3rdparty/chromium/build/config/linux/pkg_config.gni | 12 ++++++++---- >> + 1 file changed, 8 insertions(+), 4 deletions(-) >> + >> +diff --git a/src/3rdparty/chromium/build/config/linux/pkg_config.gni b/src/3rdparty/chromium/build/config/linux/pkg_config.gni >> +index 53ee353af..428e44ac0 100644 >> +--- a/src/3rdparty/chromium/build/config/linux/pkg_config.gni >> ++++ b/src/3rdparty/chromium/build/config/linux/pkg_config.gni >> +@@ -103,11 +103,15 @@ template("pkg_config") { >> + pkgresult = exec_script(pkg_config_script, args, "value") >> + cflags = pkgresult[1] >> + >> +- # We want the system include paths to use -isystem instead of -I to suppress >> +- # warnings in those headers. >> + foreach(include, pkgresult[0]) { >> +- include_relativized = rebase_path(include, root_build_dir) >> +- cflags += [ "-isystem$include_relativized" ] >> ++ if (use_sysroot) { >> ++ # We want the system include paths to use -isystem instead of -I to >> ++ # suppress warnings in those headers. >> ++ include_relativized = rebase_path(include, root_build_dir) >> ++ cflags += [ "-isystem$include_relativized" ] >> ++ } else { >> ++ cflags += [ "-I$include" ] >> ++ } >> + } >> + >> + if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) { >> +-- >> +2.21.0 >> + >> diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in >> index 744d659567..8102e39b0b 100644 >> --- a/package/qt5/qt5webengine/Config.in >> +++ b/package/qt5/qt5webengine/Config.in >> @@ -10,10 +10,10 @@ config BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS >> depends on !BR2_BINFMT_FLAT # qt5base-icu >> depends on BR2_USE_MMU # libglib2, qt5base-dbus >> >> -comment "qt5webengine needs udev /dev management and a glibc toolchain w/ gcc >= 4.8, host gcc >= 4.8, threads, wchar" >> +comment "qt5webengine needs udev /dev management and a glibc toolchain w/ gcc >= 8, host gcc >= 4.8, threads, wchar" >> depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS >> depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC || \ >> - !BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || \ >> + !BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || \ >> !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR >> >> comment "qt5webengine needs an OpenGL and EGL-capable backend" >> @@ -30,7 +30,7 @@ config BR2_PACKAGE_QT5WEBENGINE >> depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS >> depends on BR2_TOOLCHAIN_USES_GLIBC # execinfo.h, mallinfo >> depends on BR2_HOST_GCC_AT_LEAST_4_8 # qt5base-icu >> - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # qt5base-icu >> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # qt5base-icu >> depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85862 || BR2_PACKAGE_QT5_VERSION_5_6 # libnss >> depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2, libvpx, qt5base-dbus >> depends on BR2_USE_WCHAR # libglib2
Hello, On Wed, 31 Jul 2019 09:15:13 +0200 Bartosz Biłas <b.bilas@grinn-global.com> wrote: > --sysroot=../../../../../host/arm-buildroot-linux-gnueabihf/sysroot > -fvisibility-inlines-hidden -c > ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc -o > obj/skia/skcms/skcms.o > ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h: > In function ‘void exec_ops(const Op*, const void**, const char*, char*, > int)’: > ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h:560:16: > internal compiler error: in convert_move, at expr.c:231 > static void NS(exec_ops)(const Op* ops, const void** args, > ^ > ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: > note: in definition of macro ‘NS’ > #define NS(id) id > ^~ > Please submit a full bug report, > with preprocessed source if appropriate. > See <http://bugs.buildroot.net/> for instructions. > [1902/14080] CXX obj/skia/skia_core_and_effects/SkMipMap.o > ninja: build stopped: subcommand failed. Then I'm still confused. What is the relationship between the patch you're posting and the build error ? It seems entirely unrelated at first sight. Is it the requirement of gcc >= 8.x that works around the compiler bug ? Is there a gcc bug report for this compiler bug ? Some googling leads to https://github.com/OSSystems/meta-browser/issues/135, which itself links to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83623. It seems like the bug has been fixed in both the gcc 6.x (fix was in gcc 6.5.0) and gcc 7.x branches (fix was in gcc 7.3.0). So, could you give more details about the situation in which you're encountering this build failure ? Which toolchain are you using ? How is the patch related to the build failure ? Thanks, Thomas
Hi, Am 11.08.19 um 22:30 schrieb Thomas Petazzoni: > Hello, > > On Wed, 31 Jul 2019 09:15:13 +0200 > Bartosz Biłas <b.bilas@grinn-global.com> wrote: > >> --sysroot=../../../../../host/arm-buildroot-linux-gnueabihf/sysroot >> -fvisibility-inlines-hidden -c >> ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc -o >> obj/skia/skcms/skcms.o >> ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h: >> In function ‘void exec_ops(const Op*, const void**, const char*, char*, >> int)’: >> ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h:560:16: >> internal compiler error: in convert_move, at expr.c:231 >> static void NS(exec_ops)(const Op* ops, const void** args, >> ^ >> ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: >> note: in definition of macro ‘NS’ >> #define NS(id) id >> ^~ >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See <http://bugs.buildroot.net/> for instructions. >> [1902/14080] CXX obj/skia/skia_core_and_effects/SkMipMap.o >> ninja: build stopped: subcommand failed. > > Then I'm still confused. > > What is the relationship between the patch you're posting and the build > error ? It seems entirely unrelated at first sight. > > Is it the requirement of gcc >= 8.x that works around the compiler > bug ? Is there a gcc bug report for this compiler bug ? > > Some googling leads to > https://github.com/OSSystems/meta-browser/issues/135, which itself > links to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83623. > > It seems like the bug has been fixed in both the gcc 6.x (fix was in gcc 6.5.0) and gcc 7.x > branches (fix was in gcc 7.3.0). Just for information, I run into the same problem on buildroot 2019.08 with a custom imx6 defconfig with the prebuilt toolchain armv7-eabihf--glibc--stable-2018.11-1 as well as linaro-2018.05. Did not try the patch. best regards, Andreas > > So, could you give more details about the situation in which you're > encountering this build failure ? Which toolchain are you using ? How > is the patch related to the build failure ? > > Thanks, > > Thomas >
Hi Thomas, Bartosz, All, On 8/11/19 10:30 PM, thomas.petazzoni at bootlin.com (Thomas Petazzoni) wrote: > Hello, > > On Wed, 31 Jul 2019 09:15:13 +0200 > Bartosz Bi?as <b.bilas at grinn-global.com> wrote: > >> --sysroot=../../../../../host/arm-buildroot-linux-gnueabihf/sysroot >> -fvisibility-inlines-hidden -c >> ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc -o >> obj/skia/skcms/skcms.o >> ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h: >> In function ?void exec_ops(const Op*, const void**, const char*, char*, >> int)?: >> ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h:560:16: >> internal compiler error: in convert_move, at expr.c:231 >> ?static void NS(exec_ops)(const Op* ops, const void** args, >> ??????????????? ^ >> ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: >> note: in definition of macro ?NS? >> ?#define NS(id) id >> ??????????????? ^~ >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See <http://bugs.buildroot.net/> for instructions. >> [1902/14080] CXX obj/skia/skia_core_and_effects/SkMipMap.o >> ninja: build stopped: subcommand failed. > > Then I'm still confused. > > What is the relationship between the patch you're posting and the build > error ? It seems entirely unrelated at first sight. They are not related, see the explanation at the end. > Is it the requirement of gcc >= 8.x that works around the compiler > bug ? Is there a gcc bug report for this compiler bug ? > > Some googling leads to > https://github.com/OSSystems/meta-browser/issues/135, which itself > links to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83623. > > It seems like the bug has been fixed in both the gcc 6.x (fix was in gcc 6.5.0) and gcc 7.x > branches (fix was in gcc 7.3.0). And indeed I've built it successfully with gcc 7.5. > So, could you give more details about the situation in which you're > encountering this build failure ? Which toolchain are you using ? How > is the patch related to the build failure ? This patch is a mix to fix 2 different problems. 1) qt5webengine include path issue leading to: ' In file included from /usr/include/c++/6.1.1/bits/stl_algo.h:59:0, from /usr/include/c++/6.1.1/algorithm:62, from /usr/include/qt/QtCore/qglobal.h:85, from /usr/include/qt/QtCore/QtGlobal:1, from ../<Project Source File> /usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h> ^ compilation terminated. ' The patch Bartosz is going to add is to solve this, it's due to hardcoded substitution of relative paths with -isystem in Chromium, while in all qt5 packages this is set to -I according to 'MAKE_CFLAGS_ISYSTEM =' set in qt5base/qmake.conf.in. Chromium fixed this with adding that patch: https://chromium.googlesource.com/chromium/src/+/a8c8396fd20d98666d517c45b358c63736e345ef so this is fixed starting from 70.0.3511.0 version: https://chromium.googlesource.com/chromium/src/+/refs/tags/70.0.3511.0 qt5 bumped its Chromium 3rd party copy from 69 to 73 solving this issue starting from qt5 version 5.13, unfortunately before they only backported Chromium CVEs. So bumping qt5 to version >= 5.13 we should see this bug to disappear. So *Bartosz*, can you please submit a patch only for -I issue? 2) Gcc ICE, as you've already mentioned, has been fixed, so we don't need a workaround. Best regards
Hi Giulio/all, On 20.12.2019 12:43, Giulio Benetti wrote: > Hi Thomas, Bartosz, All, > > On 8/11/19 10:30 PM, thomas.petazzoni at bootlin.com (Thomas > Petazzoni) wrote: >> Hello, >> >> On Wed, 31 Jul 2019 09:15:13 +0200 >> Bartosz Bi?as <b.bilas at grinn-global.com> wrote: >> >>> --sysroot=../../../../../host/arm-buildroot-linux-gnueabihf/sysroot >>> -fvisibility-inlines-hidden -c >>> ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc -o >>> obj/skia/skcms/skcms.o >>> ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h: >>> >>> In function ?void exec_ops(const Op*, const void**, const char*, char*, >>> int)?: >>> ../../3rdparty/chromium/third_party/skia/third_party/skcms/src/Transform_inl.h:560:16: >>> >>> internal compiler error: in convert_move, at expr.c:231 >>> ?static void NS(exec_ops)(const Op* ops, const void** args, >>> ??????????????? ^ >>> ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: >>> >>> note: in definition of macro ?NS? >>> ?#define NS(id) id >>> ??????????????? ^~ >>> Please submit a full bug report, >>> with preprocessed source if appropriate. >>> See <http://bugs.buildroot.net/> for instructions. >>> [1902/14080] CXX obj/skia/skia_core_and_effects/SkMipMap.o >>> ninja: build stopped: subcommand failed. >> >> Then I'm still confused. >> >> What is the relationship between the patch you're posting and the build >> error ? It seems entirely unrelated at first sight. > > They are not related, see the explanation at the end. > >> Is it the requirement of gcc >= 8.x that works around the compiler >> bug ? Is there a gcc bug report for this compiler bug ? >> >> Some googling leads to >> https://github.com/OSSystems/meta-browser/issues/135, which itself >> links to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83623. >> >> It seems like the bug has been fixed in both the gcc 6.x (fix was in >> gcc 6.5.0) and gcc 7.x >> branches (fix was in gcc 7.3.0). > > And indeed I've built it successfully with gcc 7.5. > >> So, could you give more details about the situation in which you're >> encountering this build failure ? Which toolchain are you using ? How >> is the patch related to the build failure ? > > This patch is a mix to fix 2 different problems. > 1) qt5webengine include path issue leading to: > ' > In file included from /usr/include/c++/6.1.1/bits/stl_algo.h:59:0, > from /usr/include/c++/6.1.1/algorithm:62, > from /usr/include/qt/QtCore/qglobal.h:85, > from /usr/include/qt/QtCore/QtGlobal:1, > from ../<Project Source File> > /usr/include/c++/6.1.1/cstdlib:75:25: fatal error: stdlib.h: No such > file or directory > #include_next <stdlib.h> > ^ > compilation terminated. > ' > The patch Bartosz is going to add is to solve this, it's due to > hardcoded substitution of relative paths with -isystem in Chromium, > while in all qt5 packages this is set to -I according to > 'MAKE_CFLAGS_ISYSTEM =' set in qt5base/qmake.conf.in. > Chromium fixed this with adding that patch: > https://chromium.googlesource.com/chromium/src/+/a8c8396fd20d98666d517c45b358c63736e345ef > > so this is fixed starting from 70.0.3511.0 version: > https://chromium.googlesource.com/chromium/src/+/refs/tags/70.0.3511.0 > qt5 bumped its Chromium 3rd party copy from 69 to 73 solving this > issue starting from qt5 version 5.13, unfortunately before they only > backported Chromium CVEs. So bumping qt5 to version >= 5.13 we should > see this bug to disappear. > > So *Bartosz*, can you please submit a patch only for -I issue? Sure, I'll do that at the weekend :) > > 2) Gcc ICE, as you've already mentioned, has been fixed, so we don't > need a workaround. > > Best regards Best Bartek
Hello Giulio, Reviving this old thread. On Fri, 20 Dec 2019 12:43:30 +0100 Giulio Benetti <giulio.benetti@benettiengineering.com> wrote: > > Some googling leads to > > https://github.com/OSSystems/meta-browser/issues/135, which itself > > links to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83623. > > > > It seems like the bug has been fixed in both the gcc 6.x (fix was in gcc 6.5.0) and gcc 7.x > > branches (fix was in gcc 7.3.0). > > And indeed I've built it successfully with gcc 7.5. For the record, I'm hitting this compiler bug when building qt5webengine on Buildroot 2019.02.x with gcc 7.4.0. I double checked, and the fix pointed at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83623 has been merged in gcc 7.3.0, so it definitely is in gcc 7.4.0. I am now trying to rebuild with gcc 7.5.0, since you said it was successful for you. If it is, then the issue was not gcc bug 83623. Best regards, Thomas
Hello, On Wed, 1 Apr 2020 17:03:48 +0200 Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: > I am now trying to rebuild with gcc 7.5.0, since you said it was > successful for you. If it is, then the issue was not gcc bug 83623. For the record, gcc 7.5.0 indeed fixes the problem. So there must have been a fix between gcc 7.4.0 and 7.5.0 that fixes the qt5webengine build issue. Best regards, Thomas
diff --git a/package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch b/package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch new file mode 100644 index 0000000000..e5ffd19dd0 --- /dev/null +++ b/package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch @@ -0,0 +1,56 @@ +From cc35cac78c053c14da01d6b1e5b05b0615360148 Mon Sep 17 00:00:00 2001 +From: Tom Anderson <thomasanderson@chromium.org> +Date: Thu, 2 Aug 2018 01:59:28 +0000 +Subject: [PATCH] pkg_config: Fixes when use_sysroot=false + +This CL introduces 2 changes to the behavior of pkg_config when +use_sysroot=false: + +1. The path is not made relative to the build directory. This fixes the case +where your src directory may be mounted at different locations. + +2. -I is used instead of -isystem. When -isystem is used, dep files do not +reference the system header files. This is OK when using the sysroot because +the CR_SYSROOT_HASH macro contains the sysroot revision so any source files will +be rebuilt when the sysroot updates. + +R=dpranke + +Change-Id: Ia3d7df51880205fee888923283b76078ccb3112f +Reviewed-on: https://chromium-review.googlesource.com/1159689 +Reviewed-by: Dirk Pranke <dpranke@chromium.org> +Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> +Cr-Original-Commit-Position: refs/heads/master@{#580030} +Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src +Cr-Mirrored-Commit: a8c8396fd20d98666d517c45b358c63736e345ef +--- + src/3rdparty/chromium/build/config/linux/pkg_config.gni | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/3rdparty/chromium/build/config/linux/pkg_config.gni b/src/3rdparty/chromium/build/config/linux/pkg_config.gni +index 53ee353af..428e44ac0 100644 +--- a/src/3rdparty/chromium/build/config/linux/pkg_config.gni ++++ b/src/3rdparty/chromium/build/config/linux/pkg_config.gni +@@ -103,11 +103,15 @@ template("pkg_config") { + pkgresult = exec_script(pkg_config_script, args, "value") + cflags = pkgresult[1] + +- # We want the system include paths to use -isystem instead of -I to suppress +- # warnings in those headers. + foreach(include, pkgresult[0]) { +- include_relativized = rebase_path(include, root_build_dir) +- cflags += [ "-isystem$include_relativized" ] ++ if (use_sysroot) { ++ # We want the system include paths to use -isystem instead of -I to ++ # suppress warnings in those headers. ++ include_relativized = rebase_path(include, root_build_dir) ++ cflags += [ "-isystem$include_relativized" ] ++ } else { ++ cflags += [ "-I$include" ] ++ } + } + + if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) { +-- +2.21.0 + diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in index 744d659567..8102e39b0b 100644 --- a/package/qt5/qt5webengine/Config.in +++ b/package/qt5/qt5webengine/Config.in @@ -10,10 +10,10 @@ config BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS depends on !BR2_BINFMT_FLAT # qt5base-icu depends on BR2_USE_MMU # libglib2, qt5base-dbus -comment "qt5webengine needs udev /dev management and a glibc toolchain w/ gcc >= 4.8, host gcc >= 4.8, threads, wchar" +comment "qt5webengine needs udev /dev management and a glibc toolchain w/ gcc >= 8, host gcc >= 4.8, threads, wchar" depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC || \ - !BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || \ + !BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || \ !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR comment "qt5webengine needs an OpenGL and EGL-capable backend" @@ -30,7 +30,7 @@ config BR2_PACKAGE_QT5WEBENGINE depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_USES_GLIBC # execinfo.h, mallinfo depends on BR2_HOST_GCC_AT_LEAST_4_8 # qt5base-icu - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # qt5base-icu + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # qt5base-icu depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85862 || BR2_PACKAGE_QT5_VERSION_5_6 # libnss depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2, libvpx, qt5base-dbus depends on BR2_USE_WCHAR # libglib2
This commit adds a patch from upstream chromium and bumps required minimal gcc version to 8. Fixes: ../../3rdparty/chromium/third_party/skia/third_party/skcms/skcms.cc:1909:16: note: in definition of macro 'NS' #define NS(id) id ^~ Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com> --- ...1-pkg_config-Fixes-when-use_sysroot-false.patch | 56 ++++++++++++++++++++++ package/qt5/qt5webengine/Config.in | 6 +-- 2 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 package/qt5/qt5webengine/5.12.4/0001-pkg_config-Fixes-when-use_sysroot-false.patch