<div dir="ltr">Don't we print the environment in verbose mode?  Can we see that output as well?</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 14, 2018 at 11:53 AM Stella Stamenova <<a href="mailto:stilis@microsoft.com">stilis@microsoft.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The verbose output is below. If I run the two commands on the command line, they both succeed, but when I run them through build.py, the link command is failing. I suspect that the process that gets created through python doesn't inherit the environment with the PATH set, so it can't find the linker.<br>
<br>
<br>
compiling main.c -> exec-next-instruction.test.tmp-main.o<br>
  Command Line: /vstsdrive/_work/42/b/LLVMBuild/bin/clang++ -m64 -g -O0 -nostdinc -static -c -o /vstsdrive/_work/42/b/LLVMBuild/tools/lldb/lit/tools/lldb-mi/exec/Output/exec-next-instruction.test.tmp-main.o /vstsdrive/_work/42/s/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/main.c<br>
  Env:<br>
  STDOUT:<br>
<br>
<br>
<br>
<br>
linking exec-next-instruction.test.tmp-main.o -> exec-next-instruction.test.tmp<br>
  Command Line: /vstsdrive/_work/42/b/LLVMBuild/bin/clang++ -m64 -nostdlib -static -Wl,-e,main -o /vstsdrive/_work/42/b/LLVMBuild/tools/lldb/lit/tools/lldb-mi/exec/Output/exec-next-instruction.test.tmp /vstsdrive/_work/42/b/LLVMBuild/tools/lldb/lit/tools/lldb-mi/exec/Output/exec-next-instruction.test.tmp-main.o<br>
  Env:<br>
  STDOUT:<br>
<br>
  STDERR:<br>
    clang-8: error: unable to execute command: Executable "ld" doesn't exist!<br>
    clang-8: error: linker command failed with exit code 1 (use -v to see invocation)<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: Pavel Labath <<a href="mailto:pavel@labath.sk" target="_blank">pavel@labath.sk</a>> <br>
Sent: Friday, December 14, 2018 11:48 AM<br>
To: <a href="mailto:reviews%2BD55430%2Bpublic%2B4cf420cdda71e8db@reviews.llvm.org" target="_blank">reviews+D55430+public+4cf420cdda71e8db@reviews.llvm.org</a>; <a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>; Stella Stamenova <<a href="mailto:stilis@microsoft.com" target="_blank">stilis@microsoft.com</a>><br>
Cc: <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>; <a href="mailto:joker.eph@gmail.com" target="_blank">joker.eph@gmail.com</a>; <a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>; <a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
Subject: Re: [PATCH] D55430: build.py: Implement "gcc" builder<br>
<br>
On 14/12/2018 20:32, Stella Stamenova via Phabricator wrote:<br>
> stella.stamenova added a comment.<br>
> <br>
> I am trying to use the new builder to build the lldb-mi tests, so that they can start consistently passing on Windows, so they're now using the gcc builder on Linux and failing:<br>
<br>
Interesting. Can you run the script in verbose mode so I can see the exact commands it executes?<br>
<br>
Not being able to find the linker is weird. Can you check whether you have /usr/bin/ld on your system? Maybe we need to add something to the PATH? Is that clang binary capable of producing executables when you run it manually?<br>
</blockquote></div>