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)

config.log (18.0 KB) - added by p-vitt (pvitt) 6 years ago.

Download all attachments as: .zip

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)

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, clean libgcc8, and try installing libgcc8 again.

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.

Last edited 6 years ago by kencu (Ken) (previous) (diff)

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 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 in reply to:  10 ; 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 in reply to:  11 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: worksforme
Status: newclosed

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.

Note: See TracTickets for help on using tickets.