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

Issue 754025 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Most of chromeos.chrome waterfall down in BuildPackages due to -nostdlib++

Project Member Reported by jdufault@chromium.org, Aug 9 2017

Issue description

CL: https://chromium.googlesource.com/chromium/src/+/ff69d3018c42eb994533de337f81d417a0209913
Example failure: https://uberchromegw.corp.google.com/i/chromeos.chrome/builders/cyan-tot-chrome-pfq-informational/builds/3518
Waterfall: https://uberchromegw.corp.google.com/i/chromeos.chrome/waterfall

It looks like chromeos.chrome waterfall still has bots on GCC?

From logs (search for "GN_ARGS =" line)

GN_ARGS =
  is_debug=false
  use_v4l2_codec=true
  use_v4lplugin=false
  use_vaapi=true
  use_ozone=true
  use_evdev_gestures=true
  use_xkbcommon=true
  linux_use_bundled_binutils=false
  use_debug_fission=false
  enable_remoting=true
  enable_nacl=true
  icu_use_data_file=true
  use_cras=true
  use_system_harfbuzz=true
  use_system_freetype=true
  use_cups=true
  is_asan=false
  is_clang=true
  cros_host_is_clang=true
  clang_use_chrome_plugins=false
  use_thin_lto=false
  allow_posix_link_time_opt=false
  ozone_auto_platforms=false
  ozone_platform_gbm=true
  use_system_minigbm=true
  use_system_libdrm=true
  is_chrome_branded=true
  is_official_build=true
  internal_gles2_conform_tests=true
  treat_warnings_as_errors=false
  use_goma=true
  use_debug_fission=true
  symbol_level=2
  target_sysroot="/build/cyan"
  system_libdir="lib64"
  pkg_config="/build/cyan/build/bin/pkg-config"
  target_os="chromeos"
  host_pkg_config="x86_64-pc-linux-gnu-pkg-config"
  ozone_platform="gbm"
  target_cpu="x64"
  goma_dir="/home/chrome-bot/goma"
  cros_target_ar="x86_64-cros-linux-gnu-ar"
  cros_target_cc="x86_64-cros-linux-gnu-clang -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27-gold"
  cros_target_cxx="x86_64-cros-linux-gnu-clang++ -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27-gold"
  host_toolchain="//build/toolchain/cros:host"
  custom_toolchain="//build/toolchain/cros:target"
  v8_snapshot_toolchain="//build/toolchain/cros:v8_snapshot"
  cros_target_ld="x86_64-cros-linux-gnu-clang++ -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27-gold"
  cros_target_extra_cflags="-pipe -pipe -march=corei7 -fno-split-dwarf-inlining -Wno-unknown-warning-option "
  cros_target_extra_cppflags=""
  cros_target_extra_cxxflags="-pipe -pipe -pipe -march=corei7 -fno-split-dwarf-inlining -D__google_stl_debug_vector=1 -Wno-unknown-warning-option "
  cros_target_extra_ldflags="-Wl,-O1 -Wl,-O2 -Wl,--as-needed"
  cros_host_cc="x86_64-pc-linux-gnu-clang -B/usr/bin"
  cros_host_cxx="x86_64-pc-linux-gnu-clang++ -B/usr/bin"
  cros_host_ar="x86_64-pc-linux-gnu-ar"
  cros_host_ld="x86_64-pc-linux-gnu-g++"
  cros_host_extra_cflags="-Wno-unknown-warning-option"
  cros_host_extra_cxxflags="-Wno-unknown-warning-option"
  cros_host_extra_cppflags=""
  cros_host_extra_ldflags=""
  cros_v8_snapshot_cc="x86_64-pc-linux-gnu-clang -B/usr/bin"
  cros_v8_snapshot_cxx="x86_64-pc-linux-gnu-clang++ -B/usr/bin"
  cros_v8_snapshot_ar="x86_64-pc-linux-gnu-ar"
  cros_v8_snapshot_ld="x86_64-pc-linux-gnu-g++"
  cros_v8_snapshot_extra_cflags="-Wno-unknown-warning-option"
  cros_v8_snapshot_extra_cxxflags=" -Wno-unknown-warning-option"
  cros_v8_snapshot_extra_cppflags=""
  cros_v8_snapshot_extra_ldflags=""

 
Also affects chromiumos.chromium waterfall.

https://build.chromium.org/p/chromiumos.chromium/waterfall
Labels: OS-Chrome
This sets is_clang=true and then proceeds to not use clang. That looks like a bot config issue.

llozano, I thought CrOS is off gcc. Do you know what's up with these bots?
Labels: Build-Toolchain
Owner: yunlian@chromium.org
it looks like the problem is with this setting:

cros_host_ld="x86_64-pc-linux-gnu-g++"

so, it is only the driver that is being used. 
Not sure why this was missed but I think we have a solution. 

Assigning to Yunlian who recently touched this.

Can you please explain why are you adding -nostdlib++? (not sure what this does).

yunlian, please make sure simple chrome workflow is fixed too.

See https://chromium.googlesource.com/chromium/src/+/ff69d3018c42eb994533de337f81d417a0209913 for the motivation. We're statically linking libc++ (in cros builds, only for host!), and -nostdlib++ is a new flag we added to clang that makes linking against a custom c++ library much easier than it was before.
our clang compiler version does not support nostdlib++.

