[MacPorts] #74324: aom @3.14.1: error: call to undeclared function 'static_assert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] (was: "Error: Failed to build aom" on macOS 10.7 - 10.9)
MacPorts
noreply at macports.org
Sun Aug 16 00:13:05 UTC 2026
#74324: aom @3.14.1: error: call to undeclared function 'static_assert'; ISO C99
and later do not support implicit function declarations [-Wimplicit-
function-declaration]
----------------------------+-------------------------------------------
Reporter: scrutinizer11 | Owner: reneeotten
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version: 2.12.5
Resolution: | Keywords: lion, mountainlion, mavericks
Port: aom |
----------------------------+-------------------------------------------
Changes (by ryandesign):
* keywords: => lion, mountainlion, mavericks
Comment:
Replying to [comment:1 reneeotten]:
> aom: set correct c_standard
The only thing that setting `configure.c_standard` does is tell MacPorts
to select a compiler that supports that standard. It doesn't, for example,
tell the compiler to use that standard. That's done using a flag like
`-std=c11`, which this build is already using, so I'm not immediately sure
why this would be failing, although I have an idea.
Per the log, the port had previously selected clang 16, which supports
C11, so adding this line changes nothing. The port had already set
`compiler.cxx_standard 2017` so it's understandable that setting
`compiler.c_standard 2011` does nothing since every compiler that supports
C++17 probably also supports C11. Nevertheless it is good that it has now
been set to the right value, if indeed it now unconditionally requires
C11. I see that you had previously downgraded the required C standard from
2011 to 1999 in [45fe5ff54675d64a94ca6eb5b94cbb2ef3d3fb86/macports-ports]
because at that time it did not actually seem to require C11.
Replying to [comment:6 Dave-Allured]:
> If MacPorts is providing a too-recent version of assert.h, combined with
an earlier compiler such as clang-16, that would explain this specific
error.
As far as I know, MacPorts doesn't normally provide assert.h; assert.h and
other system headers come from the macOS SDK. I see this log is from OS X
10.9 with Xcode and CLT 6.2, and the summary mentioned failure on 10.7 and
10.8 too. I see we have buildbot failures on OS X 10.7–10.10, though I
can't check those logs right now. It's possible the macOS SDK headers on
those old systems either have a bug or simply don't have the
`static_assert` convenience macro; in the latter case, the solution might
be to call it by its true name `_Static_assert` instead, although that is
deprecated in C23. So the fix might be something like (pseudocode):
{{{
if c standard < 2023
if static_assert is not defined
define static_assert to be equal to _Static_assert
end if
end if
}}}
macports-legacy-support does provide some replacement system headers,
including assert.h, where it already seems to implement this. So one
solution could be to have the aom port use legacy support on OS X 10.10
and earlier.
--
Ticket URL: <https://trac.macports.org/ticket/74324#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list