New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 607370 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

CFI Linux ToT buildbot is red

Project Member Reported by krasin@chromium.org, Apr 28 2016

Issue description

Recently, CFI Linux ToT turned red:
https://build.chromium.org/p/chromium.fyi/builders/CFI%20Linux%20ToT/builds/1965/

FAILED: genmacro 
../../third_party/llvm-build/Release+Asserts/bin/clang -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/b/build/slave/CFI_Linux_ToT/build/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 --sysroot=/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot -L/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/lib/x86_64-linux-gnu -Wl,-rpath-link=/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/lib/x86_64-linux-gnu -L/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib/x86_64-linux-gnu -Wl,-rpath-link=/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib/x86_64-linux-gnu -L/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6 -Wl,-rpath-link=/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib -Wl,-rpath-link=/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib -Wl,--detect-odr-violations -Wl,--icf=all -Wl,--plugin-opt,O1 -Wl,--plugin-opt,-function-sections -flto -fsanitize=cfi-vcall -fsanitize=cfi-derived-cast -fsanitize=cfi-unrelated-cast -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -o genmacro -Wl,--start-group obj/third_party/yasm/source/patched-yasm/tools/genmacro/genmacro.genmacro.o -Wl,--end-group  
clang-3.9: error: invalid argument '-fsanitize=cfi-unrelated-cast' only allowed with '-fvisibility='

Kostya, can you please take a look (assigning to you as our current sanitizer-build-cop)? Peter, it seems that you might have an idea which flags to tune.
 

Comment 1 by p...@chromium.org, Apr 28 2016

Owner: p...@chromium.org
> clang-3.9: error: invalid argument '-fsanitize=cfi-unrelated-cast' only allowed with '-fvisibility='

I think we need to change the compiler so that we don't produce this error when linking. I'll see if I can do it.

Comment 2 by p...@chromium.org, Apr 28 2016

Should be fixed by Clang r267824.

Comment 3 by krasin@chromium.org, Apr 28 2016

CFI Linux ToT is building exactly this rev: https://build.chromium.org/p/chromium.fyi/builders/CFI%20Linux%20ToT/builds/1968

Fingers crossed.

Comment 4 by krasin@chromium.org, Apr 28 2016

Status: Fixed (was: Untriaged)
It seems to be working now (at least, it got further than in the previous run). 

Thank you, Peter, for the instant fix!

Comment 5 by krasin@chromium.org, Apr 28 2016

Status: Assigned (was: Fixed)
Sorry, I spoke too soon. Some remainders persist:

https://build.chromium.org/p/chromium.fyi/builders/CFI%20Linux%20ToT/builds/1968/steps/compile/logs/stdio
FAILED: obj/third_party/harfbuzz-ng/src/harfbuzz-ng.hb-buffer-serialize.o 
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/harfbuzz-ng/src/harfbuzz-ng.hb-buffer-serialize.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=267824 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=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_AUTOFILL_DIALOG=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=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 -DHAVE_OT -DHAVE_ICU -DHAVE_ICU_BUILTIN -DHB_NO_MT -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DCFI_ENFORCEMENT -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../third_party/harfbuzz-ng/src -I../../third_party/icu/source/common -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -pipe -fPIC -fcolor-diagnostics -B/b/build/slave/CFI_Linux_ToT/build/src/third_party/binutils/Linux_x64/Release/bin -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-unused-value -Wno-unused-local-typedef -Wno-unused-variable -I/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/usr/include/freetype2 -pthread -I/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/usr/include/glib-2.0 -I/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -m64 -march=x86-64 --sysroot=/b/build/slave/CFI_Linux_ToT/build/src/build/linux/debian_wheezy_amd64-sysroot -fno-omit-frame-pointer -gline-tables-only -flto -fsanitize=cfi-vcall -fsanitize=cfi-derived-cast -fsanitize=cfi-unrelated-cast -fsanitize-blacklist=../../tools/cfi/blacklist.txt -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wno-deprecated  -c ../../third_party/harfbuzz-ng/src/hb-buffer-serialize.cc -o obj/third_party/harfbuzz-ng/src/harfbuzz-ng.hb-buffer-serialize.o
clang-3.9: error: invalid argument '-fsanitize=cfi-unrelated-cast' only allowed with '-fvisibility='

Comment 6 by p...@chromium.org, Apr 28 2016

