chromeos compile failure in pdfium in GYP but not GN |
||||||||
Issue descriptionFailing build: https://build.chromium.org/p/chromiumos.chromium/builders/amd64-generic-tot-chromium-pfq-informational/builds/9292 amd64-generic-tot-chromium-pfq-informational-gn builder succeeded. Snippet: chromeos-chrome-53.0.2751.0_alpha-r1: FAILED: x86_64-cros-linux-gnu-g++ -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51-gold -MMD -MF obj/third_party/pdfium/xfa/fxfa/app/xfa.xfa_textlayout.o.d -DPDF_ENABLE_XFA -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CRAS=1 -DUSE_OZONE=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DIMAGE_LOADER_EXTENSION=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_NOTIFICATIONS -DENABLE_WAYLAND_SERVER=1 -DUSE_UDEV -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DFT2_BUILD_LIBRARY -DUSE_LIBPCI=1 -DUSE_NSS_CERTS=1 -DOS_CHROMEOS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../../../../../../../home/chrome-bot/chrome_root/src -I../../../../../../../home/chrome-bot/chrome_root/src/third_party/pdfium -I../../../../../../../home/chrome-bot/chrome_root/src/third_party/pdfium/third_party/freetype/include -I../../../../../../../home/chrome-bot/chrome_root/src/third_party/pdfium/third_party/freetype/include/freetype -I../../../../../../../home/chrome-bot/chrome_root/src/v8 -I../../../../../../../home/chrome-bot/chrome_root/src/v8/include -Werror -pthread -fno-strict-aliasing -Wall -Wno-extra -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-unused-local-typedefs -Wno-error=strict-overflow -m64 -march=x86-64 --sysroot=/build/amd64-generic -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -g -pipe -pipe -pipe -march=x86-64 -msse3 -D__google_stl_debug_vector=1 -Wno-unknown-warning-option -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wno-narrowing -Wno-literal-suffix -c ../../../../../../../home/chrome-bot/chrome_root/src/third_party/pdfium/xfa/fxfa/app/xfa_textlayout.cpp -o obj/third_party/pdfium/xfa/fxfa/app/xfa.xfa_textlayout.o chromeos-chrome-53.0.2751.0_alpha-r1: In file included from ../../../../../../../home/chrome-bot/chrome_root/src/third_party/pdfium/core/fxge/include/fx_dib.h:12:0, chromeos-chrome-53.0.2751.0_alpha-r1: from ../../../../../../../home/chrome-bot/chrome_root/src/third_party/pdfium/xfa/fde/css/fde_css.h:10, chromeos-chrome-53.0.2751.0_alpha-r1: from ../../../../../../../home/chrome-bot/chrome_root/src/third_party/pdfium/xfa/fxfa/app/xfa_textlayout.h:13, chromeos-chrome-53.0.2751.0_alpha-r1: from ../../../../../../../home/chrome-bot/chrome_root/src/third_party/pdfium/xfa/fxfa/app/xfa_textlayout.cpp:7: chromeos-chrome-53.0.2751.0_alpha-r1: ../../../../../../../home/chrome-bot/chrome_root/src/third_party/pdfium/core/fxcrt/include/fx_basic.h: In member function 'void CXFA_TextLayout::ItemBlocks(const CFX_RectF&, int32_t)': chromeos-chrome-53.0.2751.0_alpha-r1: ../../../../../../../home/chrome-bot/chrome_root/src/third_party/pdfium/core/fxcrt/include/fx_basic.h:229:5: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow] chromeos-chrome-53.0.2751.0_alpha-r1: if (nIndex < 0 || nIndex >= m_nSize) { chromeos-chrome-53.0.2751.0_alpha-r1: ^ chromeos-chrome-53.0.2751.0_alpha-r1: At global scope: chromeos-chrome-53.0.2751.0_alpha-r1: cc1plus: error: unrecognized command line option "-Wno-unknown-warning-option" [-Werror] chromeos-chrome-53.0.2751.0_alpha-r1: cc1plus: all warnings being treated as errors We are reverting the DEPS roll for pdfium that introduced this for now: https://codereview.chromium.org/2018903002/ However we should track down the discrepancy between GYP and GN if possible.
,
May 27 2016
We should verify that the GN flow usese -Wstrict-overflow, which seems to be causing the failure here
,
May 27 2016
Good catch. It looks like the following was added to third_party/pdfium/BUILD.gn:
if (is_posix && !is_clang) { # When GCC.
cflags += [ "-Wno-error=strict-overflow" ]
}
I do not see any reference to 'strict-overflow' in GYP.
->thestig@ to fix in GYP.
,
May 27 2016
If you search the snippet, you can see we already added "-Wno-error=strict-overflow" for GYP build. I suspect the error is due to "unrecognized command line option "-Wno-unknown-warning-option"". But this is a Xcode warning, how did this get into chromeos build?
,
May 27 2016
the warning cc1plus: error: unrecognized command line option "-Wno-unknown-warning-option" [-Werror] only shows up there are other warnings in the file. (However, this thing is confusing!). the compilation is failing because there is an overflow warning and we have made all warnings into errors. if we are still seeing the overflow warning, maybe we have not seen the latest version of chrome in the chromeos side?
,
May 27 2016
I added -Wno-unknown-warning-option a week or so ago. I thought this was a valid option for both Clang and GCC. It turns out it is only supported by Clang. GCC does not support it but it will only complain about it if there are other errors in the file. This will cause some confusion. So I will make sure to only pass it for Clang. GCC will only complain about it if you pass it in the "positive" form. ie: -Wunknown-warning-option $x86_64-pc-linux-gnu-gcc -Wunknown-warning-option /tmp/test.c x86_64-pc-linux-gnu-gcc.real: error: unrecognized command line option ‘-Wunknown-warning-option’ ANd it will not complain in the negative form if there are no other errors in the file: $ x86_64-pc-linux-gnu-gcc -Wno-unknown-warning-option /tmp/test.c $ echo $? 0
,
May 27 2016
We (pdfium) have exact same flag "-Wno-error=strict-overflow" set for both GYP and GN. Does chromeos use the same flag "-Wno-unknown-warning-option" for GN as well? I can set the flag to "no-strict-overflow" to avoid the error, but the underlying discrepancy between GYP and GN is still unfound.
,
May 27 2016
@llozano, assign to you
,
May 27 2016
,
May 27 2016
If someone is looking for a quick workaround while building locally, revision fbe0f8955876b10d47da13d98b38cb88f76a0e9f seems to be working.
,
May 27 2016
The following revision refers to this bug: https://pdfium.googlesource.com/pdfium.git/+/d23df55b95716a4b6021ab600b99fd31954c8052 commit d23df55b95716a4b6021ab600b99fd31954c8052 Author: weili <weili@chromium.org> Date: Fri May 27 20:21:54 2016 Change to disable a warning for GCC compilation The warning was only shown and asked not to be treated as an error. However, some recent flag change of chromeos toolchain has some interference with the warning. To avoid future problem, disable the warning for GCC. BUG= chromium:615424 Review-Url: https://codereview.chromium.org/2013163003 [modify] https://crrev.com/d23df55b95716a4b6021ab600b99fd31954c8052/BUILD.gn [modify] https://crrev.com/d23df55b95716a4b6021ab600b99fd31954c8052/xfa.gyp
,
May 27 2016
FYI, we are trying to roll DEPS again for PDFium: https://codereview.chromium.org/2016983003/
,
May 27 2016
Tested this locally and it appears to build fine in Simple Chrome.
,
May 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cc5a500413f69e6dd7d89404f662e13fb2071e90 commit cc5a500413f69e6dd7d89404f662e13fb2071e90 Author: ochang <ochang@chromium.org> Date: Fri May 27 21:43:45 2016 Roll PDFium 490d612..d23df55 https://pdfium.googlesource.com/pdfium.git/+log/490d612..d23df55 BUG= 615424 , 614962 TBR=thestig@chromium.org Review-Url: https://codereview.chromium.org/2016983003 Cr-Commit-Position: refs/heads/master@{#396569} [modify] https://crrev.com/cc5a500413f69e6dd7d89404f662e13fb2071e90/DEPS
,
May 27 2016
I really should not own this bug... (I think, correct me if wrong). I fixed the issue with the confusing warning in https://chromium-review.googlesource.com/#/c/347699/1 I saw you already provided a fix for the strict overflow issue. So, assigning ownership to ochang?
,
May 27 2016
Seems like no one is complaining about the roll for now. Closing.
,
Jul 1 2016
Bulk verified |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by steve...@chromium.org
, May 27 2016