GNU ld aborted for internal error when building LLVM












0














When I tried to build LLVM 8 using gcc tool chains, some problems happened. First ld was killed, and as the build skipped this failure and continued, ld aborted itself with an internal error. Given a situation like this, what should I do to solve the problem and build LLVM successfully? It is known that LLVM demands a great deal of the host compiler.



Below I try to provide as detailed configuration as possible:




  • Host machine: Ubuntu 18.04.1 LTS bionic

  • LLVM version: 8, obtained with command:

    git clone https://git.llvm.org/git/llvm.git/


  • ld version: 2.30

  • gcc version: 7.3.0

  • cmake version: 3.10.2

  • ninja version: 1.8.2 (I am using it in place of Unix Makefile)


  • cmake command used:

    cmake -DCMAKE_INSTALL_PREFIX=$HOME -DLLVM_TARGETS_TO_BUILD="Mips;X86" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_OPTIMIZED_TABLEGEN=1 -G Ninja ..



    [2/305] Linking CXX executable bin/llc
    FAILED: bin/llc
    collect2: fatal error: ld terminated with signal 9 [Killed]
    compilation terminated.
    [5/305] Linking CXX executable bin/bugpoint
    FAILED: bin/bugpoint
    collect2: fatal error: ld terminated with signal 9 [Killed]
    compilation terminated.
    [6/305] Linking CXX executable bin/dsymutil
    FAILED: bin/dsymutil
    /usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.30 internal error, aborting at ../../bfd/merge.c:912 in _bfd_merged_section_offset

    /usr/bin/ld: Please report this bug.

    collect2: error: ld returned 1 exit status
    [7/305] Linking CXX executable bin/lli
    ninja: build stopped: subcommand failed.



I deleted the long lines of static libraries of LLVM to shorten the log message. I haven't met such an event before, namely Internal Compiler Error. Anyone tell me what should I do, after mailing a bug report? Should I change tool chains to clang? But doesn't it use ld after all?










share|improve this question






















  • I am now trying another approach -- using apt to get binaries instead of building from sources. When I succeed, I might close this question.
    – Cong Feng
    Nov 30 at 11:43
















0














When I tried to build LLVM 8 using gcc tool chains, some problems happened. First ld was killed, and as the build skipped this failure and continued, ld aborted itself with an internal error. Given a situation like this, what should I do to solve the problem and build LLVM successfully? It is known that LLVM demands a great deal of the host compiler.



Below I try to provide as detailed configuration as possible:




  • Host machine: Ubuntu 18.04.1 LTS bionic

  • LLVM version: 8, obtained with command:

    git clone https://git.llvm.org/git/llvm.git/


  • ld version: 2.30

  • gcc version: 7.3.0

  • cmake version: 3.10.2

  • ninja version: 1.8.2 (I am using it in place of Unix Makefile)


  • cmake command used:

    cmake -DCMAKE_INSTALL_PREFIX=$HOME -DLLVM_TARGETS_TO_BUILD="Mips;X86" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_OPTIMIZED_TABLEGEN=1 -G Ninja ..



    [2/305] Linking CXX executable bin/llc
    FAILED: bin/llc
    collect2: fatal error: ld terminated with signal 9 [Killed]
    compilation terminated.
    [5/305] Linking CXX executable bin/bugpoint
    FAILED: bin/bugpoint
    collect2: fatal error: ld terminated with signal 9 [Killed]
    compilation terminated.
    [6/305] Linking CXX executable bin/dsymutil
    FAILED: bin/dsymutil
    /usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.30 internal error, aborting at ../../bfd/merge.c:912 in _bfd_merged_section_offset

    /usr/bin/ld: Please report this bug.

    collect2: error: ld returned 1 exit status
    [7/305] Linking CXX executable bin/lli
    ninja: build stopped: subcommand failed.



I deleted the long lines of static libraries of LLVM to shorten the log message. I haven't met such an event before, namely Internal Compiler Error. Anyone tell me what should I do, after mailing a bug report? Should I change tool chains to clang? But doesn't it use ld after all?










share|improve this question






















  • I am now trying another approach -- using apt to get binaries instead of building from sources. When I succeed, I might close this question.
    – Cong Feng
    Nov 30 at 11:43














0












0








0







When I tried to build LLVM 8 using gcc tool chains, some problems happened. First ld was killed, and as the build skipped this failure and continued, ld aborted itself with an internal error. Given a situation like this, what should I do to solve the problem and build LLVM successfully? It is known that LLVM demands a great deal of the host compiler.



