[MacPorts] #57198: libgcc8: build fails when libunwind-headers is installed

MacPorts noreply at macports.org
Tue Jun 18 01:51:57 UTC 2019


#57198: libgcc8: build fails when libunwind-headers is installed
----------------------+--------------------
  Reporter:  miken32  |      Owner:  (none)
      Type:  defect   |     Status:  new
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:  2.5.3
Resolution:           |   Keywords:
      Port:  libgcc8  |
----------------------+--------------------

Comment (by Jahrme):

 Is there any direction for resolving the issue here?

 This appears to be a fairly egregious issue as it is not possible to build
 {{{gcc5}}}, {{{gcc6}}}, {{{gcc7}}}, or {{{gcc8}}} from source without
 intervention. With a fresh install of MacPorts into a custom directory,
 attempting to install {{{gcc8}}} fails with the following message:
 {{{
 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 configure libgcc9: libunwind-headers is active
 Error: See
 /opt/mp-2.5.4/var/macports/logs/_opt_mp-2.5.4_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 gcc8 failed
 }}}

 This can be reproduced by running the following shell script:
 {{{
 #!/bin/sh

 mp_version=2.5.4
 mp_prefix=/opt/mp-${mp_version}

 # Download and install MacPorts.
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 curl -L -s
 https://distfiles.macports.org/MacPorts/MacPorts-${mp_version}.tar.bz2 |
 tar xf -
 cd MacPorts-${mp_version}
 ./configure --without-startupitems --prefix=${mp_prefix} --with-
 applications-dir=${mp_prefix}/Applications
 make
 sudo make install

 # Update and install gcc8.
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin:${mp_prefix}/bin
 sudo port selfupdate
 sudo port install gcc8
 }}}

 The cause appears to be a result of conflicting dependencies.
 First, {{{libgcc9}}} is a dependency of {{{gcc5}}}, {{{gcc6}}},
 {{{gcc7}}}, and {{{gcc8}}}.
 Second, {{{libgcc9}}} depends on {{{cctools}}} which depends on
 {{{libunwind-headers}}}.
 Finally, the {{{Portfile}}} for {{{libgcc9}}} specifies a
 {{{conflicts_build}}} conflict with {{{libunwind-headers}}}.

 In scripted situations, it seems that there are two relatively simple
 solutions.

 First, pass the {{{+xcode}}} variant which will cause the use of Xcode
 {{{cctools}}} instead of MacPorts built {{{cctools}}}.
 This will prevent the current issue as well as greatly reducing the
 dependency graph (see the two attached PDFs), but this emits a warning and
 is suggested against in the {{{Portfile}}} for {{{gcc9}}} (where
 {{{libgcc9}}} is defined).

 Second, install {{{gcc8}}} (or others) in multiple steps; for example,
 instead of running {{{sudo port install gcc8}}} a user would run:
 {{{
 sudo port install cctools
 sudo port uninstall libunwind-headers
 sudo port install gcc8
 }}}

 I do not know the proper resolution; perhaps there needs to be a mechanism
 that allows for the deactivation of a port during install.
 This would require checks that the port being deactivated is not currently
 "in use".

 Attached are the dependency graphs for {{{gcc8}}} and {{{gcc8 +xcode}}}
 which illustrate the dependencies discussed above.

-- 
Ticket URL: <https://trac.macports.org/ticket/57198#comment:15>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list