That one looks like a compile job, so we'll most likely need to fix Chromium to explicitly pass -fvisibility=default (assuming that's the intent).

Comment 8 by p...@chromium.org, Apr 28 2016

For gyp we can add -fvisibility=default to cflags wherever we remove -fvisibility=hidden.

For gn we'll most likely need a new config symbol_visibility_default which we turn on wherever symbol_visibility_hidden is turned off.

The changes should be mostly mechanical.

Comment 9 by krasin@chromium.org, Apr 28 2016

Owner: krasin@chromium.org
Okay, I will take care of this. Thanks for the diagnostics.

Comment 10 by p...@google.com, Apr 28 2016

Thanks!
Cc: brettw@chromium.org
Fix sent for a review: https://codereview.chromium.org/1930773002/
Actually, the fix spans through several repositories:

src: https://codereview.chromium.org/1930773002/
buildtools: https://codereview.chromium.org/1930753004/
ffmpeg: https://chromium-review.googlesource.com/#/c/341021/
Project Member

Comment 13 by bugdroid1@chromium.org, Apr 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02e28619639d5cf2db5ac346d3328ec0762d6e14

commit 02e28619639d5cf2db5ac346d3328ec0762d6e14
Author: krasin <krasin@google.com>
Date: Fri Apr 29 22:28:28 2016

Always set symbol visibility when compiling with GCC / Clang.

By default, GN includes //build/config/gcc:symbol_visibility_hidden
into every target. Some targets remove this config. At least some of
the compiler options require the visibility to be set explicitly,
and they issue a compiler error otherwise.

This change introduced a new GN config, //build/config/gcc:symbol_visibility_default,
and the targets which remove //build/config/gcc:symbol_visibility_hidden,
must add this one.

BUG= 607370 

Review-Url: https://codereview.chromium.org/1930773002
Cr-Commit-Position: refs/heads/master@{#390784}

[modify] https://crrev.com/02e28619639d5cf2db5ac346d3328ec0762d6e14/base/allocator/BUILD.gn
[modify] https://crrev.com/02e28619639d5cf2db5ac346d3328ec0762d6e14/build/config/gcc/BUILD.gn
[modify] https://crrev.com/02e28619639d5cf2db5ac346d3328ec0762d6e14/build/secondary/third_party/nss/BUILD.gn
[modify] https://crrev.com/02e28619639d5cf2db5ac346d3328ec0762d6e14/ios/third_party/earl_grey/BUILD.gn
[modify] https://crrev.com/02e28619639d5cf2db5ac346d3328ec0762d6e14/ios/third_party/ochamcrest/BUILD.gn
[modify] https://crrev.com/02e28619639d5cf2db5ac346d3328ec0762d6e14/ppapi/BUILD.gn
[modify] https://crrev.com/02e28619639d5cf2db5ac346d3328ec0762d6e14/ppapi/native_client/src/untrusted/irt_stub/BUILD.gn
[modify] https://crrev.com/02e28619639d5cf2db5ac346d3328ec0762d6e14/third_party/google_toolbox_for_mac/BUILD.gn
[modify] https://crrev.com/02e28619639d5cf2db5ac346d3328ec0762d6e14/third_party/harfbuzz-ng/BUILD.gn

Project Member

Comment 14 by bugdroid1@chromium.org, May 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/third_party/ffmpeg/+/c2f5a21ccf4c7895b0c0b27bb2c77d1d0c4eb839

commit c2f5a21ccf4c7895b0c0b27bb2c77d1d0c4eb839
Author: Ivan Krasin <krasin@chromium.org>
Date: Thu Apr 28 16:28:20 2016

Always set symbol visibility when compiling with GCC / Clang.

By default, GN includes //build/config/gcc:symbol_visibility_hidden
into every target. Some targets remove this config. At least some of
the compiler options require the visibility to be set explicitly,
and they issue a compiler error otherwise.

This change is a follow up to src/ counterpart:
https://codereview.chromium.org/1930773002/

BUG= 607370 

Change-Id: Ic1b04ccb3aecdce87ce2c7639a52b9ad7cdc9451

[modify] https://crrev.com/c2f5a21ccf4c7895b0c0b27bb2c77d1d0c4eb839/BUILD.gn

All three CLs are submitted. Some of them may not have been rolled into src/, waiting...
All fixes reached src/. Closing this issue.
Status: Fixed (was: Assigned)

Sign in to add a comment