[Lldb-commits] [PATCH] D55430: build.py: Implement "gcc" builder

Stella Stamenova via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 14 11:59:09 PST 2018


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 <zturner at google.com>
Sent: Friday, December 14, 2018 11:56 AM
To: Stella Stamenova <stilis at microsoft.com>
Cc: Pavel Labath <pavel at labath.sk>; reviews+D55430+public+4cf420cdda71e8db at reviews.llvm.org; llvm-commits at lists.llvm.org; joker.eph at gmail.com; dexonsmith at apple.com; lldb-commits at lists.llvm.org
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 <stilis at microsoft.com<mailto:stilis at microsoft.com>> 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 <pavel at labath.sk<mailto:pavel at labath.sk>>
Sent: Friday, December 14, 2018 11:48 AM
To: reviews+D55430+public+4cf420cdda71e8db at reviews.llvm.org<mailto:reviews%2BD55430%2Bpublic%2B4cf420cdda71e8db at reviews.llvm.org>; zturner at google.com<mailto:zturner at google.com>; Stella Stamenova <stilis at microsoft.com<mailto:stilis at microsoft.com>>
Cc: llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>; joker.eph at gmail.com<mailto:joker.eph at gmail.com>; dexonsmith at apple.com<mailto:dexonsmith at apple.com>; lldb-commits at lists.llvm.org<mailto:lldb-commits at lists.llvm.org>
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181214/8b3b6848/attachment-0001.html>


More information about the lldb-commits mailing list