Ah, yes, it does. It looks like it does contain /usr/bin.

Script Arguments:
  Arch: 64
  Compiler: any
  Outdir: 
/vstsdrive/_work/42/b/LLVMBuild/tools/lldb/lit/tools/lldb-mi/exec/Output
  Output: 
/vstsdrive/_work/42/b/LLVMBuild/tools/lldb/lit/tools/lldb-mi/exec/Output/exec-next-instruction.test.tmp
  Nodefaultlib: True
  Opt: none
  Mode: compile-and-link
  Clean: True
  Verbose: True
  Dryrun: False
  Inputs: 
/vstsdrive/_work/42/s/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/main.c
Script Environment:
    LANG = en_US.UTF-8
    TERM = xterm
    SHELL = /bin/bash
    LESSCLOSE = /usr/bin/lesspipe %s %s
    XDG_RUNTIME_DIR = /run/user/1000
    SHLVL = 1
    SSH_TTY = /dev/pts/0
    OLDPWD = /vstsdrive/_work/42/b
    PWD = /vstsdrive/_work/42/b/LLVMBuild
    LESSOPEN = | /usr/bin/lesspipe %s
    XDG_DATA_DIRS = /usr/local/share
                    /usr/share
                    /var/lib/snapd/desktop
    SSH_CLIENT = 10.137.82.74 60442 22
    LOGNAME = e2admin
    USER = e2admin
    PATH = /home/e2admin/bin
           /home/e2admin/.local/bin
           /usr/local/sbin
           /usr/local/bin
           /usr/sbin
           /usr/bin
           /sbin
           /bin
           /usr/games
           /usr/local/games
           /snap/bin
    HOME = /home/e2admin
    MAIL = /var/mail/e2admin

From: Zachary Turner <[email protected]>
Sent: Friday, December 14, 2018 11:56 AM
To: Stella Stamenova <[email protected]>
Cc: Pavel Labath <[email protected]>; 
[email protected]; 
[email protected]; [email protected]; [email protected]; 
[email protected]
Subject: Re: [PATCH] D55430: build.py: Implement "gcc" builder

Don't we print the environment in verbose mode?  Can we see that output as well?

On Fri, Dec 14, 2018 at 11:53 AM Stella Stamenova 
<[email protected]<mailto:[email protected]>> wrote:
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.


compiling main.c -> exec-next-instruction.test.tmp-main.o
  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
  Env:
  STDOUT:




linking exec-next-instruction.test.tmp-main.o -> exec-next-instruction.test.tmp
  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
  Env:
  STDOUT:

  STDERR:
    clang-8: error: unable to execute command: Executable "ld" doesn't exist!
    clang-8: error: linker command failed with exit code 1 (use -v to see 
invocation)



-----Original Message-----
From: Pavel Labath <[email protected]<mailto:[email protected]>>
Sent: Friday, December 14, 2018 11:48 AM
To: 
[email protected]<mailto:reviews%2bd55430%2bpublic%[email protected]>;
 [email protected]<mailto:[email protected]>; Stella Stamenova 
<[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>
Subject: Re: [PATCH] D55430: build.py: Implement "gcc" builder

On 14/12/2018 20:32, Stella Stamenova via Phabricator wrote:
> stella.stamenova added a comment.
>
> 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:

Interesting. Can you run the script in verbose mode so I can see the exact 
commands it executes?

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?
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to