We are going to try to cherry pick the support for that option to our version. 

if we can't, we will have to avoid passing this option for chromeos or we can filter it out in our compiler wrapper. 
We only pass it when we use a statically linked libc++. We don't do that on chromeos. So I think it shouldn't be a problem that your clang doesn't have this flag.
confused! why is the builder failing then? 
ie: the option is being passed.. 
For host binaries.

Oh, I guess you force the host cc to your thing to, and that doesn't know the flag (?) In that case, you'd need to cherry pick this.

But maybe you just shouldn't override the host compiler.
Project Member

Comment 12 by bugdroid1@chromium.org, Aug 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/5cfbc0e5dff636e291f91742ae413db586221248

commit 5cfbc0e5dff636e291f91742ae413db586221248
Author: Manoj Gupta <manojgupta@google.com>
Date: Wed Aug 09 23:59:48 2017

llvm: Cherrypick an upstream feature.

Cherrypick the following commit to add -nostdlib++ feature to clang.

commit 37cdc82da7d49a9fe3991eca89f44cd05d86fc55
Author: Nico Weber <nicolasweber@gmx.de>
Date:   Tue Jul 25 18:02:57 2017 +0000

    Introduce -nostdlib++ flag to disable linking the C++ standard library.

    Projects that want to statically link their own C++ standard library currently
    need to pass -nostdlib or -nodefaultlibs, which also disables linking of the
    builtins library, -lm, and so on. Alternatively, they could use `clang` instead
    of `clang++`, but that already disables implicit addition of -lm on some
    toolchains.

BUG= chromium:754025 
TEST=clang does not error out with -nostdlib++.

Change-Id: Idfe2e0742c9b775d17bf339bbbccd8655a0a8402
Reviewed-on: https://chromium-review.googlesource.com/609461
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Trybot-Ready: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Luis Lozano <llozano@chromium.org>

[rename] https://crrev.com/5cfbc0e5dff636e291f91742ae413db586221248/sys-devel/llvm/llvm-5.0_pre305632_p20170806-r1.ebuild
[add] https://crrev.com/5cfbc0e5dff636e291f91742ae413db586221248/sys-devel/llvm/files/cherry/37cdc82da7d49a9fe3991eca89f44cd05d86fc55.patch

for simple chrome workflow (outside chroot), we use the llvm that comes with chrome as the host compiler since that compiler is best suited for the "normal" world that the chroot compiler. 
For the ebuild workflow, we use the compiler in the chroot. 
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/a0cd711392b141c704a7bd221cd3d6f0b6d83483

commit a0cd711392b141c704a7bd221cd3d6f0b6d83483
Author: Yunlian Jiang <yunlian@google.com>
Date: Thu Aug 10 03:14:05 2017

chromeos-chrome: set LD_host to CXX_host

We want to set LD_host to CXX_host to make sure we use the
right ld driver.

BUG= chromium:754025 
TEST=cbuildbot lumpy-chrome-pfq veyron_jerry-chromium-pfq

Change-Id: I61b0d3b5933f28b7d43c6cd3e7a793affeab4206
Reviewed-on: https://chromium-review.googlesource.com/609423
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Trybot-Ready: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>

[modify] https://crrev.com/a0cd711392b141c704a7bd221cd3d6f0b6d83483/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild

Cc: lgcheng@google.com yawano@chromium.org
Project Member

Comment 16 by bugdroid1@chromium.org, Aug 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/0d39a65a5a9959914af0a23a27363e5c984be495

commit 0d39a65a5a9959914af0a23a27363e5c984be495
Author: Yunlian Jiang <yunlian@google.com>
Date: Thu Aug 10 16:47:36 2017

Reland "chromeos-chrome: set LD_host to CXX_host"

This is a reland of a0cd711392b141c704a7bd221cd3d6f0b6d83483
Original change's description:
> chromeos-chrome: set LD_host to CXX_host
> 
> We want to set LD_host to CXX_host to make sure we use the
> right ld driver.
> 
> BUG= chromium:754025 
> TEST=cbuildbot lumpy-chrome-pfq veyron_jerry-chromium-pfq
> 
> Change-Id: I61b0d3b5933f28b7d43c6cd3e7a793affeab4206
> Reviewed-on: https://chromium-review.googlesource.com/609423
> Reviewed-by: Mike Frysinger <vapier@chromium.org>
> Trybot-Ready: Yunlian Jiang <yunlian@chromium.org>
> Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
> Tested-by: Yunlian Jiang <yunlian@chromium.org>

Bug:  chromium:754025 
Change-Id: Icee659ea62a331a6da1004f833530fb5b66a7f8a
Reviewed-on: https://chromium-review.googlesource.com/610520
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Trybot-Ready: Yunlian Jiang <yunlian@chromium.org>

[modify] https://crrev.com/0d39a65a5a9959914af0a23a27363e5c984be495/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild

Cc: dongseon...@intel.com
Cc: isherman@chromium.org derat@chromium.org yunlian@chromium.org
 Issue 755214  has been merged into this issue.
Status: Fixed (was: Assigned)

Comment 20 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 21 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)
Status: Verified (was: Fixed)

Sign in to add a comment