Linker error while compiling GCC 8.2.0 related to libmpfr.so
I'm trying to compile GCC from scratch like I used to do when I used Linux a lot, I'm trying to install Sourcemage but the compiler version of GCC is 4.6 and the latest version is 8.2.0, so I compiled everything needed to compile GCC from scratch, and everything is going well while compiling the compiler until the very end when it starts giving me a linker error related to libmpfr.so:
Here's what I get when I do my typical make -j3:
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/lto/Make-lang.in:81: lto1] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/c/Make-lang.in:85: cc1] Error 1
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/cp/Make-lang.in:120: cc1plus] Error 1
make[2]: *** [Makefile:4657: all-stage2-gcc] Error 2
make[1]: *** [Makefile:22203: stage2-bubble] Error 2
make: *** [Makefile:944: all] Error 2
If you want to look at the full output of the error then I provide a pastebin: https://pastebin.com/g5sn3jDv
c++ c gcc mpfr
add a comment |
I'm trying to compile GCC from scratch like I used to do when I used Linux a lot, I'm trying to install Sourcemage but the compiler version of GCC is 4.6 and the latest version is 8.2.0, so I compiled everything needed to compile GCC from scratch, and everything is going well while compiling the compiler until the very end when it starts giving me a linker error related to libmpfr.so:
Here's what I get when I do my typical make -j3:
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/lto/Make-lang.in:81: lto1] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/c/Make-lang.in:85: cc1] Error 1
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/cp/Make-lang.in:120: cc1plus] Error 1
make[2]: *** [Makefile:4657: all-stage2-gcc] Error 2
make[1]: *** [Makefile:22203: stage2-bubble] Error 2
make: *** [Makefile:944: all] Error 2
If you want to look at the full output of the error then I provide a pastebin: https://pastebin.com/g5sn3jDv
c++ c gcc mpfr
Having compiled gcc before, a long time ago, there isn't, unfortunately, a magic button one can push to make this linking error go away. If i were doing this, my next step would be to figure out which library defines this symbol -- whether something that gets installed by gcc, or an existing system library -- and then pour through gcc's build script and makefile in order to figure out why it's not being linked correctly. That's what you'll have to do, and, the only thing I can say: good luck.
– Sam Varshavchik
Nov 24 '18 at 4:15
are you sure you installed all required dependencies to build gcc? it seems likelibgmpmight be missing...
– Silmathoron
Nov 24 '18 at 16:18
Oddly enough, I tried reinstalling libgmp from source (Might have forgotten that beforehand) and I also added --disable-bootstrap to the configuration so not only was it much faster to compile the thing but it also worked, but I have no clue what triggered it to work, my best guess is that I missed libgmp rather than the --disable-bootstrap option, either ways thank you
– AllfadiR
Nov 24 '18 at 20:42
Your pastebin doesn't contain any error. But it seems that your GMP was much too old and did not providempn_com, which is needed by MPFR. Iflibgmpwas simply missing (or not found), you would have got an error earlier. Actually that's strange, because there's a check of the GMP version in MPFR'sconfigure.ac.
– vinc17
Nov 25 '18 at 10:27
add a comment |
I'm trying to compile GCC from scratch like I used to do when I used Linux a lot, I'm trying to install Sourcemage but the compiler version of GCC is 4.6 and the latest version is 8.2.0, so I compiled everything needed to compile GCC from scratch, and everything is going well while compiling the compiler until the very end when it starts giving me a linker error related to libmpfr.so:
Here's what I get when I do my typical make -j3:
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/lto/Make-lang.in:81: lto1] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/c/Make-lang.in:85: cc1] Error 1
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/cp/Make-lang.in:120: cc1plus] Error 1
make[2]: *** [Makefile:4657: all-stage2-gcc] Error 2
make[1]: *** [Makefile:22203: stage2-bubble] Error 2
make: *** [Makefile:944: all] Error 2
If you want to look at the full output of the error then I provide a pastebin: https://pastebin.com/g5sn3jDv
c++ c gcc mpfr
I'm trying to compile GCC from scratch like I used to do when I used Linux a lot, I'm trying to install Sourcemage but the compiler version of GCC is 4.6 and the latest version is 8.2.0, so I compiled everything needed to compile GCC from scratch, and everything is going well while compiling the compiler until the very end when it starts giving me a linker error related to libmpfr.so:
Here's what I get when I do my typical make -j3:
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/lto/Make-lang.in:81: lto1] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/c/Make-lang.in:85: cc1] Error 1
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/cp/Make-lang.in:120: cc1plus] Error 1
make[2]: *** [Makefile:4657: all-stage2-gcc] Error 2
make[1]: *** [Makefile:22203: stage2-bubble] Error 2
make: *** [Makefile:944: all] Error 2
If you want to look at the full output of the error then I provide a pastebin: https://pastebin.com/g5sn3jDv
c++ c gcc mpfr
c++ c gcc mpfr
asked Nov 24 '18 at 4:06
AllfadiRAllfadiR
1
1
Having compiled gcc before, a long time ago, there isn't, unfortunately, a magic button one can push to make this linking error go away. If i were doing this, my next step would be to figure out which library defines this symbol -- whether something that gets installed by gcc, or an existing system library -- and then pour through gcc's build script and makefile in order to figure out why it's not being linked correctly. That's what you'll have to do, and, the only thing I can say: good luck.
– Sam Varshavchik
Nov 24 '18 at 4:15
are you sure you installed all required dependencies to build gcc? it seems likelibgmpmight be missing...
– Silmathoron
Nov 24 '18 at 16:18
Oddly enough, I tried reinstalling libgmp from source (Might have forgotten that beforehand) and I also added --disable-bootstrap to the configuration so not only was it much faster to compile the thing but it also worked, but I have no clue what triggered it to work, my best guess is that I missed libgmp rather than the --disable-bootstrap option, either ways thank you
– AllfadiR
Nov 24 '18 at 20:42
Your pastebin doesn't contain any error. But it seems that your GMP was much too old and did not providempn_com, which is needed by MPFR. Iflibgmpwas simply missing (or not found), you would have got an error earlier. Actually that's strange, because there's a check of the GMP version in MPFR'sconfigure.ac.
– vinc17
Nov 25 '18 at 10:27
add a comment |
Having compiled gcc before, a long time ago, there isn't, unfortunately, a magic button one can push to make this linking error go away. If i were doing this, my next step would be to figure out which library defines this symbol -- whether something that gets installed by gcc, or an existing system library -- and then pour through gcc's build script and makefile in order to figure out why it's not being linked correctly. That's what you'll have to do, and, the only thing I can say: good luck.
– Sam Varshavchik
Nov 24 '18 at 4:15
are you sure you installed all required dependencies to build gcc? it seems likelibgmpmight be missing...
– Silmathoron
Nov 24 '18 at 16:18
Oddly enough, I tried reinstalling libgmp from source (Might have forgotten that beforehand) and I also added --disable-bootstrap to the configuration so not only was it much faster to compile the thing but it also worked, but I have no clue what triggered it to work, my best guess is that I missed libgmp rather than the --disable-bootstrap option, either ways thank you
– AllfadiR
Nov 24 '18 at 20:42
Your pastebin doesn't contain any error. But it seems that your GMP was much too old and did not providempn_com, which is needed by MPFR. Iflibgmpwas simply missing (or not found), you would have got an error earlier. Actually that's strange, because there's a check of the GMP version in MPFR'sconfigure.ac.
– vinc17
Nov 25 '18 at 10:27
Having compiled gcc before, a long time ago, there isn't, unfortunately, a magic button one can push to make this linking error go away. If i were doing this, my next step would be to figure out which library defines this symbol -- whether something that gets installed by gcc, or an existing system library -- and then pour through gcc's build script and makefile in order to figure out why it's not being linked correctly. That's what you'll have to do, and, the only thing I can say: good luck.
– Sam Varshavchik
Nov 24 '18 at 4:15
Having compiled gcc before, a long time ago, there isn't, unfortunately, a magic button one can push to make this linking error go away. If i were doing this, my next step would be to figure out which library defines this symbol -- whether something that gets installed by gcc, or an existing system library -- and then pour through gcc's build script and makefile in order to figure out why it's not being linked correctly. That's what you'll have to do, and, the only thing I can say: good luck.
– Sam Varshavchik
Nov 24 '18 at 4:15
are you sure you installed all required dependencies to build gcc? it seems like
libgmp might be missing...– Silmathoron
Nov 24 '18 at 16:18
are you sure you installed all required dependencies to build gcc? it seems like
libgmp might be missing...– Silmathoron
Nov 24 '18 at 16:18
Oddly enough, I tried reinstalling libgmp from source (Might have forgotten that beforehand) and I also added --disable-bootstrap to the configuration so not only was it much faster to compile the thing but it also worked, but I have no clue what triggered it to work, my best guess is that I missed libgmp rather than the --disable-bootstrap option, either ways thank you
– AllfadiR
Nov 24 '18 at 20:42
Oddly enough, I tried reinstalling libgmp from source (Might have forgotten that beforehand) and I also added --disable-bootstrap to the configuration so not only was it much faster to compile the thing but it also worked, but I have no clue what triggered it to work, my best guess is that I missed libgmp rather than the --disable-bootstrap option, either ways thank you
– AllfadiR
Nov 24 '18 at 20:42
Your pastebin doesn't contain any error. But it seems that your GMP was much too old and did not provide
mpn_com, which is needed by MPFR. If libgmp was simply missing (or not found), you would have got an error earlier. Actually that's strange, because there's a check of the GMP version in MPFR's configure.ac.– vinc17
Nov 25 '18 at 10:27
Your pastebin doesn't contain any error. But it seems that your GMP was much too old and did not provide
mpn_com, which is needed by MPFR. If libgmp was simply missing (or not found), you would have got an error earlier. Actually that's strange, because there's a check of the GMP version in MPFR's configure.ac.– vinc17
Nov 25 '18 at 10:27
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53455061%2flinker-error-while-compiling-gcc-8-2-0-related-to-libmpfr-so%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53455061%2flinker-error-while-compiling-gcc-8-2-0-related-to-libmpfr-so%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Having compiled gcc before, a long time ago, there isn't, unfortunately, a magic button one can push to make this linking error go away. If i were doing this, my next step would be to figure out which library defines this symbol -- whether something that gets installed by gcc, or an existing system library -- and then pour through gcc's build script and makefile in order to figure out why it's not being linked correctly. That's what you'll have to do, and, the only thing I can say: good luck.
– Sam Varshavchik
Nov 24 '18 at 4:15
are you sure you installed all required dependencies to build gcc? it seems like
libgmpmight be missing...– Silmathoron
Nov 24 '18 at 16:18
Oddly enough, I tried reinstalling libgmp from source (Might have forgotten that beforehand) and I also added --disable-bootstrap to the configuration so not only was it much faster to compile the thing but it also worked, but I have no clue what triggered it to work, my best guess is that I missed libgmp rather than the --disable-bootstrap option, either ways thank you
– AllfadiR
Nov 24 '18 at 20:42
Your pastebin doesn't contain any error. But it seems that your GMP was much too old and did not provide
mpn_com, which is needed by MPFR. Iflibgmpwas simply missing (or not found), you would have got an error earlier. Actually that's strange, because there's a check of the GMP version in MPFR'sconfigure.ac.– vinc17
Nov 25 '18 at 10:27