New issue
Advanced search Search tips

Issue 837889 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug
Build-Toolchain



Sign in to add a comment

ChromeOS StandAlone SDK is broken

Project Member Reported by manojgupta@chromium.org, Apr 28 2018

Issue description

Started after llvm roll on April 25.
gsutil cp gs://chromiumos-sdk/2018/04/armv7a-cros-linux-gnueabi-2018.04.26.193233.tar.xz .

$ cat main.cpp
#include <iostream>

int main()
{
        std::cout << "Hello\n" << std::endl;
}

$ bin/armv7a-cros-linux-gnueabi-clang++ main.cpp -o main
tmp/main-368a05.o:main.cpp:function main: error: undefined reference to 'std::__1::cout'
/tmp/main-368a05.o:main.cpp:function std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&): error: undefined reference to 'std::__1::ios_base::getloc() const'
/tmp/main-368a05.o:main.cpp:function std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&): error: undefined reference to 'std::__1::locale::use_facet(std::__1::locale::id&) const'
/tmp/main-368a05.o:main.cpp:function std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&): error: undefined reference to 'std::__1::locale::~locale()'


Add -lc++ -lm to the command line and it passes. These flags should not have to be passed manually.
Note, the Chrome OS chroot clang is fine.
 
The issue is SDK packaging script makes call to clang++ call clang-7.elf that misses ++ suffix.  Previous llvm version had a clang++-7.0 file which has been removed in latest llvm builds leaving only a clang-7.0 file.

So, the packaging script should create a symlink to clang-7.0 as clang++-7.0 and call that instead.
Actually there not clang-7.0, only clang-7. Probably because there are no llvm-X.Y releases. This is causing the existing pattern matching and symlink generation part of cros_setup_toolchains script to fail.
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/ae26814f310e3acfa6ab09ad78d1d40266613054

commit ae26814f310e3acfa6ab09ad78d1d40266613054
Author: Manoj Gupta <manojgupta@google.com>
Date: Sat Apr 28 18:36:23 2018

cros_setup_toolchain: Fix clang++ invocation.

Newer clang release do not use X.Y prefixes for clang binary,
but just use a clang-X notation.
This is breaking the pattern match in Clang wrapper symlink fixup.

BUG= chromium:837889 
TEST=Correct symlinks are created.

Change-Id: I49a79588d03ee9399e13bd0d3480b8f7923a4a3c
Reviewed-on: https://chromium-review.googlesource.com/1034205
Trybot-Ready: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>

[modify] https://crrev.com/ae26814f310e3acfa6ab09ad78d1d40266613054/scripts/cros_setup_toolchains.py

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 28 2018

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

commit 0ec14c8f9cba13f1bf9fbf8d2ef08bbac6eccc33
Author: chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Sat Apr 28 22:03:02 2018

Roll src/third_party/chromite/ 117b08a55..ae26814f3 (1 commit)

https://chromium.googlesource.com/chromiumos/chromite.git/+log/117b08a5550a..ae26814f310e

$ git log 117b08a55..ae26814f3 --date=short --no-merges --format='%ad %ae %s'
2018-04-27 manojgupta cros_setup_toolchain: Fix clang++ invocation.

Created with:
  roll-dep src/third_party/chromite
BUG= chromium:837889 


The AutoRoll server is located here: https://chromite-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


TBR=chrome-os-gardeners@chromium.org

Change-Id: Ia57694a643aa8feeae0f67b4dc009cb61c072729
Reviewed-on: https://chromium-review.googlesource.com/1034209
Commit-Queue: Chromite Chromium Autoroll <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Reviewed-by: Chromite Chromium Autoroll <chromite-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#554655}
[modify] https://crrev.com/0ec14c8f9cba13f1bf9fbf8d2ef08bbac6eccc33/DEPS

Status: Verified (was: Untriaged)

Sign in to add a comment