[MacPorts] #67890: blink @1.0.0: error: address argument to atomic operation must be a pointer to non-const _Atomic type
MacPorts
noreply at macports.org
Wed Aug 9 04:45:25 UTC 2023
#67890: blink @1.0.0: error: address argument to atomic operation must be a pointer
to non-const _Atomic type
-------------------------+-------------------------
Reporter: ryandesign | Owner: herbygillot
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords: highsierra
Port: blink |
-------------------------+-------------------------
Changes (by ryandesign):
* cc: ryandesign (added)
Old description:
> On High Sierra and earlier (actually `{clang >= 700 < 1001}` as far as I
> know):
>
> https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/200034/steps
> /install-port/logs/stdio
>
> {{{
> ./blink/jit.h:270:10: error: address argument to atomic operation must be
> a pointer to non-const _Atomic type ('const _Atomic(bool) *' invalid)
> return atomic_load_explicit(&jit->disabled, memory_order_acquire);
> ^ ~~~~~~~~~~~~~~
> }}}
>
> See https://github.com/php/php-src/issues/8881 for some background. It
> seems that there was a mistake in the original version of the C11
> standard (something that should have been `const` was defined to be
> non-`const`), which clang obeyed, and which was changed in later versions
> of the standard; this code appears to be written to the revised C11
> standard.
>
> To address that PHP issue, the `const`-ness is casted away like this:
>
> browser:macports-ports/lang/php/files/patch-php82-atomic.diff
>
> A similar patch could be written for blink.
New description:
On High Sierra and earlier (actually `{clang >= 700 < 1001}` as far as I
know):
https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/200034/steps
/install-port/logs/stdio
{{{
./blink/jit.h:270:10: error: address argument to atomic operation must be
a pointer to non-const _Atomic type ('const _Atomic(bool) *' invalid)
return atomic_load_explicit(&jit->disabled, memory_order_acquire);
^ ~~~~~~~~~~~~~~
}}}
See https://github.com/php/php-src/issues/8881 for some background. It
seems that there was a mistake in the original version of the C11 standard
(something that should have been `const` was defined to be non-`const`),
which clang obeyed, and which was changed in later versions of the
standard; this code appears to be written to the revised C11 standard.
To address that PHP issue, the `const`-ness is casted away like this:
source:macports-ports/lang/php/files/patch-
php82-atomic.diff at d600ab208416957d0ca5e38259bfdcc6cfb38ef3
A similar patch could be written for blink.
--
Comment:
No response from the developers yet. I'll update the port to require a C17
compiler for now.
--
Ticket URL: <https://trac.macports.org/ticket/67890#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list