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

Issue 679135 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 14
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

UpdateClang depends on GYP_DEFINES that may not be set

Project Member Reported by crouleau@chromium.org, Jan 7 2017

Issue description

I think there may be something wrong with the logic in 
tools/clang/scripts/update.py UpdateClang() for setting need_gold_plugin. It depends on GYP_DEFINES that were not set for me. need_gold_plugin was false for me, I ended up getting errors like

"BFD: ../../third_party/llvm-build/Release+Asserts/lib/LLVMgold.so: cannot open shared object file: No such file or directory"

when I compiled.

Perhaps somewhere something in the tool chain should have set LLVM_DOWNLOAD_GOLD_PLUGIN env var to true.

For reference, my args.gn were

is_chrome_branded = true
is_debug = false
is_official_build = true
use_goma = true
is_component_build = false
is_clang = true

 issue 536159  is a good reference bug.
 
Components: -Infra
Owner: thakis@chromium.org
Status: Assigned (was: Untriaged)
Assigning to thakis@ for clang-related triage.

Comment 2 by thakis@chromium.org, Jan 11 2017

Cc: krasin@chromium.org
Two things here:

1. In general, in gyp times, there was a way to run hooks depending on the gyp config. That's what this script does.  Bug 570091  tracks having something like that for gn.

2. For this concrete case, since prod builds now use LTO, see https://bugs.chromium.org/p/chromium/issues/detail?id=678915#c4

I could dupe this into the first thing I mentioned, or we could leave this bug here open for 2. Not sure if we should just wait for lld for that.

Comment 3 by thakis@chromium.org, Mar 11 2017

Owner: agrieve@chromium.org
Status: Fixed (was: Assigned)
related: https://chromium.googlesource.com/chromium/src.git/+/57310cedbe5d558ba806b3f60f752b84e20a65eb

Comment 4 by drott@chromium.org, Mar 31 2017

Cc: drott@chromium.org
 Issue 707184  has been merged into this issue.

Comment 5 by drott@chromium.org, Mar 31 2017

Status: Available (was: Fixed)
Can I reopen this?

https://chromium.googlesource.com/chromium/src.git/+/57310cedbe5d558ba806b3f60f752b84e20a65eb
Did not seem to work here, or was it reverted later? Only doing 
$ LLVM_DOWNLOAD_GOLD_PLUGIN=1 gclient sync
helped.

Comment 6 by thakis@chromium.org, Mar 31 2017

It was reverted, see review link for that revision.
In case other people are searching for error messages.... When your linux official branded build fails with this message:

FAILED: tls_edit tls_edit.map.gz 
python "../../build/toolchain/gcc_link_wrapper.py" --output="./tls_edit" --map-file "./tls_edit.map.gz" -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--no-as-needed -lpthread -Wl,--as-needed -fuse-ld=gold -B../../third_party/binutils/Linux_x64/Release/bin -Wl,--threads -Wl,--thread-count=4 -Wl,--icf=all -flto -fwhole-program-vtables -Wl,-plugin-opt,O1 -Wl,-plugin-opt,-function-sections -Wl,-plugin-opt,-data-sections -m64 -pthread -Werror -Wl,-O1 -Wl,--gc-sections --sysroot=../../build/linux/debian_jessie_amd64-sysroot -L/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/lib/x86_64-linux-gnu -Wl,-rpath-link=/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/lib/x86_64-linux-gnu -L/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu -Wl,-rpath-link=/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu -L/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6 -Wl,-rpath-link=/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib -Wl,-rpath-link=/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib -fsanitize=cfi-vcall -Wl,-rpath-link=. -Wl,--disable-new-dtags -o "./tls_edit" -Wl,--start-group @"./tls_edit.rsp"  -Wl,--end-group  -ldl -lrt 
../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /w/chrome/src/third_party/llvm-build/Release+Asserts/bin/../lib/LLVMgold.so: could not load plugin library: /w/chrome/src/third_party/llvm-build/Release+Asserts/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory
../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: obj/native_client/src/tools/tls_edit/tls_edit/tls_edit.o:1:3: invalid character
../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: obj/native_client/src/tools/tls_edit/tls_edit/tls_edit.o:1:3: syntax error, unexpected $end
../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: obj/native_client/src/tools/tls_edit/tls_edit/tls_edit.o: not an object or archive
../../build/linux/debian_jessie_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o(.text+0x20): error: undefined reference to 'main'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The workaround from #5 is:
LLVM_DOWNLOAD_GOLD_PLUGIN=1 gclient sync

and rebuild

Project Member

Comment 8 by sheriffbot@chromium.org, Apr 27 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Assigned (was: Untriaged)
This bug has an owner, thus, it's been triaged. Changing status to "assigned".
Owner: p...@chromium.org
Status: Fixed (was: Assigned)
https://codereview.chromium.org/2953283002/

Sign in to add a comment