#73976 closed defect (fixed)
glib2-bootstrap @2.88.1_0+universal+x11 Failed to configure
| Reported by: | leoinparis | Owned by: | mascguy (Christopher Nielsen) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.12.5 |
| Keywords: | Cc: | potmj (Michael Pot) | |
| Port: | glib2-bootstrap |
Description (last modified by jmroot (Joshua Root))
MacOS Sequoia 15.7.4 (24G517)
---> Configuring glib2-bootstrap Error: Failed to configure glib2-bootstrap: configure failure: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_glib2/glib2-bootstrap/main.log for details. => attached Error: Problem while installing glib2-bootstrap @2.88.1_0+universal+x11
errors line from main.log:
:info:configure C++ compiler for the host machine: /usr/bin/clang++ (clang 17.0.0 "Apple clang version 17.0.0 (clang-1700.6.4.2)") :info:configure C++ linker for the host machine: /usr/bin/clang++ ld64 1230.1 :info:configure Compiler for C++ supports arguments -std=c++98: YES :info:configure Compiler for C++ supports arguments -std=c++03: YES :info:configure Compiler for C++ supports arguments -std=c++11: YES :info:configure Compiler for C++ supports arguments -std=c++14: YES :info:configure Compiler for C++ supports arguments -std=c++17: YES :info:configure Compiler for C++ supports arguments -std=c++20: YES :info:configure Compiler for C++ supports arguments -std=c++23: YES :info:configure Compiler for C++ supports arguments -std=c++2c: YES :info:configure Compiler for C++ supports arguments -std=c++latest: NO :info:configure meson.build:84:27: ERROR: Subsystem not defined or could not be autodetected. :info:configure A full log can be found at /opt/local/var/macports/build/glib2-bootstrap-1efb34ca/work/build-arm64/meson-logs/meson-log.txt :info:configure Command failed: cd "/opt/local/var/macports/build/glib2-bootstrap-1efb34ca/work/glib-2.88.1-arm64" && /opt/local/bin/meson setup --prefix=/opt/local/libexec/glib2-bootstrap -Ddefault_library=both -Dlibelf=enabled -Dlibmount=disabled -Dwarning_level=0 -Dintrospection=disabled --localstatedir=/opt/local/var -Druntime_dir=/opt/local/run -Dgio_module_dir=/opt/local/lib/gio/modules -Dbsymbolic_functions=false -Ddtrace=disabled -Ddocumentation=false -Dman-pages=disabled -Dnls=disabled -Dappinfo_backend=generic /opt/local/var/macports/build/glib2-bootstrap-1efb34ca/work/glib-2.88.1-arm64 /opt/local/var/macports/build/glib2-bootstrap-1efb34ca/work/build-arm64 --cross-file=arm64-darwin --wrap-mode=nodownload :info:configure Exit code: 1
Attachments (2)
Change History (18)
Changed 4 months ago by leoinparis
comment:1 follow-up: 6 Changed 4 months ago by reneeotten (Renee Otten)
why are you building with the universal variant?
comment:2 Changed 4 months ago by xpahos
:info:build ninja: build stopped: subcommand failed.
:info:build Command failed: cd "/opt/local/var/macports/build/glib2-bootstrap-1efb34ca/work/build" && /opt/local/bin/ninja -j12 --verbose -v
:info:build Exit code: 1
:error:build Failed to build glib2-bootstrap: command execution failed
:debug:build Error code: CHILDSTATUS 3840 1
:debug:build Backtrace: command execution failed
:debug:build while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build (procedure "portbuild::build_main" line 10)
:debug:build invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_glib2/glib2-bootstrap/main.log for details.
Manual run:
In file included from ../glib-2.88.1/glib/galloca.h:34:
../glib-2.88.1/glib/gtypes.h:465:10: fatal error: 'stdckdint.h' file not found
465 | #include <stdckdint.h>
| ^~~~~~~~~~~~~
1 error generated.
To resolve this issue, update the command-line tools to version 16.2 or later. Version 16.4 can be downloaded directly from https://developer.apple.com/download/all/
comment:3 Changed 4 months ago by jmroot (Joshua Root)
| Description: | modified (diff) |
|---|---|
| Keywords: | meson glib2-bootstrap removed |
| Owner: | set to mascguy |
| Status: | new → assigned |
| Summary: | Failed to configure glib2-bootstrap: configure failure: command execution failed → glib2-bootstrap @2.88.1_0+universal+x11 Failed to configure |
comment:4 follow-up: 5 Changed 4 months ago by reneeotten (Renee Otten)
@leoinparis there is no actionable information in the main.log file ; can you also add the meson-log.txt file. Probably first update your CLT / Xcode as per comment 2 and if that still fails add the additional log.
comment:5 Changed 4 months ago by leoinparis
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables package-id: com.apple.pkg.CLTools_Executables version: 16.4.0.0.1.1747106510 volume: / location: / install-time: 1778158827
build retested on latest CLT version 16.4.x - also tested on CLT 23.1.x for good measure, but got the same error each time.
i've attached the meson log.
meson.build:84:27: ERROR: Subsystem not defined or could not be autodetected.
Replying to reneeotten:
@leoinparis there is no actionable information in the
main.logfile ; can you also add themeson-log.txtfile. Probably first update your CLT / Xcode as per comment 2 and if that still fails add the additional log.
Changed 4 months ago by leoinparis
| Attachment: | meson-log.txt added |
|---|
/opt/local/var/macports/build/glib2-bootstrap-1efb34ca/work/build-arm64/meson-logs/meson-log.txt
comment:6 follow-up: 7 Changed 4 months ago by leoinparis
if i only knew ;) this glib2-bootstrap thing comes in as a dependency of glib2, and glib2 is used by a bunch of ports on my setup. But i didn’t explicitly choose the universal variant here, at least that i can remember of.
Replying to reneeotten:
why are you building with the
universalvariant?
comment:7 follow-up: 10 Changed 4 months ago by reneeotten (Renee Otten)
Sorry, I can't help you with that. You could check which port you have installed with universal and try to reinstall them without it if you don't have a need for it to be universal.
port installed active | grep universal
I don't know whether or not building with +universal on macOS 15 is something that is supposed to work.
Apparently, this part in meson.build fails:
host_system = host_machine.system()
subsystem = ''
<snip>
elif host_system == 'darwin'
subsystem = host_machine.subsystem()
<snip>
Replying to leoinparis:
if i only knew ;) this glib2-bootstrap thing comes in as a dependency of glib2, and glib2 is used by a bunch of ports on my setup. But i didn’t explicitly choose the universal variant here, at least that i can remember of.
Replying to reneeotten:
why are you building with the
universalvariant?
comment:8 Changed 4 months ago by ned-deily (Ned Deily)
FWIW, I am seeing the same issue (on macOS 26.4.1 and current Xcode / CLT). I've had no problems with
glib2 +universal up to now:
port installed glib2 The following ports are currently installed: glib2 @2.78.4_3+quartz+universal (active)
In my case, I have need for universal ports which is one reason why I have used MacPorts for many years.
comment:9 Changed 4 months ago by biggreenogre (BigGreenOgre)
I encountered the same issue this morning on MacOS 15.7.5, updating port from 2.12.4 to 2.12.5
why are you building with the universal variant?
I do not recall explictly installing with +universal though it could have been when installing qemu on my prvious M1 Macbook.
The current port installion is the second time that I have transfered the port configuration to a new Macbook. The original install was on an x86 Macbook, the second an early M1 processor and the current host has an M4.
I suspect that the +universal flag was introduced on Macbook 1 or 2 then ported (no pun intended) to the current system.
There will be more than 2 of us out here.
It took me about 4 hours, treading carefully, to install -universal variants and remove the +universal ones.
If it helps anyone, it would be a lot faster to start with glib2 and its dependencies rather than leaving it to the end as I did.
The process was to run port installed active | grep '+universal' and work through the list with
port install <portname> -universal, ignoring the glib2-bootsrap errors.
Once all the "non-universal" port versions were installed, I ran port activate <portname @version> against any that had not been activated.
There is probably a way to script this but my knowledge of Macports is (was?) not deep enough to do so.
comment:10 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to leoinparis:
meson.build:84:27: ERROR: Subsystem not defined or could not be autodetected.
This message was also encountered when cross compiling for iOS and reported to conan, and also allegedly when building only for x86_64 on an x86_64 machine as reported to vcpkg. Both reports suggest setting subsystem = 'macos' should work, but also that this should be the default when not cross-compiling.
Replying to reneeotten:
I don't know whether or not building with
+universalon macOS 15 is something that is supposed to work.
Yes, in general, building a port +universal for arm64+x86_64 on macOS 11–26 is supposed to work.
comment:11 Changed 4 months ago by reneeotten (Renee Otten)
doesn’t this seem like an upstream issue then?
In any case, I have no need for +universal and don’t know how to test things in that respect, so I’ll not be working on this. Interested parties should feel free to provide a patch or submit PR with a working solution.
comment:12 Changed 3 months ago by potmj (Michael Pot)
| Cc: | potmj added |
|---|
comment:13 Changed 3 months ago by potmj (Michael Pot)
Same issue on OS X 10.11.6. Required +universal as a dependency upgrading gilb2 +universal, which is a dependency of many tools. 10.11.6 ships with + universal libraries, so if you want +universal Macports libraries, you will very probably need glib2+universal. I have not tested on 10.5.8 yet. Trying with the addition of configure.compiler=macports-clang-16 does not help. Is this a meson problem? Being a "bootstrap" one would expect It to build with the system compiler.
comment:14 Changed 3 months ago by potmj (Michael Pot)
Here is a fix I have come up with that can be added to the platform Darwin section, with the aid of Gemini to speed the analysis of what I thought was a meson issue. The configuration failures when building glib2-bootstrap and glib2 with the +universal variant on OS X 10.11.6 are caused by two specific limitations in upstream GLib 2.88.x's meson.build script during the split muniversal cross-compilation phase:
- Subsystem Autodetection Failure (Line 84):
The assignment subsystem = host_machine.subsystem() fails because a valid subsystem object mapping is not declared natively by the host in the cross-file layout, causing Meson 1.11+ to panic with:
"ERROR: Subsystem not defined or could not be autodetected." (from the apple compiler).
- Introspection Execution Gate (Line 2722):
For the main glib2 port, Meson flags the dual-architecture folders as cross-build environments and hard-asserts that host binaries cannot run via error('Running binaries on the build host needs to be supported...'), which crashes the setup despite the host natively supporting the target architectures.
Both errors can be cleanly bypassed using standard Meson syntax string swaps under a unified post-patch routine. Adding the following block to the platform darwin section of the Portfile resolves the issue, allowing a pure build via the native system compiler chain:
platform darwin {
# Fixes for OS X 10.11 El Capitan (major 15) and newer universal builds
if {${os.major} >= 15} {
post-patch {
if {[file exists ${worksrcpath}/meson.build]} {
# 1. Clear out the subsystem check panic
reinplace "s|subsystem = host_machine.subsystem()|subsystem = ''|g" ${worksrcpath}/meson.build
# 2. Downgrade the cross-build host execution error to a warning
reinplace "s|error('Running binaries on the build host needs to be supported to build with -Dintrospection=enabled')|warning('Bypassing cross-build host binary check for universal variant')|g" ${worksrcpath}/meson.build
}
}
}
}
comment:15 Changed 3 months ago by reneeotten (Renee Otten)
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_glib2/glib2-bootstrap/main.log