[MacPorts] #73984: pango at 1.57.1: build fails with Apple clang 21 — comma-separated -Werror specifier rejected
MacPorts
noreply at macports.org
Sun May 10 12:13:32 UTC 2026
#73984: pango at 1.57.1: build fails with Apple clang 21 — comma-separated -Werror
specifier rejected
--------------------+--------------------
Reporter: lukaso | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.12.5
Keywords: | Port: pango
--------------------+--------------------
== Summary ==
`x11/pango` 1.57.1 fails to configure / build on macOS with Apple clang 21
(Xcode 26). The Portfile passes GCC-style comma-separated `-Werror`
specifiers
to the compiler:
{{{
-Wno-error,-Wimplicit-fallthrough
-Wno-error,-Wmissing-declarations
}}}
Apple clang 21.0.0 (`clang-2100.0.123.102`) no longer accepts that comma
form
quietly: it now diagnoses
{{{
unknown -Werror warning specifier: '-Wno-error,-Wimplicit-fallthrough'
[-Wunknown-warning-option]
}}}
Older Apple clang versions parsed the comma form as a single
(unrecognised)
token and silently moved on, so the same Portfile lines were harmless.
With
clang 21 the diagnostic is emitted and — because pango / meson promote
`-Wunknown-warning-option` to an error during the per-flag feature probe —
the
configure step fails (or the build later fails when `werror` is in
effect),
even though the Portfile already appends `-Wno-error=unknown-warning-
option`
later in the same line.
== Environment ==
* macOS 26.3.1 (build 25D771280a), arm64
* Xcode 26.4.1 (Build 17E202)
* Apple clang version 21.0.0 (clang-2100.0.123.102)
* MacPorts 2.12.5
* Affected port: `x11/pango @1.57.1_0`
== Steps to reproduce ==
{{{
sudo port -v install pango
}}}
== Minimal reproducer (no MacPorts needed) ==
{{{
$ echo 'int main(){return 0;}' | \
clang -x c -Werror=unknown-warning-option \
-Wno-error,-Wimplicit-fallthrough - -o /tmp/t
error: unknown -Werror warning specifier: '-Wno-error,-Wimplicit-
fallthrough'
[-Werror,-Wunknown-warning-option]
1 error generated.
}}}
The equivalent equals form is accepted:
{{{
$ echo 'int main(){return 0;}' | \
clang -x c -Werror=unknown-warning-option \
-Wno-error=implicit-fallthrough - -o /tmp/t
$ echo $?
0
}}}
== Offending Portfile lines ==
`x11/pango/Portfile`, currently lines 55–61:
{{{
if { [string match *clang* ${configure.compiler}] } {
configure.cflags-append \
-Wno-error,-Wimplicit-fallthrough \
-Wno-error,-Wmissing-declarations \
-Wno-error=unknown-warning-option \
-Wno-unknown-warning-option
}
}}}
== Proposed fix ==
Rewrite the two GCC-style comma flags to the equals form, which is the
documented clang spelling and is also accepted by GCC (4.8+):
{{{#!diff
--- Portfile
+++ Portfile
@@
if { [string match *clang* ${configure.compiler}] } {
configure.cflags-append \
- -Wno-error,-Wimplicit-fallthrough \
- -Wno-error,-Wmissing-declarations \
+ -Wno-error=implicit-fallthrough \
+ -Wno-error=missing-declarations \
-Wno-error=unknown-warning-option \
-Wno-unknown-warning-option
}
}}}
The block is already gated on `*clang*`, so this only changes behaviour
for
clang. The equals form has been the clang-documented spelling for a long
time and is a no-op vs. the comma form on every Apple clang and upstream
clang version that previously accepted the comma spelling — i.e. the
change
only stops emitting an unknown-warning diagnostic on clang 21+, while
remaining benign on older clang.
--
Ticket URL: <https://trac.macports.org/ticket/73984>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list