[MacPorts] #74047: py314-meson cross file arm64-darwin missing subsystem = 'macos', breaks glib2-bootstrap +universal on Intel macOS builder

MacPorts noreply at macports.org
Fri May 29 05:23:04 UTC 2026


#74047: py314-meson cross file arm64-darwin missing subsystem = 'macos', breaks
glib2-bootstrap +universal on Intel macOS builder
---------------------+-------------------------
 Reporter:  Incises  |      Owner:  (none)
     Type:  defect   |     Status:  new
 Priority:  Normal   |  Milestone:
Component:  ports    |    Version:  2.12.5
 Keywords:           |       Port:  py314-meson
---------------------+-------------------------
 `glib2-bootstrap @2.88.1_0+universal+x11` fails to configure on an Intel
 macOS builder when building the `arm64` slice.

 The failure appears to be caused by the Meson Darwin cross file installed
 by `py314-meson`:

 {{{
 /opt/local/share/py314-meson/meson/cross/arm64-darwin
 }}}

 not defining:

 {{{
 subsystem = 'macos'
 }}}

 GLib 2.88 calls `host_machine.subsystem()` on Darwin. Since this is an
 Intel-to-arm64 cross build, Meson cannot autodetect the Darwin subsystem
 and configuration fails.

 == Environment ==

 {{{
 Build machine: Intel Mac
 Build machine arch: x86_64
 Target arch: arm64
 Xcode clang: Apple clang 14.0.3
 SDK: MacOSX13.sdk
 Meson: py314-meson, Meson 1.11.1
 Port being built: glib2-bootstrap @2.88.1_0+universal+x11
 }}}

 Relevant commands:

 {{{
 sw_vers
 xcodebuild -version
 xcrun --sdk macosx --show-sdk-version
 port version
 port installed py314-meson glib2-bootstrap
 }}}

 == Failure ==

 Command:

 {{{
 sudo port -v install glib2-bootstrap +universal +x11
 }}}

 Meson is invoked with:

 {{{
 --cross-file=arm64-darwin
 }}}

 The build fails with:

 {{{
 meson.build:84:27: ERROR: Subsystem not defined or could not be
 autodetected.
 }}}

 Relevant log excerpt:

 {{{
 Build type: cross build
 Project name: glib
 Project version: 2.88.1

 Build machine cpu family: x86_64
 Build machine cpu: x86_64
 Host machine cpu family: aarch64
 Host machine cpu: arm64
 Target machine cpu family: aarch64
 Target machine cpu: arm64

 Cannot run cross check

 meson.build:84:27: ERROR: Subsystem not defined or could not be
 autodetected.
 }}}

 GLib 2.88's `meson.build` contains:

 {{{
 host_system = host_machine.system()

 elif host_system == 'darwin'
 subsystem = host_machine.subsystem()
 host_system = 'darwin'
 }}}

 Since this is a cross build from `x86_64` macOS to `arm64` macOS, Meson
 cannot run the target binary or autodetect the Darwin subsystem.

 == Current cross file ==

 The cross file installed by `py314-meson` is:

 {{{
 /opt/local/share/py314-meson/meson/cross/arm64-darwin
 }}}

 It appears to identify the target as Darwin/arm64, but does not define the
 subsystem as macOS.

 == Workaround tested ==

 Adding this line under `[host_machine]` fixes the configure failure:

 {{{
 subsystem = 'macos'
 }}}

 For example:

 {{{
 [host_machine]
 system = 'darwin'
 subsystem = 'macos'
 cpu_family = 'aarch64'
 cpu = 'arm64'
 endian = 'little'
 }}}

 After applying this patch to:

 {{{
 /opt/local/share/py314-meson/meson/cross/arm64-darwin
 }}}

 `glib2-bootstrap +universal +x11` configures successfully and the build
 can continue.

 == Possible fix ==

 The Meson cross files installed by MacPorts' `py*-meson` ports should
 probably include:

 {{{
 subsystem = 'macos'
 }}}

 for macOS Darwin cross files, at least:

 {{{
 arm64-darwin
 x86_64-darwin
 }}}

 and possibly the other macOS Darwin cross files as appropriate.

 This seems to be a compatibility issue between GLib 2.88's use of
 `host_machine.subsystem()` and MacPorts' Meson Darwin cross-file
 definitions.

-- 
Ticket URL: <https://trac.macports.org/ticket/74047>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list