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

Issue 848745 link

Starred by 2 users

Issue metadata

Status: Verified
Owner: ----
Closed: Jun 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocking:
issue 845798



Sign in to add a comment

ToTLinuxThinLTO, ToTAndroidCFI fail compile trying to load LLVMgold.so

Project Member Reported by thakis@chromium.org, Jun 1 2018

Issue description

Started here:
https://ci.chromium.org/buildbot/chromium.clang/ToTLinuxThinLTO/2997

[895/52613] LINK ./test_child_process
FAILED: test_child_process 
python "../../build/toolchain/gcc_link_wrapper.py" --output="./test_child_process" -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=lld -Wl,--icf=all -Wl,--color-diagnostics -flto=thin -Wl,--thinlto-jobs=8 -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy,cache_size=10\%:cache_size_bytes=10g:cache_size_files=100000 -Wl,--lto-O0 -fwhole-program-vtables -m64 -Werror -Wl,-O2 -Wl,--gc-sections -nostdlib++ --sysroot=../../build/linux/debian_sid_amd64-sysroot -L../../build/linux/debian_sid_amd64-sysroot/usr/local/lib/x86_64-linux-gnu -Wl,-rpath-link=../../build/linux/debian_sid_amd64-sysroot/usr/local/lib/x86_64-linux-gnu -L../../build/linux/debian_sid_amd64-sysroot/lib/x86_64-linux-gnu -Wl,-rpath-link=../../build/linux/debian_sid_amd64-sysroot/lib/x86_64-linux-gnu -L../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu -Wl,-rpath-link=../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu -Wl,-rpath-link=. -Wl,--disable-new-dtags -o "./test_child_process" -Wl,--start-group @"./test_child_process.rsp"  -Wl,--end-group   -ldl -lpthread -lrt 
/b/c/b/ToTLinuxThinLTO/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: cannot open /b/c/b/ToTLinuxThinLTO/src/third_party/llvm-build/Release+Asserts/bin/../lib/LLVMgold.so: No such file or directory
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)



We shouldn't be using LLVMgold.so given that we use lld.

First bad: 333614
Last good: 333592
 
Blocking: 845798
Cc: ruiu@google.com p...@chromium.org
Status: Untriaged (was: Unconfirmed)
`svn log -r 333593:333614 https://nico@llvm.org/svn/llvm-project/` looks pretty inconspicuous.
Summary: ToTLinuxThinLTO, ToTAndroidCFI fail compile trying to load LLVMgold.so (was: ToTLinuxThinLTO fails trying to load LLVMgold.so)
https://ci.chromium.org/buildbot/chromium.clang/ToTAndroidCFI/2091 too

Comment 3 by p...@chromium.org, Jun 1 2018

I think the problem is with this part of r333607:

@@ -450,7 +437,7 @@ def plugin_opt_thinlto_prefix_replace_eq: J<"plugin-opt=thinlto-prefix-replace="
 // just ignore the option on lld side as it's easier. In fact, the linker could
 // be called 'ld' and understanding which linker is used would require parsing of
 // --version output.
-defm plugin: Eq<"plugin">;
+def plugin: J<"plugin">;
 
 def plugin_opt_fresolution_eq: J<"plugin-opt=-fresolution=">;
 def plugin_opt_pass_through_eq: J<"plugin-opt=-pass-through=">;

The clang driver passes "--plugin LLVMgold.so" to all linkers including lld, so this change causes it to be interpreted as an input file.

Comment 5 by p...@chromium.org, Jun 1 2018

Fix landed in r333793.

Comment 6 by r...@chromium.org, Jun 1 2018

Should we change clang to not pass --plugin LLVMgold.so?

Comment 7 by p...@chromium.org, Jun 1 2018

I don't see the advantage in doing that. We'd still need to pass it if the linker is bfd or gold, and sometimes the driver won't know that the linker is lld (e.g. if it is installed as /usr/bin/ld).

Comment 8 by p...@chromium.org, Jun 5 2018

Status: Verified (was: Untriaged)
The bots are still failing, but with different errors now.

Sign in to add a comment