Build error for os="chromeos" with -Wdeprecated-register |
|||||||
Issue descriptionI'm guessing it's https://codereview.chromium.org/2780623003 % gn gen out/Release --args='use_goma=true target_os="chromeos" is_component_build=true remove_webcore_debug_symbols=true' % ninja -j 500 -C out/Release chrome browser_tests unit_tests [64/33671] CXX obj/base/base/message_pump_glib.o FAILED: obj/base/base/message_pump_glib.o /usr/local/google/home/satorux/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/base/message_p ump_glib.o.d -DSYSTEM_NATIVE_UTF8 -DUSE_SYMBOLIZE -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_ASH=1 -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_ CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"298539-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DOS_CHROMEOS -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_GLIBCXX_DEBUG=1 -DBASE_IMPLEMENTATION -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../.. -Igen -I../../build/linux/ubuntu_precise_amd64-sysroot/usr/include/glib-2.0 -I../../build/linux/ubuntu_precise_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -O0 -fno-omit-frame-pointer -g2 -gsplit-dwarf --sysroot=../../build/linux/ubuntu_precise_amd64-sysroot -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-auto-raw-pointer -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-char-subscripts -Wexit-time-destructors -Wexit-time-destructors -fvisibility-inlines-hidden -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++11 -Wno-reserved-user-defined-literal -fno-rtti -fno-exceptions -c ../../base/message_loop/message_pump_glib.cc -o obj/base/base/message_pump_glib.o In file included from ../../base/message_loop/message_pump_glib.cc:10: In file included from ../../build/linux/ubuntu_precise_amd64-sysroot/usr/include/glib-2.0/glib.h:56: In file included from ../../build/linux/ubuntu_precise_amd64-sysroot/usr/include/glib-2.0/glib/giochannel.h:36: In file included from ../../build/linux/ubuntu_precise_amd64-sysroot/usr/include/glib-2.0/glib/gstring.h:36: ../../build/linux/ubuntu_precise_amd64-sysroot/usr/include/glib-2.0/glib/gutils.h:311:3: error: 'register' storage class specifier is deprecated and incompatible with C++1z [-Werror,-Wdeprecated-register] register guint n_bits = 0; ^~~~~~~~~
,
Mar 28 2017
Adding the following around #include <glib.h> fixed this locally. #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-register" #endif #include <glib.h> #if defined(__clang__) #pragma clang diagnostic pop #endif
,
Mar 28 2017
Turned out there were other places wher <glib.h> was included: [218/18107] CXX obj/ui/events/platform/x11/x11/x11_event_source_glib.o FAILED: obj/ui/events/platform/x11/x11/x11_event_source_glib.o /usr/local/google/home/satorux/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/ui/events/platform/x11/x11/x11_event_source_glib.o.d -DEVENTS_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_ASH=1 -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"298539-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DOS_CHROMEOS -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_GLIBCXX_DEBUG=1 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_GPU=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../.. -Igen -I../../build/linux/ubuntu_precise_amd64-sysroot/usr/include/glib-2.0 -I../../build/linux/ubuntu_precise_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -O0 -fno-omit-frame-pointer -g2 -gsplit-dwarf --sysroot=../../build/linux/ubuntu_precise_amd64-sysroot -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-auto-raw-pointer -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -fvisibility-inlines-hidden -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++11 -Wno-reserved-user-defined-literal -fno-rtti -fno-exceptions -c ../../ui/events/platform/x11/x11_event_source_glib.cc -o obj/ui/events/platform/x11/x11/x11_event_source_glib.o In file included from ../../ui/events/platform/x11/x11_event_source_glib.cc:8: In file included from ../../build/linux/ubuntu_precise_amd64-sysroot/usr/include/glib-2.0/glib.h:56: In file included from ../../build/linux/ubuntu_precise_amd64-sysroot/usr/include/glib-2.0/glib/giochannel.h:36: In file included from ../../build/linux/ubuntu_precise_amd64-sysroot/usr/include/glib-2.0/glib/gstring.h:36: ../../build/linux/ubuntu_precise_amd64-sysroot/usr/include/glib-2.0/glib/gutils.h:311:3: error: 'register' storage class specifier is deprecated and incompatible with C++1z [-Werror,-Wdeprecated-register] register guint n_bits = 0; ^~~~~~~~~
,
Mar 28 2017
https://codereview.chromium.org/2772403002/ will likely fix this. It's blocked on https://bugs.chromium.org/p/chromium/issues/detail?id=705727 Feel free to revert my change for now.
,
Mar 28 2017
ah ok, reverting your change for now seems to make sense. let me give it a try. BTW, <pango/pango.h> also had this problem.
,
Mar 28 2017
Hmm. I thought that Chrome was no longer using this and that it just exists for old Chrome OS daemons, but build/config/ui.gni makes me think that we still set use_glib for non-Ozone Linux (i.e. desktop Linux). I don't know if there's a good reason to be using it, but maybe it's necessary for the minimal GTK2 code that we use.
,
Mar 28 2017
FWIW, here are the files that had either glib or pango header includes, that needed a fix to silence the errors. modified: base/message_loop/message_pump_glib.cc modified: chrome/browser/chrome_browser_main_extra_parts_exo.cc modified: chrome/service/service_process.cc modified: content/browser/browser_main_loop.cc modified: content/browser/renderer_host/pepper/pepper_truetype_font_list_pango.cc modified: ui/base/ime/composition_text_util_pango.cc modified: ui/base/l10n/l10n_util.cc modified: ui/events/platform/x11/x11_event_source_glib.cc
,
Mar 28 2017
The patch in question is reverted for now: https://codereview.chromium.org/2778053003/
,
Mar 28 2017
+sadrul@ for event stuff +reveman@ for chrome/browser/chrome_browser_main_extra_parts_exo.cc
,
Mar 28 2017
On linux, we use gtk+ for some bits (e.g. the file-selector dialog). So it's necessary to use the glib message pump. We should not need it on any chromeos builds though. For chromeos, afaik, use_glib should be set to false.
,
Mar 28 2017
I tested use_glib=false on chromeos build. https://codereview.chromium.org/2774423004/ FAILED: obj/ui/events/platform/x11/x11/x11_event_source_libevent.o ... ../../ui/events/platform/x11/x11_event_source_libevent.cc -o obj/ui/events/platform/x11/x11/x11_event_source_libevent.o ../../ui/events/platform/x11/x11_event_source_libevent.cc:161:19: error: cannot initialize a parameter of type 'ui::PlatformEvent' (aka '_XEvent *') with an rvalue of type 'std::unique_ptr<ui::Event, std::default_delete<ui::Event> >::pointer' (aka 'ui::Event *') DispatchEvent(translated_event.get()); ^~~~~~~~~~~~~~~~~~~~~~ ../../ui/events/platform/platform_event_source.h:77:48: note: passing argument to parameter 'platform_event' here virtual uint32_t DispatchEvent(PlatformEvent platform_event); ^ I commented it out, and got linkage error ../../services/ui/service.cc:184: error: undefined reference to 'ui::PlatformEventSource::CreateDefault()'
,
Mar 28 2017
The error also happened on https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.chromiumos%2FLinux_ChromiumOS_Builder__dbg_%2F85125%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout . It did however not happen on the CL's try jobs.
,
Mar 28 2017
Let's keep this open for relanding removal of the flag on cros.
,
Mar 28 2017
This easily reproduces locally. The reason the cq didn't catch this is because we have no bots on the cq that do a cros build in the config most cros developers use. These three bots are in the default set: chromeos_amd64-generic_chromium_compile_only_ng linux_chromium_chromeos_ozone_rel_ng chromeos_daisy_chromium_compile_only_ng The first and the third use the full cros external-toolchain setup with custom compiler and whatnot. No chrome dev uses this. linux_chromium_chromeos_ozone_rel_ng uses the regular chrome/chromeos dev setup, but it sets use_ozone=true, and if I do that the bug doesn't repro. We do have a main waterfall bot covering this common config at least (linked to in comment 12).
,
Mar 28 2017
,
Mar 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a46872ca96d862816f993c16d6c270af26290247 commit a46872ca96d862816f993c16d6c270af26290247 Author: thakis <thakis@chromium.org> Date: Thu Mar 30 21:16:17 2017 Enable -Wdeprecated-register (except on CrOS). No behavior change. BUG=255186, 705812 Review-Url: https://codereview.chromium.org/2780623003 Cr-Original-Commit-Position: refs/heads/master@{#459973} Committed: https://chromium.googlesource.com/chromium/src/+/76ad12fee73e4512dbb9c7a79ffb6cec33fae6f2 Review-Url: https://codereview.chromium.org/2780623003 Cr-Commit-Position: refs/heads/master@{#460879} [modify] https://crrev.com/a46872ca96d862816f993c16d6c270af26290247/base/third_party/dmg_fp/README.chromium [modify] https://crrev.com/a46872ca96d862816f993c16d6c270af26290247/base/third_party/dmg_fp/g_fmt.cc [modify] https://crrev.com/a46872ca96d862816f993c16d6c270af26290247/build/config/compiler/BUILD.gn [modify] https://crrev.com/a46872ca96d862816f993c16d6c270af26290247/third_party/WebKit/Source/build/scripts/make_css_property_names.py [modify] https://crrev.com/a46872ca96d862816f993c16d6c270af26290247/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py [modify] https://crrev.com/a46872ca96d862816f993c16d6c270af26290247/third_party/WebKit/Source/platform/ColorData.gperf [modify] https://crrev.com/a46872ca96d862816f993c16d6c270af26290247/third_party/libaddressinput/BUILD.gn [modify] https://crrev.com/a46872ca96d862816f993c16d6c270af26290247/third_party/mesa/BUILD.gn
,
Mar 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0c64e3912571118d628f513ccc3a7eb6224099d8 commit 0c64e3912571118d628f513ccc3a7eb6224099d8 Author: findit-for-me <findit-for-me@appspot.gserviceaccount.com> Date: Thu Mar 30 22:52:26 2017 Revert of Enable -Wdeprecated-register (except on CrOS). (patchset #7 id:120001 of https://codereview.chromium.org/2780623003/ ) Reason for revert: Findit identified CL at revision 460879 as the culprit for failures in the build cycles as shown on: https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2E0Njg3MmNhOTZkODYyODE2Zjk5M2MxNmQ2YzI3MGFmMjYyOTAyNDcM Original issue's description: > Enable -Wdeprecated-register (except on CrOS). > > No behavior change. > > BUG=255186, 705812 > > Review-Url: https://codereview.chromium.org/2780623003 > Cr-Original-Commit-Position: refs/heads/master@{#459973} > Committed: https://chromium.googlesource.com/chromium/src/+/76ad12fee73e4512dbb9c7a79ffb6cec33fae6f2 > Review-Url: https://codereview.chromium.org/2780623003 > Cr-Commit-Position: refs/heads/master@{#460879} > Committed: https://chromium.googlesource.com/chromium/src/+/a46872ca96d862816f993c16d6c270af26290247 TBR=dcheng@chromium.org,rouslan@chromium.org,kbr@chromium.org,thakis@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=255186, 705812 Review-Url: https://codereview.chromium.org/2786273002 Cr-Commit-Position: refs/heads/master@{#460910} [modify] https://crrev.com/0c64e3912571118d628f513ccc3a7eb6224099d8/base/third_party/dmg_fp/README.chromium [modify] https://crrev.com/0c64e3912571118d628f513ccc3a7eb6224099d8/base/third_party/dmg_fp/g_fmt.cc [modify] https://crrev.com/0c64e3912571118d628f513ccc3a7eb6224099d8/build/config/compiler/BUILD.gn [modify] https://crrev.com/0c64e3912571118d628f513ccc3a7eb6224099d8/third_party/WebKit/Source/build/scripts/make_css_property_names.py [modify] https://crrev.com/0c64e3912571118d628f513ccc3a7eb6224099d8/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py [modify] https://crrev.com/0c64e3912571118d628f513ccc3a7eb6224099d8/third_party/WebKit/Source/platform/ColorData.gperf [modify] https://crrev.com/0c64e3912571118d628f513ccc3a7eb6224099d8/third_party/libaddressinput/BUILD.gn [modify] https://crrev.com/0c64e3912571118d628f513ccc3a7eb6224099d8/third_party/mesa/BUILD.gn
,
Mar 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/755d274e7b3e893719322489b07a5d929328caa0 commit 755d274e7b3e893719322489b07a5d929328caa0 Author: thakis <thakis@chromium.org> Date: Fri Mar 31 12:51:55 2017 Enable -Wdeprecated-register (except on CrOS and 32-bit Linux). No behavior change. BUG=255186, 705812 Review-Url: https://codereview.chromium.org/2780623003 Cr-Original-Original-Commit-Position: refs/heads/master@{#459973} Committed: https://chromium.googlesource.com/chromium/src/+/76ad12fee73e4512dbb9c7a79ffb6cec33fae6f2 Review-Url: https://codereview.chromium.org/2780623003 Cr-Original-Commit-Position: refs/heads/master@{#460879} Committed: https://chromium.googlesource.com/chromium/src/+/a46872ca96d862816f993c16d6c270af26290247 Review-Url: https://codereview.chromium.org/2780623003 Cr-Commit-Position: refs/heads/master@{#461102} [modify] https://crrev.com/755d274e7b3e893719322489b07a5d929328caa0/base/third_party/dmg_fp/README.chromium [modify] https://crrev.com/755d274e7b3e893719322489b07a5d929328caa0/base/third_party/dmg_fp/g_fmt.cc [modify] https://crrev.com/755d274e7b3e893719322489b07a5d929328caa0/build/config/compiler/BUILD.gn [modify] https://crrev.com/755d274e7b3e893719322489b07a5d929328caa0/third_party/WebKit/Source/build/scripts/make_css_property_names.py [modify] https://crrev.com/755d274e7b3e893719322489b07a5d929328caa0/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py [modify] https://crrev.com/755d274e7b3e893719322489b07a5d929328caa0/third_party/WebKit/Source/platform/ColorData.gperf [modify] https://crrev.com/755d274e7b3e893719322489b07a5d929328caa0/third_party/libaddressinput/BUILD.gn [modify] https://crrev.com/755d274e7b3e893719322489b07a5d929328caa0/third_party/mesa/BUILD.gn
,
Mar 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e2aa9636a2086da87bba7d5ebca09fd831504d4a commit e2aa9636a2086da87bba7d5ebca09fd831504d4a Author: thakis <thakis@chromium.org> Date: Fri Mar 31 17:04:46 2017 Enable -Wdeprecated-register in CrOS builds. This was blocked on the CrOS build not using the jessie sysroot, but now it does. BUG= 705812 Review-Url: https://codereview.chromium.org/2794543002 Cr-Commit-Position: refs/heads/master@{#461153} [modify] https://crrev.com/e2aa9636a2086da87bba7d5ebca09fd831504d4a/build/config/compiler/BUILD.gn
,
Mar 31 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by satorux@chromium.org
, Mar 28 2017