Opened 6 years ago
Closed 6 years ago
#57356 closed defect (worksforme)
libgcc8 @8.2.0.1 fails to build when binutils is installed
Reported by: | p-vitt (pvitt) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.5.4 |
Keywords: | Cc: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), rlhamil | |
Port: | libgcc8 |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I just updated my OS to 10.14 Mojave and followed the Migration process described in the wiki. Three Mac Minis succeeded, but the first MacBook somehow failed:
Error: Failed to build libgcc8: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/libgcc8/main.log for details.
In main.log it says:
:info:build checking for C compiler default output file name...- :info:build configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/libgcc8/work/build/x86_64-apple-darwin18/libgomp': :info:build configure: error: C compiler cannot create executables :info:build See `config.log' for more details. :info:build make[2]: *** [configure-stage1-target-libgomp] Error 77
In libgomp's config.log, it says error: unrecognized command line option '-V'
or error: unrecognized command line option '-qversion'; did you mean '--version'
or error: C compiler cannot create executables
.
I reinstalled XCode, accepted the license, checked the Command Line Tools, everything is fine. I also tried a binary install, without success. port install -b libgcc8
fails with 404 on all probed sources.
Then I tried to install gcc7, but this also depends on libgcc8. Uninstalling libunwind doesn't help. I also had a look at some older tickets, without success.
Right now, I have no clue how to proceed. Any help appreciated.
P.S. the mail.log is too big to attach. Is this file also helpful? Then I'll try to strip some lines off the middle.
Attachments (1)
Change History (13)
Changed 6 years ago by p-vitt (pvitt)
Attachment: | config.log added |
---|
comment:1 Changed 6 years ago by p-vitt (pvitt)
Description: | modified (diff) |
---|
comment:2 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Cc: | MarcusCalhoun-Lopez added |
---|
comment:3 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
comment:4 Changed 6 years ago by p-vitt (pvitt)
Thanks for the fast reply.
/opt/local/bin/gnm is provided by: binutils
I'll give it a try with disabled binutils right now. Accordings to the time it is already (and still) running, this seems to have done the trick. Also tailing the main.log looks promising. Thanks a lot.
So, question is: Was this my fault? Could I somehow have prevented or foreseen this?
comment:5 Changed 6 years ago by kencu (Ken)
binutils
is quite well known to cause build issues:
$ port notes binutils binutils has the following notes: Having binutils installed will cause some other ports to fail to build. Consider uninstalling binutils.
we should make it a conflicts_build
for all the gcc ports, most likely.
comment:6 Changed 6 years ago by michaelld (Michael Dickens)
Ah yes. "gnm" == "GNU nm". I guess since we're building GCC (and, past the bootstrap phase where Clang would be used) it shouldn't be a surprise that "gnm" is searched for & used if found LOL. Guessing since this issue is during configuration that there's probably a relatively simple patch that would fix this configure script (/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/libgcc8/work/gcc-8.2.0/libgomp/configure
) -- e.g., "don't search for "gnm" , just "nm" ... might be worth exploring, since we never want to use MP binutils ...
comment:7 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
comment:8 Changed 6 years ago by rlhamil
Cc: | rlhamil added |
---|
comment:9 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | mojave removed |
---|---|
Summary: | libgcc8 @8.2.0.1 fails to build on Mojave with "C compiler cannot create executables" → libgcc8 @8.2.0.1 fails to build when binutils is installed |
comment:10 follow-up: 11 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Unfortunately, I cannot reproduce this error, even when binutils installed.
I am not even sure how gnm can be found.
Can this be closed as worksforme?
comment:11 follow-up: 12 Changed 6 years ago by p-vitt (pvitt)
Replying to MarcusCalhoun-Lopez:
Can this be closed as worksforme?
After uninstalling binutils, I was able to successfully install libgcc. Sorry for not mentioning here. Due to some issues I forgot about this ticket.
comment:12 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Replying to p-vitt:
After uninstalling binutils, I was able to successfully install libgcc. Sorry for not mentioning here. Due to some issues I forgot about this ticket.
Thanks for the update.
It is important to see the main.log file.
You could always try compressing it before uploading.
However, just looking at the config.log, the presence of
/opt/local/bin/gnm
seems a little strange.I do not have that installed on my system.
What is the result of
port provides /opt/local/bin/gnm
?Just as a first step, you might want to deactivate whatever port is providing
gnm
, cleanlibgcc8
, and try installinglibgcc8
again.