software installation – GNU ld interrupted for an internal error when building LLVM

When I tried to build LLVM 8 with the help of gcc tool chains, some problems occurred. First ld was killed, and as the construction jumped that failure and continued, ld it's aborted with an internal error. In a situation like this, what should I do to solve the problem and build LLVM successfully? We know that LLVM requires a lot of the host compiler.

I'm trying below to provide a configuration as detailed as possible:

  • Host machine: Ubuntu 18.04.1 LTS bionic
  • LLVM version: 8, obtained with the command:

    clone git
  • version ld: 2.30
  • gcc version: 7.3.0
  • cmake version: 3.10.2
  • ninja version: 1.8.2 (I use it instead of Unix Makefile)
  • Cmake command used:


    [2/305]    Linking the CXX / llc executable
    FAILED: bin / llc
    collect2: fatal error: ld s is terminated with signal 9 [Killed]
    compilation completed.
    [5/305] Bind CXX Executable Bin / Bug Point
    FAILED: bin / bugpoint
    collect2: fatal error: ld s is terminated with signal 9 [Killed]
    compilation completed.
    [6/305] Linking the CXX / dsymutil executable
    FAILED: bin / dsymutil
    / usr / bin / ld: BFD (GNU Binutils for Ubuntu) 2.30 internal error, abort at ../../bfd/merge.c:912 in _bfd_merged_section_offset
    / usr / bin / ld: Please report this bug.
    collect2: error: ld returned 1 output status
    [7/305] Linking the CXX / lli executable
    ninja: build stopped: the subcommand failed.

I've deleted the long lines of the LLVM static libraries to shorten the log message. I have never encountered such an event before, ie Compiler Internal Error. Someone tells me what I should do after sending a bug report? Do I need to change the toolchains for noise? But does not he use it? ld after all?