<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Ah, yes, it does. It looks like it does contain /usr/bin.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Script Arguments:<o:p></o:p></p>
<p class="MsoNormal">  Arch: 64<o:p></o:p></p>
<p class="MsoNormal">  Compiler: any<o:p></o:p></p>
<p class="MsoNormal">  Outdir: /vstsdrive/_work/42/b/LLVMBuild/tools/lldb/lit/tools/lldb-mi/exec/Output<o:p></o:p></p>
<p class="MsoNormal">  Output: /vstsdrive/_work/42/b/LLVMBuild/tools/lldb/lit/tools/lldb-mi/exec/Output/exec-next-instruction.test.tmp<o:p></o:p></p>
<p class="MsoNormal">  Nodefaultlib: True<o:p></o:p></p>
<p class="MsoNormal">  Opt: none<o:p></o:p></p>
<p class="MsoNormal">  Mode: compile-and-link<o:p></o:p></p>
<p class="MsoNormal">  Clean: True<o:p></o:p></p>
<p class="MsoNormal">  Verbose: True<o:p></o:p></p>
<p class="MsoNormal">  Dryrun: False<o:p></o:p></p>
<p class="MsoNormal">  Inputs: /vstsdrive/_work/42/s/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/main.c<o:p></o:p></p>
<p class="MsoNormal">Script Environment:<o:p></o:p></p>
<p class="MsoNormal">    LANG = en_US.UTF-8<o:p></o:p></p>
<p class="MsoNormal">    TERM = xterm<o:p></o:p></p>
<p class="MsoNormal">    SHELL = /bin/bash<o:p></o:p></p>
<p class="MsoNormal">    LESSCLOSE = /usr/bin/lesspipe %s %s<o:p></o:p></p>
<p class="MsoNormal">    XDG_RUNTIME_DIR = /run/user/1000<o:p></o:p></p>
<p class="MsoNormal">    SHLVL = 1<o:p></o:p></p>
<p class="MsoNormal">    SSH_TTY = /dev/pts/0<o:p></o:p></p>
<p class="MsoNormal">    OLDPWD = /vstsdrive/_work/42/b<o:p></o:p></p>
<p class="MsoNormal">    PWD = /vstsdrive/_work/42/b/LLVMBuild<o:p></o:p></p>
<p class="MsoNormal">    LESSOPEN = | /usr/bin/lesspipe %s<o:p></o:p></p>
<p class="MsoNormal">    XDG_DATA_DIRS = /usr/local/share<o:p></o:p></p>
<p class="MsoNormal">                    /usr/share<o:p></o:p></p>
<p class="MsoNormal">                    /var/lib/snapd/desktop<o:p></o:p></p>
<p class="MsoNormal">    SSH_CLIENT = 10.137.82.74 60442 22<o:p></o:p></p>
<p class="MsoNormal">    LOGNAME = e2admin<o:p></o:p></p>
<p class="MsoNormal">    USER = e2admin<o:p></o:p></p>
<p class="MsoNormal">    PATH = /home/e2admin/bin<o:p></o:p></p>
<p class="MsoNormal">           /home/e2admin/.local/bin<o:p></o:p></p>
<p class="MsoNormal">           /usr/local/sbin<o:p></o:p></p>
<p class="MsoNormal">           /usr/local/bin<o:p></o:p></p>
<p class="MsoNormal">           /usr/sbin<o:p></o:p></p>
<p class="MsoNormal">           <span style="background:yellow;mso-highlight:yellow">
/usr/bin</span><o:p></o:p></p>
<p class="MsoNormal">           /sbin<o:p></o:p></p>
<p class="MsoNormal">           /bin<o:p></o:p></p>
<p class="MsoNormal">           /usr/games<o:p></o:p></p>
<p class="MsoNormal">           /usr/local/games<o:p></o:p></p>
<p class="MsoNormal">           /snap/bin<o:p></o:p></p>
<p class="MsoNormal">    HOME = /home/e2admin<o:p></o:p></p>
<p class="MsoNormal">    MAIL = /var/mail/e2admin<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From:</b> Zachary Turner <zturner@google.com> <br>
<b>Sent:</b> Friday, December 14, 2018 11:56 AM<br>
<b>To:</b> Stella Stamenova <stilis@microsoft.com><br>
<b>Cc:</b> Pavel Labath <pavel@labath.sk>; reviews+D55430+public+4cf420cdda71e8db@reviews.llvm.org; llvm-commits@lists.llvm.org; joker.eph@gmail.com; dexonsmith@apple.com; lldb-commits@lists.llvm.org<br>
<b>Subject:</b> Re: [PATCH] D55430: build.py: Implement "gcc" builder<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Don't we print the environment in verbose mode?  Can we see that output as well?<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, Dec 14, 2018 at 11:53 AM Stella Stamenova <<a href="mailto:stilis@microsoft.com">stilis@microsoft.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">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?<o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>