[llvm-dev] LLVM 3.9.1 build race?

Justin Bogner via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 25 10:31:05 PST 2017


"Belal, Awais via llvm-dev" <llvm-dev at lists.llvm.org> writes:
> I am building LLVM 3.9.1 using the Yocto build system for a cross
> build. The compiled bins/libs work totally fine on the target machine
> however there seems to be an intermittent race condition during the
> build which causes a build failure. On the failed builds I usually see
> things being linking/compiling twice e.g.
 ...
> and from the above mentioned example the build failed with
>
>
> ../../lib/libLLVMSupport.a(Process.cpp.o): In function
> `llvm::sys::Process::GetRandomNumber()':
> Process.cpp:(.text._ZN4llvm3sys7Process15GetRandomNumberEv+0x70):
> undefined reference to `llvm::sys::TimeValue::now()'
> collect2: error: ld returned 1 exit status

This looks like something I fixed recently, in r290271:

  commit 8bddda3652b36619cc8cd916c33d38c9cd41f024
  Author: Justin Bogner <mail at justinbogner.com>
  Date:   Wed Dec 21 21:19:00 2016 +0000

    cmake: Don't build llvm-config and tblgen concurrently in cross builds

    This sets USES_TERMINAL for the native llvm-config build, so that it
    doesn't run at the same time as builds of other native tools (namely,
    tablegen). Without this, if you're very unlucky with the timing it's
    possible to be relinking libSupport as one of the tools is linking,
    causing a spurious failure.

    The tablegen build adopted USES_TERMINAL for this same reason in
    r280748.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290271 91177308-0d34-0410-b5e6-96231b3b80d8

Tom: if we do a 3.9.2, it's probably worth pulling this change in.

> I also see exactly 4 instances of "warning: jobserver unavailable:
> using -j1.  Add `+' to parent make rule." and this was reported at
> https://llvm.org/bugs/show_bug.cgi?format=multiple&id=23328 quite some
> time ago. Has there been any movement on this? Can the mentioned
> warning cause such a trouble? I doubt that because the warning appears
> in successful builds as well but I'd love to hear expert opinion on
> this.
>
>
> NATIVE builds are done for the host which is then utilized for
> generating the target binaries, correct? If that is so, what can cause
> multiple builds for the NATIVE system?
>
>
> We're building with CMake with the "Unix Makefiles" generator prior to
> this we were building 3.7.1 using autotools and never saw such an
> issue. GCC version is 5.4.0 on both instances with GNU Make at
> 4.1. Any pointers/help would be highly appreciated.
>
>
> BR,
> Awais
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list