Opened 5 years ago

Closed 5 years ago

Last modified 2 years ago

#59344 closed defect (invalid)

Error when compiling gcc9 with xcode11.1

Reported by: houzeaux Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port:

Description (last modified by cjones051073 (Chris Jones))

  1. Everything goes well with xcode11.0, but when installing gcc9 with xcode11.1 it fails (I followed exactly the migration procedure). I have the following:
sudo xcode-select --version => xcode-select version 2370.
xcrun --show-sdk-path => /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
  1. Then I tried to install gcc9
.....

Error: libgcc9 cannot be built while libunwind-headers is active.
Error: Please forcibly deactivate libunwind-headers, e.g. by running:
Error:
Error:     sudo port -f deactivate libunwind-headers
Error:
Error: Then try again. You can reactivate libunwind-headers again later.
Error: Failed to build libgcc9: libunwind-headers is active
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc9/libgcc9/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port gcc9 failed
  1. I desactivated libunwind-headers
houzeaux:/Users/houzeaux/Desktop % sudo port -f deactivate libunwind-headers
Password:
--->  Deactivating libunwind-headers @5.0.1_0
--->  Cleaning libunwind-headers
  1. I reinstall gcc9 and get the following message:
sudo port install gcc9
--->  Computing dependencies for gcc9
The following dependencies will be installed:
 libgcc
 libgcc9
Continue? [Y/n]: Y
--->  Fetching archive for libgcc9
--->  Attempting to fetch libgcc9-9.2.0_1.darwin_19.x86_64.tbz2 from http://lil.fr.packages.macports.org/libgcc9
--->  Attempting to fetch libgcc9-9.2.0_1.darwin_19.x86_64.tbz2 from http://nue.de.packages.macports.org/libgcc9
--->  Attempting to fetch libgcc9-9.2.0_1.darwin_19.x86_64.tbz2 from https://packages.macports.org/libgcc9
--->  Building libgcc9
Error: Failed to build libgcc9: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc9/libgcc9/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port gcc9 failed
  1. I attach the log file

Attachments (1)

main.log.tar.gz (3.5 MB) - added by houzeaux 5 years ago.
log file obtained after trying to install gcc9

Change History (7)

Changed 5 years ago by houzeaux

Attachment: main.log.tar.gz added

log file obtained after trying to install gcc9

comment:1 Changed 5 years ago by cjones051073 (Chris Jones)

The build is not clean, the log has multiple instances of

:error:configure Please forcibly deactivate libunwind-headers, e.g. by running:
:error:configure     sudo port -f deactivate libunwind-headers
:error:configure Then try again. You can reactivate libunwind-headers again later.

please run

  sudo port sync
  sudo port -f deactivate libunwind-headers
  sudo port clean libgcc9
  sudo port install libgcc9

and post the log from that last step.

comment:2 Changed 5 years ago by cjones051073 (Chris Jones)

Description: modified (diff)

comment:3 Changed 5 years ago by houzeaux

Problem solved, thanks to all the team, the missing step in the following sequence was "sudo port clean libgcc9"! Ticket can be closed. sudo port sync sudo port -f deactivate libunwind-headers sudo port clean libgcc9 sudo port install libgcc9

comment:4 Changed 5 years ago by cjones051073 (Chris Jones)

Resolution: invalid
Status: newclosed

glad you have it working now. yes, cleaning a port build is always a good idea, when you are attempting rebuild following a previous failure. without it, you are liable to just rerun the same broken configuration.

comment:5 Changed 5 years ago by mf2k (Frank Schima)

Keywords: gcc9 xcode11.1 removed

comment:6 Changed 2 years ago by nik757

  1. updated to Monterey 3 Macs (intel)
  2. macports does not works with same problem - "Failed to build libgcc9"

nik757:~ root# sudo port sync ---> Updating the ports tree nik757:~ root# sudo port -f deactivate libunwind-headers nik757:~ root# sudo port clean libgcc9 ---> Cleaning libgcc9 nik757:~ root# sudo port install libgcc9 ---> Computing dependencies for libgcc9 ---> Cleaning libgcc9 ---> Scanning binaries for linking errors

[ ] 8.2 %Killed: 9

nik757:~ root# port upgrade outdated ---> Fetching archive for libgcc9 ---> Attempting to fetch libgcc9-9.4.0_0.darwin_21.x86_64.tbz2 from https://packages.macports.org/libgcc9 ---> Attempting to fetch libgcc9-9.4.0_0.darwin_21.x86_64.tbz2 from https://fra.de.packages.macports.org/libgcc9 ---> Attempting to fetch libgcc9-9.4.0_0.darwin_21.x86_64.tbz2 from https://cph.dk.packages.macports.org/libgcc9 ---> Computing dependencies for libgcc9 ---> Fetching distfiles for libgcc9 ---> Verifying checksums for libgcc9 ---> Extracting libgcc9 ---> Applying patches to libgcc9 ---> Configuring libgcc9 Warning: Applying '--without-build-config' workaround to Xcode none / CLT 13.2.0.0.1.1637719136 Warning: If versions > 12.5 please check if it is still required ---> Building libgcc9 Error: Failed to build libgcc9: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc9/libgcc9/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

Note: See TracTickets for help on using tickets.