[MacPorts] #73276: gn+universal: Fails on El Capitan 10.11.6

MacPorts noreply at macports.org
Thu Jul 16 09:00:21 UTC 2026


#73276: gn+universal: Fails on El Capitan 10.11.6
---------------------+-----------------------
  Reporter:  potmj   |      Owner:  (none)
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:  universal
      Port:  gn      |
---------------------+-----------------------

Comment (by PotMJ):

 Keword: haspatch

 I have successfully resolved this issue and compiled `gn` natively with
 the `+universal` variant on OS X 10.11.6 without relying on upstream Git
 modifications.

 The underlying build failures stem from two distinct legacy issues:
  1. Google's custom `build/gen.py` bootstrap script does not recognize
 generic autotools flags like `--disable-dependency-tracking`, causing an
 instant configuration abort. It also lacks native orchestration for multi-
 architecture slices.
  2. The codebase introduces C++17 `std::shared_mutex` operations which are
 physically unavailable in Apple's native 10.11 system `libc++.dylib`
 runtime, throwing availability compiler errors and undefined linking
 symbols.

 The attached updated `Portfile` completely resolves these roadblocks by:
  * Integrating `PortGroup muniversal 1.0` to cleanly isolate the build
 loops into independent architecture sweeps.
  * Deleting the incompatible `--disable-dependency-tracking` flags
 globally and mapping the correct platform parameters to `gen.py`.
  * Declaring `compiler.cxx_standard 2020` and injecting
 `-D_LIBCPP_DISABLE_AVAILABILITY` alongside explicit
 `-L/opt/local/lib/libcxx` linker paths inside an `${os.major} < 16`
 conditional block.

 This cleanly bypasses Apple's system library limits by routing the
 unmanaged `ninja` linker directly to the modern, fully populated
 `port:libcxx` runtime path. The resulting binary compiles, links, and
 activates flawlessly as a universal framework.

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


More information about the macports-tickets mailing list