Below I try to provide as detailed configuration as possible:




  • Host machine: Ubuntu 18.04.1 LTS bionic

  • LLVM version: 8, obtained with command:

    git clone https://git.llvm.org/git/llvm.git/


  • ld version: 2.30

  • gcc version: 7.3.0

  • cmake version: 3.10.2

  • ninja version: 1.8.2 (I am using it in place of Unix Makefile)


  • cmake command used:

    cmake -DCMAKE_INSTALL_PREFIX=$HOME -DLLVM_TARGETS_TO_BUILD="Mips;X86" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_OPTIMIZED_TABLEGEN=1 -G Ninja ..



    [2/305] Linking CXX executable bin/llc
    FAILED: bin/llc
    collect2: fatal error: ld terminated with signal 9 [Killed]
    compilation terminated.
    [5/305] Linking CXX executable bin/bugpoint
    FAILED: bin/bugpoint
    collect2: fatal error: ld terminated with signal 9 [Killed]
    compilation terminated.
    [6/305] Linking CXX executable bin/dsymutil
    FAILED: bin/dsymutil
    /usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.30 internal error, aborting at ../../bfd/merge.c:912 in _bfd_merged_section_offset

    /usr/bin/ld: Please report this bug.

    collect2: error: ld returned 1 exit status
    [7/305] Linking CXX executable bin/lli
    ninja: build stopped: subcommand failed.



I deleted the long lines of static libraries of LLVM to shorten the log message. I haven't met such an event before, namely Internal Compiler Error. Anyone tell me what should I do, after mailing a bug report? Should I change tool chains to clang? But doesn't it use ld after all?










share|improve this question













When I tried to build LLVM 8 using gcc tool chains, some problems happened. First ld was killed, and as the build skipped this failure and continued, ld aborted itself with an internal error. Given a situation like this, what should I do to solve the problem and build LLVM successfully? It is known that LLVM demands a great deal of the host compiler.



Below I try to provide as detailed configuration as possible:




  • Host machine: Ubuntu 18.04.1 LTS bionic

  • LLVM version: 8, obtained with command:

    git clone https://git.llvm.org/git/llvm.git/


  • ld version: 2.30

  • gcc version: 7.3.0

  • cmake version: 3.10.2

  • ninja version: 1.8.2 (I am using it in place of Unix Makefile)


  • cmake command used:

    cmake -DCMAKE_INSTALL_PREFIX=$HOME -DLLVM_TARGETS_TO_BUILD="Mips;X86" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_OPTIMIZED_TABLEGEN=1 -G Ninja ..



    [2/305] Linking CXX executable bin/llc
    FAILED: bin/llc
    collect2: fatal error: ld terminated with signal 9 [Killed]
    compilation terminated.
    [5/305] Linking CXX executable bin/bugpoint
    FAILED: bin/bugpoint
    collect2: fatal error: ld terminated with signal 9 [Killed]
    compilation terminated.
    [6/305] Linking CXX executable bin/dsymutil
    FAILED: bin/dsymutil
    /usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.30 internal error, aborting at ../../bfd/merge.c:912 in _bfd_merged_section_offset

    /usr/bin/ld: Please report this bug.

    collect2: error: ld returned 1 exit status
    [7/305] Linking CXX executable bin/lli
    ninja: build stopped: subcommand failed.



I deleted the long lines of static libraries of LLVM to shorten the log message. I haven't met such an event before, namely Internal Compiler Error. Anyone tell me what should I do, after mailing a bug report? Should I change tool chains to clang? But doesn't it use ld after all?







software-installation compiling ld






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 30 at 11:03









Cong Feng

11




11












  • I am now trying another approach -- using apt to get binaries instead of building from sources. When I succeed, I might close this question.
    – Cong Feng
    Nov 30 at 11:43


















  • I am now trying another approach -- using apt to get binaries instead of building from sources. When I succeed, I might close this question.
    – Cong Feng
    Nov 30 at 11:43
















I am now trying another approach -- using apt to get binaries instead of building from sources. When I succeed, I might close this question.
– Cong Feng
Nov 30 at 11:43




I am now trying another approach -- using apt to get binaries instead of building from sources. When I succeed, I might close this question.
– Cong Feng
Nov 30 at 11:43















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1097389%2fgnu-ld-aborted-for-internal-error-when-building-llvm%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1097389%2fgnu-ld-aborted-for-internal-error-when-building-llvm%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?