GN: ChromeOS: unused-private-field warning when building chrome with |
|||||
Issue descriptionAfter setting custom_toolchain in the GN flags and getting some fixes from dpranke, I get the following error while building chrome with GN and ChromeOS clang version. FAILED: obj/media/gpu/gpu/generic_v4l2_device.o armv7a-cros-linux-gnueabi-clang++ -B/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/.cros_cache/chrome-sdk/tarballs/daisy+8530.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.25.51-gold -Wno-unknown-warning-option -Wno-unknown-warning-option -MMD -MF obj/media/gpu/gpu/generic_v4l2_device.o.d -DMEDIA_GPU_IMPLEMENTATION -DUSE_V4L2_CODEC -DV8_DEPRECATION_WARNINGS -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_ASH=1 -DUSE_AURA=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_APP_LIST=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DIMAGE_LOADER_EXTENSION=1 -DENABLE_WAYLAND_SERVER=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=274369-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DOS_CHROMEOS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DUSE_EGL -DENABLE_IPC_FUZZER -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DMESA_EGL_NO_X11_HEADERS -DOPUS_FIXED_POINT -I../.. -Igen -I../../third_party/khronos -I../../gpu -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/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/mesa/src/include -I../../third_party/libwebm/source -I../../third_party/opus/src/include -I../../third_party/libyuv -I../../third_party/libyuv/include -fno-strict-aliasing -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -fdebug-prefix-map=/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/src=. -pthread --target=arm-linux-gnueabihf -march=armv7-a -mfloat-abi=hard -mthumb -mtune=generic-armv7-a -mfpu=neon -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -O2 -fno-ident -fdata-sections -ffunction-sections -g2 -gsplit-dwarf --sysroot=../../../.cros_cache/chrome-sdk/tarballs/daisy+8530.0.0+sysroot_chromeos-base_chromeos-chrome.tar.xz -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wno-reserved-user-defined-literal -fno-rtti -fno-exceptions -pipe -march=armv7-a -mtune=cortex-a15 -mfpu=neon -mfloat-abi=hard -D__google_stl_debug_vector=1 -gsplit-dwarf -c ../../media/gpu/generic_v4l2_device.cc -o obj/media/gpu/gpu/generic_v4l2_device.o In file included from ../../media/gpu/generic_v4l2_device.cc:6: ../../media/gpu/generic_v4l2_device.h:68:8: error: private field 'use_libv4l2_' is not used [-Werror,-Wunused-private-field] bool use_libv4l2_;
,
Jul 7 2016
there are the GN vars settings use_ozone = true custom_toolchain = "//build/toolchain/cros:target" arm_float_abi = "hard" cros_v8_snapshot_extra_cppflags = "" ozone_platform_gbm = true cros_v8_snapshot_cc = "/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/src/third_party/llvm-build/Release+Asserts/bin/clang" cros_target_cxx = "armv7a-cros-linux-gnueabi-clang++ -B/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/.cros_cache/chrome-sdk/tarballs/daisy+8530.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.25.51-gold -Wno-unknown-warning-option -Wno-unknown-warning-option" cros_host_ar = "/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/src/third_party/binutils/Linux_x64/Release/bin/ar" use_v4lplugin = false cros_host_cxx = "/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/src/third_party/llvm-build/Release+Asserts/bin/clang++" cros_v8_snapshot_ar = "/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/src/third_party/binutils/Linux_x64/Release/bin/ar" use_cups = true use_system_harfbuzz = true arm_use_neon = true cros_target_extra_cppflags = "" use_evdev_gestures = true use_goma = true cros_host_extra_ldflags = "" cros_target_extra_cxxflags = "-pipe -march=armv7-a -mtune=cortex-a15 -mfpu=neon -mfloat-abi=hard -D__google_stl_debug_vector=1 -gsplit-dwarf" target_sysroot = "/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/.cros_cache/chrome-sdk/tarballs/daisy+8530.0.0+sysroot_chromeos-base_chromeos-chrome.tar.xz" clang_use_chrome_plugins = false symbol_level = 2 cros_host_extra_cppflags = "" cros_host_is_clang = true cros_target_extra_cflags = "-pipe -march=armv7-a -mtune=cortex-a15 -mfpu=neon -mfloat-abi=hard -gsplit-dwarf" cros_v8_snapshot_extra_cflags = "" system_libdir = "lib" use_cras = true cros_host_cc = "/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/src/third_party/llvm-build/Release+Asserts/bin/clang" v8_snapshot_toolchain = "//build/toolchain/cros:v8_snapshot" cros_v8_snapshot_cxx = "/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/src/third_party/llvm-build/Release+Asserts/bin/clang++" is_clang = true use_v4l2_codec = true cros_host_extra_cflags = "" host_toolchain = "//build/toolchain/cros:host" use_xkbcommon = true icu_use_data_file = true cros_v8_snapshot_extra_ldflags = "" enable_nacl = true linux_use_bundled_binutils = true cros_v8_snapshot_ld = "/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/src/third_party/llvm-build/Release+Asserts/bin/clang++" enable_remoting = true ozone_auto_platforms = false cros_target_ld = "armv7a-cros-linux-gnueabi-g++ -B/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/.cros_cache/chrome-sdk/tarballs/daisy+8530.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.25.51-gold" target_os = "chromeos" use_system_minigbm = true cros_host_extra_cxxflags = "" cros_target_ar = "armv7a-cros-linux-gnueabi-ar" use_debug_fission = true cros_v8_snapshot_extra_cxxflags = "" target_cpu = "arm" cros_target_extra_ldflags = "-Wl,-O1 -Wl,-O2 -Wl,--as-needed" is_asan = false is_debug = false cros_host_ld = "/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/src/third_party/llvm-build/Release+Asserts/bin/clang++" ozone_platform = "gbm" goma_dir = "/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/.cros_cache/common/goma+2" cros_target_cc = "armv7a-cros-linux-gnueabi-clang -B/usr/local/google/home/llozano/proj/gn_problem/chroot/tmp/my-chrome-src/.cros_cache/chrome-sdk/tarballs/daisy+8530.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.25.51-gold -Wno-unknown-warning-option"
,
Jul 8 2016
,
Jul 15 2016
If I'm reading the code right, it looks like you're getting this because you're on CrOS, building w/ clang, and setting use_v4l2_codec=true but setting use_v4lplugin = false. I have no idea what these two flags do and whether this is a valid combination or not. And, in general, I probably shouldn't be the person who gets assigned every compiler warning in chrome when you're trying to make a new configuration work :). However, I think this particular fix is straightforward enough.
,
Jul 15 2016
Proposed fix: https://codereview.chromium.org/2151653004/
,
Jul 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f3d6584cfe2a5aa67ce3bfd688fd18217d1d066a commit f3d6584cfe2a5aa67ce3bfd688fd18217d1d066a Author: dpranke <dpranke@chromium.org> Date: Mon Jul 18 00:41:01 2016 Fix a -Wunused-private-member warning in a //media/gpu file. Building w/ clang on CrOS detected an unused private member in a CrOS-specific file in a particular combination of GN args :). R=posciak@chromium.org, llozano@chromium.org BUG= 626240 Review-Url: https://codereview.chromium.org/2151653004 Cr-Commit-Position: refs/heads/master@{#405960} [modify] https://crrev.com/f3d6584cfe2a5aa67ce3bfd688fd18217d1d066a/media/gpu/generic_v4l2_device.cc [modify] https://crrev.com/f3d6584cfe2a5aa67ce3bfd688fd18217d1d066a/media/gpu/generic_v4l2_device.h
,
Jul 18 2016
I believe this is fixed now.
,
Jul 22 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by llozano@chromium.org
, Jul 7 2016Labels: Proj-GN-Migration OS-Chrome